kvm - guest freebsd 7 - reboot problems

Bug #239107 reported by Savvas Radevic
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KVM
Unknown
Unknown
kvm (Ubuntu)
Invalid
Undecided
Unassigned
libvirt (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: kvm

Ubuntu hardy heron 8.04 amd64
I've used this guide to get my virtualization kit: https://help.ubuntu.com/community/KVM

KVM backend, libvirt-bin toolbox and virt-manager as the graphical manager.
I have installed successfully the FreeBSD 7.0-RELEASE as a guest operating system.

The problem appears to be when rebooting the machine, specifically:
a) After the installing FreeBSD using the 7.0-release iso image. Upon finishing the FreeBSD installation (default values), I exited the installation and the machine was rebooted. I noticed the error.
b) If I execute the reboot command within the guest operating system, the machine reboots and I notice the same error.

The error is:
"hptrr: no controller detected
Trying to mount root from ufs:/dev/ad0s1a
Manual root filesystem specification:
 <fstype>:<device> Mount <device> using filesystem <fstype> e.g. ufs:da0s1a
 ? List valid disk boot devices
 <empty line> Abort manual input"

I don't know if it's related, but I also cannot reboot using the virsh reboot command:
$ virsh --connect qemu:///system reboot freebsd
Connecting to uri: qemu:///system
libvir: error : this function is not supported by the hypervisor: virDomainReboot
error: Failed to reboot domain freebsd

The shutdown command does not work. When I execute the libvirt shutdown command:
$ virsh --connect qemu:///system shutdown freebsd
Connecting to uri: qemu:///system
Domain freebsd is being shutdown
...but the virtual machine does not shutdown.

The only thing that helps in this case is to destroy (kill) the virtual machine, and start it again.
$ virsh --connect qemu:///system destroy freebsd
Connecting to uri: qemu:///system
Domain freebsd destroyed
$ virsh --connect qemu:///system start freebsd
Connecting to uri: qemu:///system
Domain freebsd started
...now the virtual machine works

Attached the screenshots of the two cases.

Revision history for this message
Savvas Radevic (medigeek) wrote :
Revision history for this message
Savvas Radevic (medigeek) wrote :
Revision history for this message
Steven Wagner (stevenwagner) wrote :

Im having the same problem, only it doesnt work after a destroy. I just repeatedly get the same failure as you have listed above.

Revision history for this message
Roman Yepishev (rye) wrote :

Same problem with FreeBSD 6.2 and FreeBSD 7.0 even with the latest kvm-76. This does not happen with regular qemu though so it must be a bug in KVM.

Shutdown does not help because no ACPI daemon is running in the guest OS, domain reboots are not supported by libvirtd as of 0.4.4 so these problems are not related to the original bug.

Revision history for this message
Roman Yepishev (rye) wrote :
Revision history for this message
Savvas Radevic (medigeek) wrote :

Now, when I execute "reboot" command it shuts down the virtual machine but doesn't reboot it again :(

Revision history for this message
Savvas Radevic (medigeek) wrote :

$ apt-cache policy kvm qemu
kvm:
  Installed: 1:72+dfsg-1ubuntu6
  Candidate: 1:72+dfsg-1ubuntu6
  Version table:
 *** 1:72+dfsg-1ubuntu6 0
        500 http://archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status
qemu:
  Installed: 0.9.1-5ubuntu3
  Candidate: 0.9.1-5ubuntu3
  Version table:
 *** 0.9.1-5ubuntu3 0
        500 http://archive.ubuntu.com intrepid/universe Packages
        100 /var/lib/dpkg/status

Changed in kvm:
status: New → Confirmed
Revision history for this message
Roman Yepishev (rye) wrote :

The only workaround I fount so far is to start KVM with -no-kvm-irqchip option. In this case FreeBSD VMs handle reboots properly. I have added info about this to the upstream bug report.

Revision history for this message
Savvas Radevic (medigeek) wrote :

thanks, I'll try it out during the weekend :)

Revision history for this message
Roman Yepishev (rye) wrote :

This bug is FIXED in KVM-80.

I guess these entries from the Changelog has something to do with the actual fix:

- fix in-kernel ioapic reset (Jan Kiszka)
  - fixes guest reboot failures
- fix -no-kvm apic with smp (Jan Kiszka)

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I'm marking this bug 'invalid' against kvm, and triaging it against libvirt.

This is a known, wishlist item against libvirt upstream. There are some people at IBM looking at this. Stay tuned...

:-Dustin

Changed in kvm:
status: Confirmed → Invalid
Changed in libvirt:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Basically, this is stated in the error message:

libvir: error : this function is not supported by the hypervisor: virDomainReboot

That function has not been implemented for KVM.

:-Dustin

Revision history for this message
Savvas Radevic (medigeek) wrote :

That's the "fix" they applied? Oh well, at least we know it's not supported. :)

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 239107] Re: kvm - guest freebsd 7 - reboot problems

On Fri, Feb 20, 2009 at 5:27 PM, Savvas Radevic <email address hidden> wrote:
> That's the "fix" they applied? Oh well, at least we know it's not
> supported. :)

Well, it's not fixed yet, but they're working on it in libvirt. It's
just not something that should be fixed in kvm itself.

:-Dustin

Revision history for this message
Savvas Radevic (medigeek) wrote :

OK, thanks for the clarification!
Go IBM guys go! :)

Revision history for this message
Roman Yepishev (rye) wrote :

This bug may be closed since Ubuntu Karmic comes with qemu-kvm-0.11.0 released way after KVM-80 which fixed the original problem.
The bug report for libvirt not supporting domain reboots is filed under Bug #368962

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Closing per the user's comment.

Changed in libvirt (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.