User Tools

Site Tools


unix:virtualization:virtlib:winvirtuals

This is an old revision of the document!


Windows Virtuals

Shutdown and Reboot don't work

If you can not issue the command

virsh shutdown domname

where domname is a running domain, the problem may be that the QEMU guest agent is either not installed on your Windows virtual, or the configuration for the domain on your hypervisor is not set up.

This assumes you are using the QEMU guest agent which is installed by default when you use the virtio-win drivers.

First, verify that is the problem by issuing

virsh shutdown domname --mode agent

where domname is, again, a running virtual. This forces virsh to try the shutdown only using the QEMU agent, and it will give you an error if it can not do so. On my tests, the error was:

error: argument unsupported: QEMU guest agent is not configured

which translates to Your configuration file does not have the necessary information to do this.

In this case, edit the configuration manually with the command

virsh edit domname

then find the line which reads </device> (the final line of the device section). Insert the following block above that line (keeping it in the <device> </device> section.

    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/<guest-name>.agent'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
    </channel>

NOTE change <guest-name> to the name of the virtual. Do not leave it as <guest-name>.

Save your changes.

Now, log into the virtual and manually shut it down (do not restart, shut down). Back on the hypervisor, start the virtual back up.

Now, running

virsh shutdown domname

should properly shut down the domain.

unix/virtualization/virtlib/winvirtuals.1683255218.txt.gz · Last modified: 2023/05/04 21:53 by rodolico