On 14/11/13 10:53, Christian Gagneraud wrote:
Hi there,
I have used qemu to install FreeBSD 9.2 release, and i can boot it fine
with:
$ qemu-system-x86_64 -hda images/FreeBSD-9.2-RELEASE-amd64.img
I then made virsh aware of my brand new VM (see attached XML), but when
i run it via virsh, It hangs after the bootloader whith this message:
Booting...
CPU doesn't support long mode
From the log, here is the generated qemu command:
LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
/usr/bin/qemu-system-x86_64 -name fbsd92-amd64 -S -machine
pc-i440fx-1.5,accel=kvm,usb=off -m 512 -realtime mlock=off -smp
1,sockets=1,cores=1,threads=1 -uuid 11ae165e-b8a2-5083-fb77-37c0042725bf
-nographic -no-user-config -nodefaults -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/fbsd92-amd64.monitor,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc
-no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive
file=/home/christiaga/projects/vms/images/FreeBSD-9.2-RELEASE-amd64.img,if=none,id=drive-ide0-0-0,format=raw
-device
ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1
-netdev tap,fd=24,id=hostnet0 -device
rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:9c:94:3b,bus=pci.0,addr=0x3
-chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0 -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
After many attempts, I pinned down the problem. To be able to boot the
machine with the above command, I had to remove:
* the accel=kvm in -machine
* the -S (to "autostart" the VM)
And change the -net tap,fd=24 to -net user,id=...
So basically, the only thing i would like to tell libvirt is not to use
accel=kvm, i guess the FreeBSD kernel is missing some feature (is it
this PAE thing?)
Does anyone how can i tell libvirt to do that?
Answering myself, replace <domain type='kvm'> with <domain
type='qemu'>,
virsh undefine <label>, virsh define <xml-file>, et voila!
So far it seems to do the job, at least It boots, now i'm configuring
the network, finger crossed! ;)
Chris
regards,
Chris