NumLock turned off after Ubuntu start under Hyper-V - windows-10

When I start Ubuntu 20.04 under Hyper-V of Windows 10 1809
NumLock is turned off.
How to prevent it?
What I tried
Editing Registry for Kyboard to some magic number - does not work
Set-VMBios cmdlet is not supported now
gsettings set org.gnome.desktop.peripherals.keyboard remember-numlock-state true - does not work
Can't enter VM BIOS during loading of VM
There is no BIOS option for VM in Hyper-V now

Terrible hearing that, but we still don't have any solution for Gen 2 VM.
For now for solve it you can use only Gen 1 VM.
PS: I hope MS developers team someday found this post and fixed this bug :)

Related

Problems enabling hyper-v for Windows 10 Pro

Does anyone have any ideas how to enable Hyper-v and containers on Windows 10 Pro 64bit with compatible hardware (according to msinfo32) and all requirements met ie BIOS virtualisation enabled, >4GB RAM and so on. Despite all this none of the commands in powershell or cmd succeed. They complain that one or more parent features must be enabled. There is no error when enabling via Windows features but after the restart Hyper-v regresses to disabled. This question seems to come up a lot and I have tried a wide range of “solutions” but no fix so far. My main goal here is to run Docker for Windows.
Fixed with Windows Defender Fresh start. Not ideal but not as bad as a full reinstall. Worked immediately after this.

Packer not booting Win10

