I have tested FreeBSD 10.3 as a Hyper-V client on both Server 2012 R2 and Windows 10 Pro. There are many annoying problems. The mouse integration between the client (FreeBSD) and the Hyper-V host does not work, requiring a CNTL-ALT-Leftarrow salute to get back to the host session. DHCP is not getting an IP address. Even when explicitly assigning IP attributes with ifconfig, they are not in effect until entering network manager and restarting the network service. Does not resync the monitor when entering the X session, or when returning to the X session when switching back from another virtual terminal session. The virtual machine reboots (usually) three times before the X session resyncs to the virtual monitor. This means all work in progress is terminated.
Could you please show more information about issues you encountered? 1. What is your OS version? Could you please run "systeminfo | findstr OS" on command console to get it? 2. For mouse does not work, do you run FreeBSD VM in your local windows host or remote host? In other words, if you login remote host through RDP, you will find mouse does not work. It is a known issue. 3. For DHCP failed to get IP address, did you use wireless network? 4. Could you please attach the dmesg dump for reboot caused by "resync"? Thanks for your reporting issues.
And some more questions to Michael, About the DHCP-not-working issue: DHCP should work in 10.3 VM. All that we need to do is adding the line in /etc/rc.conf: ifconfig_hn0="DHCP" How did you configure DHCP in the VM? It looks you're running gnome and use the Network Manager in gome to configure the network? I didn't try gnome and will try it today. BTW, when DHCP doesn't work in your side, can you please try running "dhclient hn0" manually and see if it works or not?
(In reply to Michael Faklis from comment #0) > The mouse integration between the client (FreeBSD) and the Hyper-V host does not work, Can you please describe how the mouse doesn't work? Are you using text mode console or X when it doesn't work? Is your "Virtual Machine Connection" program running on local machine, or a remote server (e.g., by RDP)? In my test, the (legacy PS/2) mouse can work in the VM's texe mode and X. > requiring a CNTL-ALT-Leftarrow salute to get back to the host session. Yes. This is a known issue. To resolve it, we need to add a Hyper-V mouse driver, which is in our TODO list.
(In reply to Michael Faklis from comment #0) > Does not resync the monitor when entering the X session, or when returning to > the X session when switching back from another virtual terminal session. The > virtual machine reboots (usually) three times before the X session resyncs to > the virtual monitor. This means all work in progress is terminated. I don't have the "no resync" or "reboot" issues. I can switch between X (gnome) and ttyv0~ttyv7 without any issue. The only issue is: the swtich is a little slow -- it takes about 3 seconds: this is a known issue (we need to add a Hyper-V framebuffer driver which is also in our TODO list). BTW, by saying "the virtual machine reboots", do you mean the VM crashes?
Created attachment 174571 [details] FreeBSD 10.3 VM on HyperV (Windows Server 2012 R2)
(In reply to Dexuan Cui from comment #5) To prove what I said, I uploaded this screenshot: I installed gnome-3 in my 10.3 VM, and installed Chromium browser. Everything works fine. Note: there is a mouse cursor on the left side, so you can see the mouse does work for me. BTW, if you run the "Virtual Machine Connection" program in a remote RDP session, the mouse doesn't work for now, due to the lackness of Hyper-V mouse driver.
(In reply to Hongjiang from comment #1) C:\Users\MFaklis.EvolSwSys>systeminfo | findstr os Host Name: WIN10P64HV OS Name: Microsoft Windows 10 Pro OS Manufacturer: Microsoft Corporation Connection Name: Ethernet for Host Mouse: From the Hyper-V Manager on the Hyper-V host, doing a "connect", so local. The mouse works if you click into the client windows, but I must do a CNTL-ALT-leftarrow to release the mouse back to the host session. DHCP: No wireless NIC on the Hyper-V client or host. Question about dmesg: dmesg is the log from the boot which works. The logs from the boots where X resync causes a reboot are not in dmesg. If you tell me how to capture those logs so they are preserved after the reboot, I will do that. If you really want the dmesg from the reboot which works, let me know and I will do that.
(In reply to Dexuan Cui from comment #2) I do have the ifconfig in the rc.conf. The host and Hyper-v both have separate real NICs. In Hyoer-v manager I have an external virtual switch. The DHCP server is on the Windows Server 2012 R2 domain controller virtual machine. When FreeBSD as a Hyper-V client starts it does not seem to get an IP address until I go to Network Manager and restart the network service. Even when I explititly give the FreeBSD virtual client an explicit ipv4 ip address, gateway, DNS... I still have to go into network Manager and restart the network service bewfore the IP address is functional. DHCP otherwise works on my domain and on my Windows and Linux virtual clients.
(In reply to Dexuan Cui from comment #2) Unable to cut & past, so DHCPDISCOVER pn de0 to 255.255.255.266 port 67 . . . . No DHCPPFFERS received Tryind recorded lease 192.168.2.112 bound: immediate renewal DHCPREQUEST on de0 to 192.168.2.142 port 67 Pings to domain contoller; ping: sentto: No route to host . . . . .
(In reply to Dexuan Cui from comment #3) Requires a click within the client windows fror the client to see the mouse. Requires CNTL-ALT-leftarrow to release the mouse back to the host session, I'm using X with KDE4
(In reply to Dexuan Cui from comment #4) It appears that X crashes and then remaining withing the hyper-V client session, FreeBSD boots from the GRUB menu.
My suggestion for the X stuffs is to use VNC, e.g. tigervnc, which works quite well for me (I used Hyper-V + tigerVNC to do all of the Hyper-V FreeBSD development work).
(In reply to Michael Faklis from comment #9) What's the kernel configure do you use? It looks like you commented out the 'options HYPERV' and 'device hyperv'.
(In reply to Michael Faklis from comment #9) Hi Michael, So please let me summarize the issues: 1) The mouse doesn't work. Actually it works, though there is small but annoying thing: we must press Control-Alt-LeftArraw to return the mouse back to the host and we have to click into the VM window to give the mouse to the VM. This is a known issue, which can be resolved by adding Hyper-V synthetic mouse driver. It's in our TODO. 2) DHCP can't work. You're using "de0" (the Legacy Network Adapter) somehow. When we create a Hyper-V VM, by default a Hyper-V Synthetic NIC (the "Network Adapter" in the VM's "Settings") is created for the VM. I guess you removed the synthetic NIC and added a Legacy NIC somehow? By default when we install FreeBSD 10.3 VM from the official .iso file, the built-in BIS drivers support the Synthetic NIC well (the NIC name is "hn0") and DHCP should work fine. If you do want use the legacy NIC ("de0"),please be noted there are known issues: a) the NIC can't work properly in SMP VM. It looks something is wrong here in Hyper-V's IOAPIC emulation. b) Even for UP VM, it looks adding ifconfig_de0="DHCP" in /etc/rc.conf doesn't work reliably. If I replace the "DHCP" with "SYNCDHCP", it looks the NIC can work, but I don't why. Considering the poor performance and instability of "de0", we do recommend the default synthetic NIC ("hn0") should be used. 3) VNC can't work? In my 10.3 VM, after I did "pkg install tightvnc" and ran "vncserver" to set up a VNC password, my VNC-Viewer could connect to the VM without any issue. 4) Xorg triggered VM panic/reboot? Gnome3 works fine for me. I'll try KDE4.
After I followed https://www.freebsd.org/doc/handbook/x11-wm.html to install KDE4 in my 10.3 VM, it also worked fine for me.
(In reply to Dexuan Cui from comment #14) 2) DHCP can't work. When I was studying documents for using the BIS for Linux and FreeBSD, I thought I read that I should use the legacy network NIC. That was obviusly wrong for FreeBSD or I was mistaken. I revised rc.conf references from de0 to hn0, shutdown, revised the Hyper-V client settings to use the synthetic NIC, and started it back up. Upon the first boot, the hn0 NIC was disabled, so I re-enabled it. It now comes up with DHCP giving hn0 an IP address. By the way, I had revised rc.conf from DHCP to SYNCDHCP when I first encountered de0 not having an IP address. Thank you. 4) Xorg triggered VM panic/reboot? I have found if I do not "connect" to the FreeBSD hyper-v client when I start it from the hyper-v manager, it starts up the X login screen without problems. I can then connect to the hyper-v client and log into KDE (in my case). However, it I switch to another virtual terminal (text mode), X comes up showing garbage and forcing the panic/reboot three times to get to a clean X logon screen. I wonder if I screwed up with xorg.conf? I reading that the xorg.conf.d directory is the current preferred definition over xorg.conf. Not seeing how this was done, I looked at a linux virtual machine and saw how it constructed the xorg.conf.d, so I took my xorg.conf, broke it up by section and placed each in a text file in xorg.conf.d. Can you show me how xorg.conf should be defined for running FreeBSD 10.3 as a hyper-V client?
(In reply to Sepherosa Ziehau from comment #13) I'm running the default unaltered kernel. In dmesg I see messages for Hyper-V Heartbeat, KVP, Shutdown, and time Sync services. Where to you see commenting out options HYPERV and device HYPERV? How might I add these dynamically at startup without rebuilding the kernel? I think I have the flu, so I'm going to rest for a short while. I truely appreciate all of the wonderful questions and solutions that have been offered to me.
(In reply to Michael Faklis from comment #16) (In reply to Michael Faklis from comment #17) When KDE4 worked in my 10.3 VM, I didn't manually make any configuraiton change to Xorg -- I just ran "pkg install kde4", added the /proc line into /etc/fstab, and added the dbus/hald/kdm4_enable="YES" lines into /etc/rc.conf, just as the handbook page described. So, to debug the issue, I think we have to check the logs in your side. Can you please get the logs? e.g, /var/log/Xorg*.log, /var/log/message, dmesg > dmesg.log. > "X comes up showing garbage and forcing the panic/reboot three times to get to a clean X logon screen." It looks the reboot/panic happened to Xorg rather than the VM? BTW, it looks very strange to me that Xorg worked in your side if you didn't "Connect" to the VM. I can't explain this. > Where to you see commenting out options HYPERV and device HYPERV? We guessed you might be using a customized kernel with the options disabled. Since you clarified you were using the default 10.3 installation, which did enable the options, please ignore the questions related to the options. And do you mean you want to disable heartbeat, kvp, shutdown and time sync without rebuilding the kernel? If yes, there are some tunables, but I'm not sure why you need to do this. :-) Sorry to hear you got a flu. Have some rest and we can come back with the issues later.
(In reply to Dexuan Cui from comment #18) Faced with the fact that you are having no problems with Xorg and DHCP, I decided to make a fresh install of FreeBSD 10.3 "by the book" following the instructions in the handbook. On the fresh install, I have no problems with Xorg or DHCP. I've been building FreeBSD since sometime before v6. I winged it on the problematic install, so I must have made mistake. As a result of this new install, the only problem still existing from my original problem report is the annoyance of not having a synthetic mouse, which you already planned to address. Thank you to everyone who provided assistance on my problem report.
(In reply to Michael Faklis from comment #19) Hi Michael, Since you don't have the Xorg/DHCP issues with fresh installation, now, can we close the bug? I suppose VNC should work for you too. We're tracking the synthetic mouse issue internally, or we can also open a new bug here to track it.
Currently the port has expired because it states to only claim FreeBSD versions 8.4, 9.1, 9.2, 9.3 and 10.0, all of which are end-of-life. Does this software run on FreeBSD 10.3, 11.0 or HEAD or does it need to be updated first?
The source has tests for the version of FreeBSD, but does not test for 10.3. I don't believe that means it's obsolete. I believe the source code needs to be updated.
The version test may have been in the make.
(In reply to Rene Ladan from comment #21) We have _no_ plan to keep the emulator/hyperv-is ports supported anymore. I believe you should nuke it from 10.3/11.0/stable-10/stable-11/current ports tree to avoid further confusion. Thanks, sephe
Microsoft has promised full hyper-V support for FreeBSD. How does FreeBSD support Hyper-V without this module? It appears to me that this module is the FreeBSD/Hyper-V compatibility.
(In reply to Michael Faklis from comment #25) It has been in the src/ for tree yeasr on 10-stable, 11-stable and current. And it is in amd64 GENERIC kernel. It does _not_ make any sense to keep the ports modules supported any more. We do _not_ want to have more confusion about which modules should be used. Please nuke the emulation/hyperv-is ports on branches I mentioned.
(In reply to Sepherosa Ziehau from comment #26) To make it more clearer: we don't need the emulation/hyperv-is port for all officially-supported FreeBSD versions (10.3, 11) and the HEAD, because we have integrated the code of the port into the source code of FreeBSD. If you install a 10.3 or 11 VM, the Hyper-V drivers/daemons in the VM should work just out of box. The port was made to support old FreeBSD 8.x, 9.x and 10.0, which are obsolete now, so the port is obsolete too.
OK, port has been removed.