wsl --set-default-version 2 The service cannot be started, either because it is disabled or because it has no enabled devices associated with it - failed-installation

I'm trying to install again Ubuntu on my Windows 10 Home Version 20H2 OS Build 19042.685 using WSL2.
The problem is the WSL2 installation is not finished.
I received the following message doing Step 5 - Set WSL 2 as your default version
PS C:\WINDOWS\system32> wsl
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
Previous steps done:
PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Deployment Image Servicing and Management tool
Version: 10.0.19041.572
Image Version: 10.0.19042.685
Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Deployment Image Servicing and Management tool
Version: 10.0.19041.572
Image Version: 10.0.19042.685
Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
PS C:\WINDOWS\system32>
Then I restarted Windows and
execute wsl_update_x64.msi

I had the same issue:
C:\WINDOWS\system32> wsl --set-default-version 2
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
The problem was Kaspersky. The solution is simple: open cmd.exe as administrator and run the following code
sc config LxssManager start=auto
Kaspersky will give you a pop-up about a potential thread. Tell Kaspersky to ignore the alert. Please don't click on "Fix it" button for Kaspersky or you will undo the solution.
That should fix it.

Docans is right; running:
sc config LxssManager start=auto
in Command Prompt seems to fix the issue. However, you must run Command Prompt as an Administrator. I don't have enough reputation to comment or edit the post to clarify this so I have to make it a separate answer.

PS: Windows Command shell needs to be open with Admin privileges (Run as administrator)

Related

Is there any way to use runasoriginaluser in uninstallrun in inno setup?

I have written an application using docker-toolbox and inno setup script for the application installation in windows 10.
And I want to remove the docker-toolbox VM, while I uninstall my program. However, the VM cannot remove completely by following inno setup script.
[Setup]
PrivilegesRequired=none
[UninstallRun]
Filename: "{cmd}"; Parameters: "/C ""docker-machine rm -y myDocker"""
The command "docker-machine rm -y myDocker" always work whenever runs in my user cmd, but not works in inno setup uninstallrun.
And I checked and found out that docker-toolbox is based on VirtualBox. VirtualBox uses a per-user environment. Becoming root (or any other user) does not give you access or more powers to the original user's VMs. ALWAYS perform VM operations as the user that actually created the VMs. Hence, I have to run a command as a original user in uninstallrun, but I cannot find a way to do so.
Looking forward for a help and support, I have spent lots of times in this problem.
Is there any way to use runasoriginaluser in uninstallrun in inno setup?
You should not modify a specific user profile from an (un)installer that runs with Administrator privileges (installs software for all users).
See Installing application for currently logged in user from Inno Setup installer running as Administrator.
runasoriginaluser flag is not supported in UninstallRun section. Probably because it won't be of any use there anyway. What the flag does in Run section is that it executes program with privileges with which the installer was originally executed. But uninstaller (for installer elevated to Administrator privileges) is executed with Administrator privileges straight away, when executed from Control Panel/Settings app.

AWS EC2 Windows SSH Help - Chmod 400 (RSA Key).pem Not Working

Thank you all who use their time to help others. Thank you in advance.
I am taking a class on EDX for Linux command line. I have attached the instructions I have followed to set up Red hat using Windows 10. But the SSH for isn't working it says that RSA Key not found. (Attachment didn't work)
I paste it here
"The recommended way to access your Red Hat Enterprise Linux cloud instance for this course is
to use Secure Shell (ssh​) to get an interactive shell on the system.
Step 1: Getting SSH
If you are using macOS or Linux: The OpenSSH command (ssh​) should already be installed on
your computer. Start a terminal program to get a shell, and proceed to the next step.
If you are using Microsoft Windows, you will need to get an SSH client as follows:
● Option 1: Download Git for Windows​ from https://git-scm.com/download/win and install
it using the default settings. When it is installed, right-click on your desktop (not an icon
or a file) and select Git Bash Here​ to open a Git Bash​ command prompt. An SSH client is
provided with Git Bash​ and you can continue with Step 2.
● Option 2: If you have the PuTTY client, which can be downloaded from
http://www.chiark.greenend.org.uk/~sgtatham/putty/, and you are familiar with that
tool, you can use that to connect to your instance. AWS provides a tutorial on this at
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html.
Step 2: Connecting to your instance with SSH
From the Amazon EC2 console, in the left-side menu under INSTANCES​, click Instances​ to
display a list of the instances you have running. This is probably just the one you set up for this
course. Select its checkbox and click Connect:"
Also, I have another PC I built running on Ubuntu. Can I use that PC with the RSA by logging into AWS account if there is no solution.
I have researched this question and I am stuck here trying to find a solution so I can start class.

ColdFusion 10 Mandatory Update install fails on VM