I'm trying to use Packer form Hashicorp to create VMs. The idea is that I can create Windows 10 VMs for for each of my assignments, and run those VMs on my "main" Windows 10. I have access to Hyper-V, and as of late 2016, Packer supports that too.
Grabbing several files from Matt Wrock's Github repository, I have created a json file, an Autounattend and some scripts. When running Packer, I ended up with an error saying "Error getting WinRM host: No ip address". This had gone on for 5+ hours, so something was not going right. Interestingly, the Hyper-V Manger said that the VM was there, and I could even log in. Then I noticed that none of install scripts had been executed. For instance, in my Autounattend I execute Matt's boxstarter.ps1 script to install Boxstarter, but Boxstarter has not been installed.
To get a better visual on the process, I changed the Autounattend.xml to have all WillShowUI properties set to true. Nothing appears. To me this seems like Windows 10 is not booted. Any idea how I can check this? Also, from a different Github repository, I found in a json file for Windows Server 2013 the "boot_command" with value aaa. Without having any idea whether this applies to Windows 10 as well, I put that in my json file too. Maybe this boot command is wrong?
Alternatively, is there anyone out there having a public repository which I can use to create Windows 10 VMs that will run on Hyper-V on a Windows 10 machine?
Got some good news :) You don't need to build Packer from source for the Hyper-V provisioner. It was merged in at version 0.12.1 so if you have the latest you're good to go.
Here are some samples that I used when testing it for version 0.12.1+:
https://github.com/StefanScherer/packer-windows - Samples for Windows 10 & Windows Server 2016 set up with Docker & Windows containers
Ubuntu 16.04, hyperv-iso, generation 2 (UEFI) https://github.com/taliesins/packer-baseboxes/blob/master/hyperv-ubuntu-16.04.json
Feel free to ping me on GitHub (#patricklang) with issues in any of those repos.
There is not enough details to tell what's wrong.
Try using taliesins basebox - Windows 10, he is the main author of the Hyper-V support in Packer and I expect his examples to work.

Enable Hyper-V and Hardware Virtialization for VirtualBOX under Windows

I am developing xamarin apps under windows.
I want to regularly run the app under:
Windows Phone Emulator
iPhone Emulator
For the first, Hyper-V needs to enabled under windows.
For the second, one needs an OSX to connect to. I am trying to run OSX under VirtualBox. For this to work, Hardware Virtualization needs to be enabled.
Now, when I enable Hyper-V VirtualBox does not detect the hardware virtualization. And according to this, that will not change.
Is there an solution how I can test iOS and WindowsPhone without having to enable/disable Hyper-V (which requires a restart)?
I understand your pain-point, but this is just not possible to attain w/o a system restart because of the simple fact that the virtualization technologies you mentioned here are of different types.
In your case, Hyper-V that you use for #1 is a "Type 1" hyper-visor which run on host machine hardware. Other examples in this category include Citrix XenServer and VmWare ESXi.
The Virtual Box that you use for #2 is a "Type 2" hosted hyper-visor which runs within an OS.
If you need to toggle b/w these, a restart is eminent AFAIK.
A quick way to see the mode is by running "bcdedit" from Command Prompt to see the current config.
1. To disable Hyper-V run:
bcdedit /set hypervisorlaunchtype off
2. To turn Hyper-V back on run:
bcdedit /set hypervisorlaunchtype auto
However, you would need to reboot in both the cases. I just mentioned a easy config way to make you understand what was happening in the boot loader when toggling between the Type 1 and Type 2 hyper-visor modes.
Virtualbox 6 can use Hyper-V as backend virtualization engine. So that you can use them at same time.
You can enable this feature by this command:
cmd
cd "C:\Program Files\Oracle\VirtualBox"
VBoxManage setextradata global "VBoxInternal/NEM/UseRing0Runloop" 0
According to this:
https://docs.oracle.com/en/virtualization/virtualbox/6.0/admin/hyperv-support.html
This is an experimental feature.
So this feature could be unstable and doesn't even work.
At least it work on my laptop.
Screenshot that Vbox and HyperV at same time
You can do it via opening powershell in administrator mode and run the following code :
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

Windows Phone Emulator error, Hyper-V components not running, Windows 8.1 hosted in Windows Azure

Environment:
Windows 8.1 Enterprise 64-bit hosted in Windows Azure
Visual Studio Ultimate 2013 (Update 2)
I get the following error when trying to run a very simple phone app. I know MS says a VM-within-a-VM environment isn't supported, but I know it can work. Has anyone had success with this? Any help is greatly appreciated.
Windows Phone Emulator
The Windows Phone Emulator wasn't able to ensure the virtual machine was running:
Something happened while starting a virtual machine: 'Emulator WVGA 512 MB.' failed to start.
(Virtual machine ID CADD6546-129A-4683-9A2D-52EAE777E888)
The Virtual Machine Management Service failed to start the virtual machine 'Emulator WVGA 512 MB.'
because one of the Hyper-V components is not running
(Virtual machine ID CADD6546-129A-4683-9A2D-52EAE777E888).
Prior to seeing the error, the emulator emits the on-screen messages:
Loading ...
The Windows Phone OS is starting ...
And then the error. Of all the Hyper-V services available, the Hyper-V Virtual Machine Management service is the only one which is running.
Thanks,
Chris
I had the same issue with Visual Studio running on windows 8.1 in vmware player
What I had to do to solve the problem was this :
Tick the box "Virtualize Intel VT-x/EPT or AMD-V/RVI" in the processor settings of your VM
Add the line "hypervisor.cpuid.v0 = FALSE" in the file "Windows 8 x64.vmx" (add it between line 5 and 6. Not sure this matters, but at this line I'm sure it works)
Should be working fine
"You cannot host it in Azure. It needs to be a physical machine." -- Jeff Sanders (MSFT)
Florian.C's answer got me on the right track to get the emulator working correctly in VMware Fusion on my MacBook Pro. In Fusion, the settings are under the "Processors & Memory" section. You have to open the "Advanced" section at the bottom and check the "Enable hypervisor applications for this virtual machine". Once that was done, I had to also open the .vmx file and add the "hypervisor.cpuid.v0 = "FALSE"" line. Originally I copied and pasted from SO and the VM threw an error when I booted it. It turns out the " I added around FALSE were not normal quotes. Once I fixed that, the VM booted and the emulator ran just fine under Fusion. Thanks for the great info!

Possible to run Windows Phone 8 Emulator in AZURE VM?

Does anyone know what are the steps necessary to run Windows Phone 8 Emulator in an Azure VM? I can't seem to add the Hyper V role which the Emulator complains that it needs. Is this even possible?
No!
Unfortunately you can't! The issue with the fact that the WP8 Emulator needs and uses Hyper-V. And in Windows Azure we are already virtualized. So simple rule:
You can't virtualize what is already virtualize
This is the same as you can't install Hyper-V role on a Windows Server which runs inside Hyper-V already. So, no solution to your question at all.

Resources