May 24
FreeBSD on Microsoft Hyper-V
So I’ve been looking into the problem of getting FreeBSD running on Microsoft Hyper-V the last few days and then yesterday I finally got it working.
Apparently people have been quite upset that Hyper-V only offered support for Windows based systems and Linux SuSE systems, which is obviously not very bright or community friendly – to be quite honest I would rather use WMWare due to the very few *nix systems Hyper-V officially supports.
However you can’t always pick and choose, and in this particular situation – I couldn’t either! So I had to get it working, so first I tried FreeBSD 7.0 RELEASE with a bootonly .iso and tried to mount that in the virtual machine – however the only thing I got out of that was a disc trying to boot but failing almost immediately with the message:
“Can’t load kernel”
So I tried FreeBSD 6.3 STABLE instead since it was obviously due to the kernel loading with FreeBSD 7.0. But again – no luck and just the same message:
“Can’t load kernel”
So finally I tried FreeBSD 8.0 CURRENT and to my great surprise – this would actually boot and let me install. However there are a few quirks that I haven’t worked out yet. Like the fact that FreeBSD apparently doesn’t detect the network interface given to it by Hyper-V – something that is somewhat of a huge problem.
So anywho – FreeBSD 8.0 CURRENT works with Microsoft Hyper-V… so for all you people I’ve seen with this problem, use FreeBSD 8.0 for your install.
I’ll write more when I’ve done some more extensive benchmarking and configuration.