I need to run the mandatory update for ColdFusion 10 so I can apply the later updates to the server. I downloaded the file and tried the instructions listed here: Mandatory Update Instructions.
I have a singular instance, so this should be fairly straightforward. I download the file, place it in the "hf-updates" folder, and then do java -jar cf10_man_updt.jar and I get the following notice:
Graphical installers are not supported by the VM. The console mode
will be used instead...
The installer proceeds to hang and fails to complete. I then go to option #2: Silent mode. I create my properties file and then do java -jar cf10_mdt_updt.jar -i silent -f install.cfg.txt. I get the following message:
Installer User Interface Mode Not Supported
Unable to load and to prepare the installer in console or silent mode.
This one has the courtesy to actually terminate so I don't have to close the command prompt window to retry, but I'm still nowhere. Any ideas on what I can do?
Alex provided the correct answer. I had been using the JRE in my program files folder (explicitly, actually. There was no javapath to speak of in the environment variables. I shorthanded the command for the sake of brevity). I changed the command to "C:\Coldfusion10\cfusion\jre\bin\java" -jar cf10_mdt_updt.jar and the install ran successfully.

Run Powershell or Command Prompt as administrator during Visual Studio Team Services build

I am working on a project where we are delay signing the assemblies. I need to use the strong name tool a couple times during the build, to turn off strong name verification, and then to fully sign the assemblies before they are packaged. I attempted to use a powershell step to turn off verification, but it came back with this error:
Script:
$testprojs = gci Project.*.dll -r
$testprojs | % {
sn -Vr $_
write-output $("Turned off sn verification for " + $_.Name)
}
Error:
Failed to open registry key -- Administrator permissions are needed to use
the selected options. Use an administrator command prompt to complete these tasks.
So I created a script that would run the first one, but added the -elevated parameter. This made no difference.
I also tried using a command prompt step instead of powershell. This also returned the same error.
For /r %g in ("Project.*.dll") DO sn -Vr %g
When I tried running this same script rdp'd to the build agent machine itself, it works as intended. It's only when it runs as a step in the build does it not work.
Any ideas?
According to your description:
When I tried running this same script rdp'd to the build agent machine
itself, it works as intended.
I assume you are using your own build agent for build. Then this may caused by the build agent isn't running with an administrator account. Please update your build agent to run with administrator account and then try again.
Run the agent Run as a service
If you deployed the agent to run as a Windows service, then the agent
running status can be controlled from the Services snap-in. Run
services.msc and look for "VSO Agent ()". If you
need to change the logon account, don't do it from the services
snap-in. Instead, From an elevated Command Prompt, run:
C:\Agent\Agent\VsoAgent.exe /ChangeWindowsServiceAccount Run
interactively
Otherwise if you installed the agent to run interactively, the agent
can be started by launching Agent\VsoAgent.exe.
Refer to this link for details: Run the agent

VMWare Workstation won't suspend from command line

I'm trying to automate VMWare Desktop on Windows 7 to suspend all vm's before I do a backup job each night. I used to have a script that did this but I've noticed now that it won't suspend anymore with the same command that used to work.
If I do vmrun list I get a list of the running vms with no issue.
If I do vmrun suspend "V:\Virtual Machines\RICHARD-DEV\RICHARD-DEV.vmx" it just hangs and I have to kill the command with CTRL+C.
I've even tried a newer command using -T to specify it's workstation, ie vmrun -T ws suspend "V:\Virtual Machines\RICHARD-DEV\RICHARD-DEV.vmx" and still no love.
If I have the vm already stopped, I can issue vmrun start "V:\Virtual Machines\RICHARD-DEV\RICHARD-DEV.vmx" and it starts fine.
As well as the suspend command, the stop command also does not work. I'm running VMWare Workstation 11.1.3 build-3206955 on Windows 7.
Any ideas?
Update:
I installed latest VMWare Tools on the guest, as well as the latest Vix on the Host so everything should be up to date.
I can start a vm using vmrun with no problem using vmrun -T ws start <path to vmx> but the command doesn't come back to the command prompt, so I'm assuming it's not getting confirmation from the vm that it is now running.
If I cancel the 'start' command and now try and suspend I'm getting the same lack of communication from the guest. If I manually suspend the vm, once it's suspended I get an 'Error: vm is not running' and the 'suspend' command finally times out and comes back.
So, it looks to me like there is no communication from vmrun to the guest about what state it's in etc. Is there a way to debug the communication from the host to the guest using vmrun or other means? Are there ports I need open in the guest OS?
So, I never did get vmrun to work properly on my main system, although I did get it behave ok on my laptop so there is something weird happening on this machine. I also installed a trial of the latest VMWare 12 and the same thing happens.
As a workaround, I ended up changing the power management settings in my guest OS so that it would 'sleep' after 1 hr of inactivity. When this happens VMWare detects it and automatically suspends the guest which is really what I'm looking for. Not the most slick solution but it does manage to unlock the files I need to be backed up in a nightly backup.