FreeBSD on Windows Azure VMs (en)

I did a presentation on September 8, 2012 in Japan Windows Azure User Group(JAZ), about running FreeBSD VM on Windows Azure VMs.


Because the driver for Hyper-V because of FreeBSD was released on August 17 . So, this blog entry is the experiment and a joke. ;-)

How to install FreeBSD on local Hyper-V server

FreeBSD VM install in the same way as a normal guest OS on Hyper-V using FreeBSD 8.2 ISO.

Notes are as follows:

  • Until you install the Hyper-V driver, you must use the legacy network adapter.
  • If you are using Windows Server 2012, virtual hard disk must use the VHD format.



How to install Hyper-V driver for FreeBSD

Hyper-V drivers for FreeBSD get from GitHub.

Retrieve the FreeBSD code with the HyperV drivers from github.
# cd /usr
# git clone


Build the Kernel
# cd /usr/freebsd
# make buildkernel KERNCONF=HYPERV_VM 


If error occured at buildkernel, retry after “make buildworld”.


Install the Kernel
# make installkernel KERNCONF=HYPERV_VM


After installkernel, edit a /etc/fstab and  reboot a FreeBSD VM. If /etc/fstab is wrong, you started with select the correct partition in the boot menu.


After driver installation, Hyper-V normal adapter is available with hn0 interface on FreeBSD.


If using DHCP, you must configured to use SYNCDHCP as follows:




This completes the basic settings. You can setup the server and application freely.

Upload vhd and create Windows Azure VMs

After setup the server, You must upload VHD file using CSUpload command in Windows Azure SDK to Windows Azure Storage from local PC before create a Windows Azure VMs.

csupload Set-Connection "SubscriptionId=<subscriptionID>; CertificateThumbprint=<Thumbprint>; ServiceManagementEndpoint="
csupload Add-PersistentVMImage -Destination "http://<blob URL>/vhds/freebsd.vhd" -Label "FreeBSD" -LiteralPath "freebsd.vhd" -OS Linux


Notes: Current version of csupload Add-PersistentVMImage command is support  the “Windows” or “Linux” OS argument. I think the case of FreeBSD is better to specify the “Linux”.

Final step, create VM from gallery in Windows Azure VMs with management portal site.


Notes: “virtual machine name” and “new user” in VM Configuration is not supported, because does not running WALinuxAgent on FreeBSD VM.

Your VM will start with a short time after creating virtual machine.



Congrats!  You will be able to connect to SSH and other services to FreeBSD VM on Windows Azure VMs.




Issue: Status of VM is “Provisioning” for a long time (ex. 2 days). :-(



See also

Japanese materials:


以下に詳細を記入するか、アイコンをクリックしてログインしてください。 ロゴ アカウントを使ってコメントしています。 ログアウト /  変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト /  変更 )

%s と連携中