Resolve Virsh The KVM virtual machine cannot be restarted and shut down

Source: Internet
Author: User


Virsh can reboot or close the corresponding virtual machine through reboot, shutdown. Since the host controls the power of the virtual machine by sending an ACPI directive, if the guest system does not have an ACPI server installed or the server does not start, then the virtual machine will not be restarted or closed, and only destroy is used to force the shutdown.

Install Acpid Service

CentOS System

Yum Install Acpid

Ubuntu system

Apt-get Install Acpid

Boot auto Start

Chkconfig Acpid on

Start a service

/etc/init.d/acpid start

If you start the Acpid service error, you will need to restart the guest system.

Another kind of article

1 command line Virsh reboot Vm-name
KVM still does not support the reboot command, ' reboot ' is not supported by the hypervisor

2 Virtual machine Internal reboot operation is unsuccessful, the state is shutdown, reboot failed.

Reason configuration file:

......

<on_poweroff>destroy</on_poweroff>

<on_reboot>restart</on_reboot>

<on_crash>destroy</on_crash>

......

Where the <on_reboot> option is set to restart, the reboot is executed inside the virtual machine but not shut down, and if set to destroy, the direct shutdown is performed after the reboot command is executed.

More parameter settings can refer to Liibvirt official website Http://libvirt.org/drvqemu.html#xmlconfig

3 KVM Environment can use the shutdown command to let virtual machine, but not effective.
Virsh shutdown Vm-name
Because the shutdown is implemented through the ACPI Power management interface
3.1 This option is required in the first configuration file
<features>
<acpi/>
<apic/>
<pae/>
</features>
3.2 Within the virtual machine requires ACPI services and runs
Windowns virtual machines are typically installed and running by default
Linux virtual machines such as Ubuntu virtual machines if ACPI service is not installed,
The virtual machine responds to the shutdown command by performing the Apt-get install Acpid installation and starting the service first

In this way, through the Ubuntu Server 10.04.2,redhat6.0 Enterprise Edition, Windows XP SP3, Windows Server2003 operating system verification can achieve a natural shutdown.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.