Mud: shutdown and enabling KVM virtual machines

Source: Internet
Author: User

This article was sponsored by Xiuyi linfeng and first launched in the dark world.

When we enable or disable a KVM Vm, we usually use commands such as start, shutdown, and reboot. However, sometimes we find that the VM does not respond when the shutdown or reboot command is used to shut down or restart the VM, in this case, we may use destroy for brute force shutdown.

Why does this happen? After querying relevant information, we found that these commands sent an ACPI command to the KVM Virtual Machine to perform operations on the virtual machine.

When the KVM virtual machine is installed by default, especially the Linux virtual machine, the ACPI service is not installed, so the virtual machine does not perform the corresponding actions on these commands.

For these commands, we can find them in the configuration file of the KVM virtual machine:

<On_poweroff> destroy </on_poweroff>

<On_reboot> restart </on_reboot>

<On_crash> restart </on_crash>

For more information about ACPI, see the configuration file of the KVM virtual machine, as shown below:

<Features>

<ACPI/>

<APIC/>

<PAE/>

</Features>

To implement these commands, install the ACPI service on the KVM Virtual Machine and start the service.

Currently, the ACPI service has been installed and started in the Windows system by default in the KVM Virtual Machine. Therefore, you only need to install the ACPI service in Linux. As follows:

Yum-y install acpid

After the ACPI service is installed, start the ACPI service. We can use shutdown, reboot, and other commands on the KVM server to shut down and restart the VM.

 

Related Article

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.