IncludeOS icon indicating copy to clipboard operation
IncludeOS copied to clipboard

Please document Hyper-V compatibility

Open forderud opened this issue 7 years ago • 6 comments

It would be nice if the IncludeOS documentation could be updated to also cover a few sentences about Hyper-V compatibility.

I don't really know much about virtualization, but I did manage to run the IncludeOS_example image inside Hyper-V after performing the following steps:

  • Use qemu-img to convert image to vhdx format: qemu-img.exe convert IncludeOS_example.img -O vhdx -o subformat=dynamic IncludeOS_example.vhdx (see https://cloudbase.it/qemu-img-windows/)
  • Create a "generation 1" Hyper-V VM with IncludeOS_example.vhdx attached as hard drive.

The image boots nicely in Hyper-V: image

Issues:

  • I suspect that networking does not work. Not sure how to investigate this though, since the only thing displayed on screen is #include <os> // Literally..
  • "Generation 2" VMs does not seem to work. Disabling secure boot does not help. There's more information about gen 1 vs. 2 on https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/plan/should-i-create-a-generation-1-or-2-virtual-machine-in-hyper-v

forderud avatar Dec 13 '17 11:12 forderud

Nice! Can you get serial output from the instance that is running on Hyper-V? The IncludeOS_example outputs some information (including networking settings) to serial while running. If not, you can try enabling the vga output.

ingve avatar Dec 13 '17 11:12 ingve

Unfortunately, I've not been able to get any serial-port output. WinDbg complaints about "Debugee not connected" when attempting to connect to a named pipe associated with COM1 in the VM: image This might, however, be caused by improper usage from my side, since I've never done this before..

Any advise on how to enable VGA output when building the image?

forderud avatar Dec 13 '17 13:12 forderud

To get VGA output, it should be enough to add vga_output to the drivers section in the CmakeLists.txt file and rebuild the service. Then you should get something like this instead of the #include <os> // Literally screen:

vga_output

ingve avatar Dec 15 '17 09:12 ingve

Thanks for the tip @ingve. I've now managed to add vga_output to the drivers section an rebuild the service. image

Unfortunately, the VM still only displays #include <os> // Literally as before when booting. Maybe it's crashing without any visual cues(?)

forderud avatar Dec 15 '17 10:12 forderud

That sounds plausible. Does Hyper-V have some (non-user initiated) logging of its own? When I run IncludeOS services in VMware, in addition to the serial output, for each instance VMware writes a very detailed log with extremely detailed information, thousands of lines like the following:

2017-12-18T14:13:25.158+01:00| vmx| I125: Vix: [775 mainDispatch.c:1073]: VMAutomation_PowerOn. Powering on.
2017-12-18T14:13:25.159+01:00| vmx| I125: VMX_PowerOn: ModuleTable_PowerOn = 1
2017-12-18T14:13:25.159+01:00| vmx| A100: ConfigDB: Setting cleanShutdown = "FALSE"
2017-12-18T14:13:25.159+01:00| vmx| A100: ConfigDB: Setting softPowerOff = "FALSE"
2017-12-18T14:13:25.159+01:00| vcpu-0| I125: VTHREAD start thread 4 "vcpu-0" tid 2593563
2017-12-18T14:13:25.162+01:00| vcpu-0| I125: MonTimer APIC:1/1 vec: 221
2017-12-18T14:13:25.162+01:00| vcpu-0| I125: APIC: version = 0x15, max LVT = 6, LDR = 0x4000000, DFR = 0xffffffff
2017-12-18T14:13:25.163+01:00| svga| I125: SVGA thread is alive
2017-12-18T14:13:25.163+01:00| vcpu-0| I125: CPU reset: hard (mode 2)
2017-12-18T14:13:25.164+01:00| vcpu-0| W115: VSOCKET 1 Failed to create socket: Network is unreachable (51)
2017-12-18T14:13:25.164+01:00| vcpu-0| I125: GuestRpc: Could not create RPCI listening socket: Network is unreachable
2017-12-18T14:13:25.164+01:00| vcpu-0| I125: GuestRpc: Using vsocket for TCLO messaging is disabled.
2017-12-18T14:13:25.165+01:00| vcpu-0| I125: PIIX4: PM Resuming from suspend type 0x0, chipset.onlineStandby 0

ingve avatar Dec 18 '17 13:12 ingve

Unfortunately, I haven't been able to find a way to activate detailed logging. The only logs I've found are high-level events in the Windows event viewer: image The folders containing the IncludeOS VM doesn't seem to contain any log files either....

forderud avatar Dec 18 '17 15:12 forderud