Christian Gagneraud
2013-Nov-13 21:53 UTC
[libvirt-users] How to tell libvirt not to use qemu "accel=kvm" for a FreeBSD guest
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? regards, Chris
Christian Gagneraud
2013-Nov-13 23:48 UTC
Re: [libvirt-users] How to tell libvirt not to use qemu "accel=kvm" for a FreeBSD guest
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 >
Daniel P. Berrange
2013-Nov-14 09:28 UTC
Re: [libvirt-users] How to tell libvirt not to use qemu "accel=kvm" for a FreeBSD guest
On Thu, Nov 14, 2013 at 12:48:51PM +1300, Christian Gagneraud wrote:> 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!FYI you don't need to undefine+define - you can just use 'virsh edit <name>' to change it interactively in vi / emacs / etc Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Eric Blake
2013-Nov-14 14:11 UTC
Re: [libvirt-users] How to tell libvirt not to use qemu "accel=kvm" for a FreeBSD guest
On 11/13/2013 02:53 PM, 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 > > > 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=...I'm glad that you were able to figure out how to work around it in the meantime, and how to let libvirt force slower TCG emulation. Meanwhile, you should still report this bug to the qemu folks; it is a qemu bug that KVM mode isn't able to run a guest when TCG mode manages just fine. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Christian Gagneraud
2013-Nov-14 23:52 UTC
Re: [libvirt-users] How to tell libvirt not to use qemu "accel=kvm" for a FreeBSD guest
On 15/11/13 03:11, Eric Blake wrote:> On 11/13/2013 02:53 PM, 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 >> >> >> 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=... > > I'm glad that you were able to figure out how to work around it in the > meantime, and how to let libvirt force slower TCG emulation. Meanwhile, > you should still report this bug to the qemu folks; it is a qemu bug > that KVM mode isn't able to run a guest when TCG mode manages just fine.OK, will do, with ref to this thread. Thanks, Chris
Apparently Analagous Threads
- Re: How to tell libvirt not to use qemu "accel=kvm" for a FreeBSD guest
- How to tell libvirt not to use qemu "accel=kvm" for a FreeBSD guest
- Re: How to tell libvirt not to use qemu "accel=kvm" for a FreeBSD guest
- TXTSETUP.OEM and CD-ROM?
- [PATCH] nv50/accel: Fix mangled A8+A8 shader.