My system looks like this:
1) Install qemu from /usr/ports/emulators/qemu
2) Load following 2 modules:
3) Get iso of the guest OS, in my case its FreeBSD so I got one from:
4) Create qemu image: (‘man 1 qemu-img’ for more information)
Then I tried to launch it with: (‘man 1 qemu’ for more information)
Listing a few to help the web-crawler which intern helps some lost soul like me:
“CPU doesn’t support long mode”
“Can’t work out which disk we are booting from…”
“panic: free: guard1 fail @ …”
Asking “the Internet” helped me narrow down the root causes to following:
1) 32 bit host cannot have 64 bit guest – which was not the case for me.
2) Machine should be virtualization capable – it is.
from /var/run/dmesg.boot, it should have VMX or SVM under “Features”.
3) Virtualization support should be enabled in bios – it was enabled.
4) Use of incorrect qemu binary – that was the culprit.
“qemu” has different binary versions depending on the platform/systems:
Using following I could successfully launch the guest FreeBSD instance:
On this first launch, it does FreeBSD install from the specified iso to the .img file. This is a typical FreeBSD installation process.
One the installation is done, you I could launch the VM via: