FreeBSD and Microsoft Windows Server Hyper-V support
FreeBSD Integration Services for Hyper-V
Introduction
Hyper-V supports both emulated and Hyper-V-specific devices for FreeBSD virtual machines. When running with emulated devices, no additional software is required to be installed on a FreeBSD virtual machine. However emulated devices do not provide high performance and cannot leverage the rich virtual machine management infrastructure that the Hyper-V technology offers. In order to make full use of all benefits that Hyper-V provides, it is best to use Hyper-V-specific devices for FreeBSD. The collection of drivers that are required to run Hyper-V-specific devices are known as BSD Integration Services (BIS).
For older FreeBSD releases, Microsoft provides integration services as installable ports that can be downloaded from the following GitHub repository:
https://github.com/FreeBSDonHyper-V/Hyperv-Ports
Starting FreeBSD 10.0, most Hyper-V integration services will be installed as part of creating a FreeBSD virtual machine on Hyper-V and no separate ports will be required.
Hyper-V Integration Services
As of FreeBSD 10.0, Hyper-V integration services provide the following functionality:
- Support for integrated shutdown from Hyper-V console.
- Support for keeping time synchronized between FreeBSD guest and Hyper-V host.
- Support for Hyper-V specific IDE and SCSI storage devices.
- Support for Hyper-V specific network adapter.
- Live migration with and without static IP migration. Note that to enable static IP migration, administrators will need to include the KVP driver and daemon available in FreeBSD 10.0 ports for Hyper-V.
Instructions to install FreeBSD 10.0 ports for Hyper-V are available here:
Known issues and workaround
- 1) Hyper-V integration services are not activated in i386 release of FreeBSD 10.0 - Due to an oversight during the development process, Hyper-V integration services will not get activated by default while creating an i386 FreeBSD virtual machine. To activate the drivers please execute the following steps:
- Modify or create loader.conf by using the following commands in a FreeBSD shell window:
echo "# Loader labels for Hyper-V drivers -do not modify" >> /boot/loader.conf echo "hv_vmbus_load=\"YES\"" >> /boot/loader.conf echo "hv_utils_load=\"YES\"" >> /boot/loader.conf echo "hv_storvsc_load=\"YES\"" >> /boot/loader.conf echo "hv_netvsc_load=\"YES\"" >> /boot/loader.conf echo "hv_ata_pci_disengage_load=\"YES\"" >> /boot/loader.conf
- Add UUIDs for all devices listed in fstab. The UUIDs need to be added because the device names may change once the Hyper-V storage integration service is installed on FreeBSD. Once the device names change, corresponding entries in the fstab get invalidated. The integrity of the fstab can be maintained by replacing the device names by UUIDs. The following steps outline this procedure. Please bear extreme precaution while performing these steps. You are strongly recommended to make a backup copy of your fstab before proceeding.
- Check fstab contents
# cat /etc/fstab # Device Mountpoint FStype Options Dump Pass# /dev/ada0p2 / ufs rw 1 1 /dev/ada0p3 none swap sw 0 0If fstab does not contain the UUIDs for every device already then note down the device names. In the above example we observe that the root device name is **ada0p2** and the swap device name is **ada0p3**. - Identify the UUIDs for freebsd-ufs and freebsd-swap using the "gpart list" command
# gpart list | grep -A 11 'ada0p2\|ada0p3' | grep 'rawuuid\|type\|Name' Name: ada0p2 rawuuid: d1241bc9-1b9e-11e3-8dae-00155ddc3f35 rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b type: freebsd-ufs Name: ada0p3 rawuuid: d126e943-1b9e-11e3-8dae-00155ddc3f35 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b type: freebsd-swapAs can be observed, the UUID (rawuuid) for **ada0p2** is **d1241bc9-1b9e-11e3-8dae-00155ddc3f35** and the UUID for **ada0p3** is **d126e943-1b9e-11e3-8dae-00155ddc3f35**. - Replace device names in fstab with the UUIDs identified in step (b) as follows:
# vi /etc/fstab # Device Mountpoint FStype Options Dump Pass# /dev/gptid/d1241bc9-1b9e-11e3-8dae-00155ddc3f35 / ufs rw 1 1 /dev/gptid/d126e943-1b9e-11e3-8dae-00155ddc3f35 none swap sw 0 0
- Check fstab contents
- Modify or create loader.conf by using the following commands in a FreeBSD shell window:
Reboot your system to ensure that the UUIDs are functional. In case you make a mistake, you can restore your fstab by mounting the partition under a different FreeBSD system. Hopefully the backup created before beginning this sequence of steps will help now.
News
Microsoft announces Hyper-V support for FreeBSD, August 9, 2012
Source code
- Hyper-V drivers are included with FreeBSD 10:
Git repository, http://freebsdonhyper-v.github.com/,
Instructions for building the code via patchset outside of git checkout, by Chris Knight
Contacts
FreeBSD
Microsoft
BSD Integration Services Team, bsdic@microsoft.com

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
