CMD gives error Feature Name Microsoft-Hyper-V Is Unknown - hyper-v

I tried to disable Hyper-V in the Command Prompt and it gave this error :
Feature Name Microsoft-Hyper-V Is Unknown
The Hyper-V has not been disabled.

Try this:
Open elevated command prompt and run bcdedit /set hypervisorlaunchtype off and restart
If that doesn't work, try this instead:
Open optionalfeatures.exe and un-check Hyper-V
Hope this helps!

Related

Vagrant commands failing

I am new to Vagrant!
I have installed Vagrant from https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.msi
and when i checked the version in Powershell am getting Vagrant 2.2.19. But when i am trying to add box or init am getting error.
below are the details of the error am getting
PS C:> vagrant -v
Vagrant 2.2.19
PS C:> vagrant box add ubuntu/trusty64
Vagrant failed to initialize at a very early stage:
The executable 'cmd.exe' Vagrant is trying to run was not
found in the %PATH% variable. This is an error. Please verify
this software is installed and on the path.
PS C:> vagrant init ubuntu/trusty64
Vagrant failed to initialize at a very early stage:
The executable 'cmd.exe' Vagrant is trying to run was not
found in the %PATH% variable. This is an error. Please verify
this software is installed and on the path.
I have searched on internet and youtube but did not find any help....
Please help me ...... !
FYI : I have restarted my windows 10 computer after installing Vagrant
FOUND ANSWER :
I have done two things, firstly
vagrant plugin update
and secondly i have edited the environment variables
[This PC (rightclick) ---> Properties ----> Advanced system settings ----> Under Advanced Tab Select Environment Variables]
In the Environment Variables window Under System variables select PATH and click on Edit ----> Click on New and add
the Powershell bin path C:\Windows\System32\WindowsPowerShell\v1.0
After this i have restarted my powershell thats it.....Vagrant commands started working.
hello,i just solved this problem ,you can remove the 'cmd.exe'from the PATH ,so you should see the cmd.exe's path like this
enter image description here
after this ,type 'vagrant' in your powershell ,it will run success.

WSL after trying all the steps to upgrade to version 2 if get a failure: WslRegisterDistribution failed with error: 0x80370102

Launch any WSL from within VS Code "No WSL distros found. New distros can be installed from the Microsoft Store.
Source Remote - WSL (Extensions)
BUTON: "Add Distro" --> takes you to the store. Install the version of Linux, and try to start it and you get the following. I've had WSL working before and now cannot get it back to the original working WSL.
I tried some things to update to version 2 and I could list version with command "WSL -l -v" it showed up but not anymore. I've got the features set properly. WSL feature is enabled. I did try setting a bios "Virtualization Technology" this is on a HP laptop with AMD 64 bit cpu. That is off now after finding it doesn't help.
Features on: "Virtual Machine Platform", "Windows Hypervisor Platform" "Windows Subsystem for Linux" There are others but these seem relevant.
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102
Error: 0x80370102 The virtual machine could not be started because a required feature is not installed.
Press any key to continue...
This had to have the bios setting. Also because of being Windows 10 Home didn't have Hyper V feature, but there is a batch that can add this. There is a msi to install WSL 2 so wsl.exe was upgraded. This got the results to show WSL version 2 for ubuntu-20-04 install Also there was some resets needed to get the "WSL -l -v" command to have running.
I don't know 100% certain that these are the cure to the issue. But may help someone who cannot get the Linux to start w/out various error running on windows subsystem Linux. Took me better part of a day to fix.
find the following by googling "del hyper-v.txt" you will hit a page telling you "How to activate Hyper-V in Windows 10 Home"
source of batch command
https://github.com/MicrosoftDocs/Virtualization-Documentation/issues/915
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL
pause
Reboot, still not running, but needed the following sequence.
wsl --shutdown
netsh winsock reset
netsh int ip reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns
wsl -l -v
NAME STATE VERSION
* Ubuntu-20.04 Running 2
initially there was a root user only. Updated new user with the following in %userprofile% folder. Omit the dash and dot.
Ubuntu2004 config --default-user addedUsername
The WSL now is seen by VS Code extensions and no longer flagging to update to version 2. Now on to RxJS tutorial under VS Code.
Make sure all related settings in the bios are enabled.
Make sure all related features in the windows features are turned on.
Alright, if there is an error:
Turn off all related features
Restart it.
Turn on.
Restart it.
related features = ( virtualization )

ssh to aws instance encoding issue

I'm trying to connect to an EC2 instance on AWS, and I'm getting this as the command prompt:
]133;C;]133;D;130]1337;RemoteHost=ec2-user#master]1337;CurrentDir=/home/ec2-user]133;A[ec2-user#master ~]$ ]133;B
I'm using gnome-terminal on Ubuntu 16.04. How can I fix this?
You can change your prompt by changing the variable PS1.
Try to run the line:
PS1='\u#\h:\w\$'
If you like it you can add this line to your .bash_profile.
This will set the prompt to user#host:cwd$
The strange "]133;" is the setting of the color in the prompt
For reference the default prompt for raspian is:
PS1=\[\e]0;\u#\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u#\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\]

rabbitmq-plugin returns "error could not recognize command"

I installed rabbitmq for windows server 2012. it installed properly.I want to run rabbitmq_management command inside the rabbitmq-plugin.bat but the bat file when double clicked throughs "error could not recognize command".Googled the error didn't find a thing.How can i ovveride the error?
Open a cmd terminal, go to the rabbitmq sbin folder and execute:
rabbitmq-plugin.bat enable rabbitmq_management

'xterm-new': unknown terminal type

Replicating the error:
I am using iTerm2 on Macbook (OS X Yosemite)
I ssh into a remote instance and tried to run the clear command and this error is shown:
'xterm-new': unknown terminal type.
Not only for the clear command but the same error is displayed for several other commands and the command does not execute as expected.
The error occurs only when I use iTerm2 and not when I use the default Mac Terminal. So I am guessing this problem has something to do with iTerm2 and not the virtual machine.
How can I solve this problem with iTerm2?
As mikyra pointed out in the comments above, setting the environment variable TERM=xterm-256color solves the problem.
To summarize:
# Run the following commands on the local machine's bash prompt
echo "export TERM=xterm-256color" >> ~/.bashrc
source ~/.bashrc
ssh into remote machine and run the commands you like. The same xterm-new error should not occur now.