virt-manager can't stop VM

Bug #228690 reported by Christopher Nelson
4
Affects Status Importance Assigned to Milestone
virt-manager (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: virt-manager

After creating a new virtual machine, there was no cd-rom attached (I filed another bug since I specified an .ISO during VM creation). Since the HDD was empty, the system was unable to boot. Well enough so far.

Realizing that it didn't see the ISO, I tried to stop the VM so that I could manually add a new CD-ROM device. I clicked shutdown repeatedly, but nothing happened. I clicked pause, and the VM was paused sucessfully. Then I clicked shutdown. Still nothing. I resumed the machine, it continued to run. I tried shutdown again, still nothing.

I have this same problem on all my virtual machines. Shutdown basically doesn't work.

In fact, virt-manager with kvm basically doesn't work. Since ubuntu-xen-desktop is not installable and virtual-box-ose doesn't run 64-bit clients, kvm was my last open-source recourse. Apparently virtualization in 8.04 x86_64 is completely broken.

ProblemType: Bug
Architecture: amd64
Date: Fri May 9 10:11:42 2008
DistroRelease: Ubuntu 8.04
Package: virt-manager 0.5.3-0ubuntu10
PackageArchitecture: amd64
ProcEnviron:
 SHELL=/bin/bash
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
SourcePackage: virt-manager
Uname: Linux 2.6.24-17-generic x86_64

Tags: apport-bug
Revision history for this message
Christopher Nelson (nadiasvertex) wrote :
Revision history for this message
Nick Barcet (nijaba) wrote : Re: [Bug 228690] [NEW] virt-manager can't stop VM

Could you please try to use "Destroy" instead of "shutdown". The
default behavior is for shutdown to send an ACPI event to the machine so
that it gracefully shutdowns. In your case, I beleive that the vm was
not in a state that would have allowed it to be answering to such event
and "Destroy" is what you needed to stop your vm.

  status incomplete

Changed in virt-manager:
status: New → Incomplete
Revision history for this message
Christopher Nelson (nadiasvertex) wrote :

Destroy turns the machine off but:

(1) It is not clear that that is a good thing to do from the warnings and the fact that the functionality is "hidden" beneath a contect menu instead in the console.
(2) After choosing destroy I can no longer restart the VM. I get errors saying the the VNC failed to connect. I can reproduce this problem at will.

Revision history for this message
Nick Barcet (nijaba) wrote :

Can you please specify which OS you are installing?
Destroy acts for me as a "pull the plug" equivalent. It is not recommended to do so, but rarely causes fatal damage to the vm.

Revision history for this message
Christopher Nelson (nadiasvertex) wrote : Re: [Bug 228690] Re: virt-manager can't stop VM
  • unnamed Edit (844 bytes, text/html; charset=ISO-8859-1)

WIndows 2003 x64 Standard

On Sun, May 11, 2008 at 12:42 PM, Nick Barcet <email address hidden>
wrote:

> Can you please specify which OS you are installing?
> Destroy acts for me as a "pull the plug" equivalent. It is not recommended
> to do so, but rarely causes fatal damage to the vm.
>
> --
> virt-manager can't stop VM
> https://bugs.launchpad.net/bugs/228690
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
peterh (peter-holik) wrote :

For Linux do apt-get install acpid inside your VM and shutdown will work

cu Peter

Revision history for this message
Dimitrios Symeonidis (azimout) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you try with the latest Ubuntu release? Thanks in advance.

Revision history for this message
xteejx (xteejx) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in virt-manager (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Confirmed that it doesn't work on precise, acpid is installed on the guest and ACPI is enabled.

Changed in virt-manager (Ubuntu):
importance: Undecided → Medium
status: Invalid → Confirmed
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

and the guest is running precise as well.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hi Timo,

thanks for the information. Are you able to stop the VM using 'virsh destroy <vm-name>'?

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hey Serge, yes that does bring the machine down, 'virsh shutdown foo' doesn't.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks, Timo.

In that case, marking this as affecting libvirt.

If you run 'virsh dumpxml <vm-name> | grep acpi', do you see

   <features><acpi/></features>

?

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Yep, can see that. Also, I was able to shut down a fedora 15 vm, so could it actually be an issue in the client distro itself?

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I do get a log message saying "acpid: clientXXX[0.0] has disconnected" when triggering the shutdown.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Ok, this is actually a bug or a feature in the acpi events scripts. (at least on the vm i was trying to reproduce on).

/etc/acpi/powerbtn.sh exits doing nothing if gnome-settings-daemon is running. If I kill gnome-settings-daemon in the guest, then quickly do 'virsh shutdown <guest>', the guest shuts down cleanly.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I was about to mark this as affecting both the acpid and gnome-settings-daemon packages, but I've not had a chance to verify whether those are properly offering a 'shut down?' popup. If they do, then this isn't a bug.

If you install an ubuntu server as the guest, and install acpid (which won't be installed by default), then virsh shutdown does appear to work. You could also edit /etc/acpi/powerbtn.sh to not do the check for 'pidof PMS', but rather always call shutdown.

Please let us know if one of these works.

Changed in virt-manager (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

(Set to incomplete while awaiting response - after reponse, we can either (a) mark this bug invalid, (b) mark it back confirmed if it turns out that the acpi event is really not being sent to the VM, or (c) target the bug at acpid to request a new feature in the form of a better way to ensure shutdown when the power button is pressed.)

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Ok, i'll set it back to invalid.

The problem is this: lightdm doesn't show the popup about the power button being pressed, like it does if a user is logged in. This also happens on real hw if you press the powerbutton when you're in the login screen. So it's a bug in lightdm I guess.

Changed in virt-manager (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Quoting Timo Aaltonen (<email address hidden>):
> Ok, i'll set it back to invalid.
>
> The problem is this: lightdm doesn't show the popup about the power
> button being pressed, like it does if a user is logged in. This also

Ah. Thanks for that info.

> happens on real hw if you press the powerbutton when you're in the login
> screen. So it's a bug in lightdm I guess.

Shall we target this bug at lightdm then?

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I'll file a new bug against lightdm, and add a link to this one.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

> I'll file a new bug against lightdm, and add a link to this one.

Thanks very much.

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.