June 2nd, 2008 at 2:50 pm
I can not download ISO image of 8.0 current. Do you have a link toa site where I can download an ISO image of 8.0 current which is installing on Hyper-V? And how about the network card?It is also not working in CuSe 10 Enterprise SP2? Any ideas how to resolve this with FreeBSD?Thank you in advance
June 2nd, 2008 at 9:31 pm
Hello Lucky Michael,
A FreeBSD 8.0 snapshot can be downloaded here:
ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/200805/8.0-CURRENT-200805-i386-disc1.iso
ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/200805/8.0-CURRENT-200805-i386-disc2.iso
Or bootonly:
ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/200805/8.0-CURRENT-200805-i386-bootonly.iso
I haven’t tested the network card yet, so I simply just don’t know yet – but I’ll probably blog about it when I get it working. However I’m fairly sure it’ll work natively with SuSE 10 Enterprise.
So just RSS the blog and I’ll probably write about it within the next month (I need to get rid of a few exams first)..
With regards
Michael Lind Mortensen
http://www.scepticalmind.com/
June 5th, 2008 at 9:00 pm
FYI – Theproblem ith installing FrBS wa only with 64bit version! ILast night I have tryed the 32 bit version and it has worked prefect – 7.0 Stable. So now I have the same problem as you – network card is not recognisedAlso any help from you in this direction will be highly appreciaed! Than you in advance!
June 24th, 2008 at 9:39 pm
Hi,
I tried 7 i386 on lastest hyperv and no go. I get the same error as you. Cannot load kernel. I was gonna try 8 but if no network card then no point
I guess I will try virtual pc and see if it works on that. Can’t really dedicate an entire machine to freebsd where I work at
June 25th, 2008 at 2:20 pm
I’m going to be working more with this issue the next few weeks – so I’ll probably get the network card working. It’s simply a matter of time!
June 27th, 2008 at 2:54 pm
I get FreeBSD-7-STABLE-200806 successfully working with Hyper-V (RTM). Early I get the same error as you – “network card is not recognised”. But now I have solution and it is really easy to fix this trouble. All that you need is to remove your current virtual emulated network adapter whithin your VM settings for virtual FreeBSD and to add new one, called “Legacy Network Adapter” – that’s all tricks! After that you’ll get recognised and working network adapter under Virtual FreeBSD 7 on Hyper-V (it will be called like “de0″ or something like this
) Good Luck!!!
June 29th, 2008 at 1:05 pm
The legacy adapter gets dhcp under 7-STABLE, but is not pingable. The de0 adapter is seen as down.
June 30th, 2008 at 9:46 am
2 Mikael Hugo
You need to check your VM & BSD settings.
But also – where do you see Server using DHCP for self network configuration? If your DHCP server goes down – your servers stop answering and your network goes down. If dhcp still not working for you try to use static IP address for your bsd server…
June 30th, 2008 at 6:57 pm
Also I have a deeper look at the documentations and VM settings, and it seems to me I have discovered the answer. Emulated “Network Adapter” used by default are also called “synthetic” and it will work ONLY AFTER installing VM Integration Services (which is only available for an officially supported OSes, FreeBSD currently are not in that list and does not have it). So, for us, there is only one chance to have network under FreeBSD is to use “Legacy Network Adapter”. Microsoft also propose to use it if you need a PXE supported network adapter for all officially supported OSes. And MS says that “Legacy Network Adapter” are slower than “synthetic”. I’ve checked this and here the result: “Synthetic NIC” speed is equal to 1Gbps and “Legacy” – 100Mbps.
July 2nd, 2008 at 2:39 pm
If you want FreeBSD 7.0 to work you need to use Legacy network adapter – you should first remove the one that Hyper-V wizard adds when you create virtual machine. And somehow FreeBSD does not get IP from your DHCP server – I solved this issue by setting static IP to the FreeBSD. You can check how to do that on my website http://luka.manojlovic.net
July 3rd, 2008 at 8:36 pm
Actually the DHCP problem is easy to solve.. Just force the device down “ifconfig de0 down”, then up again “ifconfig de0 up” and then just use dhclient “dhclient de0″. For some non-obvious reason, this works.. while just doing “ifconfig de0 up; dhclient de0″ or “dhclient de0″ does not.
Have any of you run into the problem of FreeBSD virtual machines not shutting down correctly and just stalling on “Stopping” for.. well ever.. until you restart Hyper-V.? I’m afraid to turn off my virtual machines
July 4th, 2008 at 12:19 pm
Yes, I have the same “Stopping” as you and have no idea how to fix it.
July 8th, 2008 at 4:49 pm
Are you using the beta-release or the newly released version? I’m currently using the beta, because I have servers that I can’t just shut down right now, so I have to wait a bit before updating – but if you’ve tried with an updated version and it still doesn’t work, then there’s probably a problem with using that specific FreeBSD version. When I used FreeBSD 8.0 I don’t remember having any of these issues.
August 9th, 2008 at 6:03 pm
Just discovered something kinda funny!
This is what Ziad Elmalki wrote here:
”
Hi,
I tried 7 i386 on lastest hyperv and no go. I get the same error as you. Cannot load kernel. I was gonna try 8 but if no network card then no point
I guess I will try virtual pc and see if it works on that. Can’t really dedicate an entire machine to freebsd where I work at 
”
The funny part: “Where I work at
” – I just found out Ziad works for Microsoft, he’s Software Development Engineer at Microsoft. Ziad, if you’re reading this, can’t you pull some strings and get native support for FreeBSD on Hyper-V
?
August 30th, 2008 at 2:41 am
I just finished installing FreeBSD on my system. Here’s how it went.
Couldn’t boot off of 7.0-RELEASE, so I used a 7.0-STABLE snapshot (2008-07). Even after setting up the the legacy network card, it couldn’t see the network, so I had to use the full CD (couldn’t use network install). No network means no package list as well. Otherwise, the install went smoothly.
On boot, the network wasn’t working correctly, and I got no DHCP responses. Static network configuration didn’t work either, and after a while I started getting “buffer full” messages back from ping. I did “ifconfig de0 down;ifconfig de0 up” and suddenly the network started functioning correctly, so I added that to my startup script before the call to dhclient. Unfortunately, it isn’t very long before the network goes down again.
December 16th, 2008 at 9:28 pm
You can install FreeBSD 6.4, 7.1 RC1, Current 8.0 in Hyper-V. In order to do it you need to apply special patch to kernel. And by the way network card will work with DHCP. Read here how to do it http://blogs.technet.com/abeshkov/archive/2008/12/15/3169299.aspx
December 26th, 2008 at 5:53 pm
Hey, genius, see the western characters on this site? That means we speak english. That link you provided? Yea, that’s not English. How about something in non-Cyrillic characters?
June 11th, 2009 at 10:20 am
Google Translate?
http://translate.google.com/translate?hl=en&sl=ru&u=http://blogs.technet.com/abeshkov/archive/2008/12/15/3169299.aspx&ei=FcwwSs_MDsagjAf31YzYBw&sa=X&oi=translate&resnum=1&ct=result&prev=/search%3Fq%3Dhttp://blogs.technet.com/abeshkov/archive/2008/12/15/3169299.aspx%26hl%3Den