Difference between revisions of "Virsh destroy"
Jump to navigation
Jump to search
(Created page with "Ungraceful Shutdown but do not destroy data or VM but you can corrupt guest file systems <pre> virsh destroy VM_MACHINE_NAME Domain infrastructure destroyed </pre> <pre> v...") |
Tags: Mobile web edit, Mobile edit |
||
(30 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{lowercase}} | |
+ | <code>[[virsh]] destroy</code> ungraceful [[shutdown]]/stop your virtual machine. | ||
− | < | + | <code>virsh destroy YOUR_VM</code>will not [[destroy]] or delete your VM or data but you can corrupt guest file systems. <code>[[--graceful]]</code> flag attempts to flush the [[cache]] for the disk image file before powering off the virtual machine. To delete your virtual machine you will have to use <code>[[virsh undefine]]</code> command. |
− | virsh destroy | ||
− | |||
− | </ | ||
+ | * <code>[[virsh]] destroy [[--graceful]] VM_MACHINE_NAME</code> | ||
+ | virsh destroy VM_MACHINE_NAME | ||
+ | Domain infrastructure destroyed | ||
− | |||
− | |||
− | |||
+ | == Errors == | ||
* Error while destroying VM_MACHINE: | * Error while destroying VM_MACHINE: | ||
− | + | ||
− | virsh destroy VM_MACHINE_NAME | + | virsh destroy VM_MACHINE_NAME |
− | error: Failed to destroy domain VM_MACHINE_NAME | + | error: Failed to destroy domain VM_MACHINE_NAME |
− | error: Timed out during operation: cannot acquire state change lock (held by remoteDispatchDomainBlockJobAbort) | + | error: Timed out during operation: cannot acquire state change lock (held by [[remoteDispatchDomainBlockJobAbort]]) |
− | + | ||
− | * Review your log files: <code>/var/log/libvirt/qemu/</code>, <code>[[ | + | |
+ | virsh destroy VM_MACHINE_NAME-3 | ||
+ | error: Disconnected from qemu:///system due to keepalive timeout | ||
+ | error: Failed to destroy domain VM_MACHINE_NAME-3 | ||
+ | error: internal error: connection closed due to keepalive timeout | ||
+ | |||
+ | |||
+ | == Logs == | ||
+ | * Review your log files: <code>/var/log/libvirt/qemu/</code>, <code>[[virsh domblklist]]</code> output and try to restart [[libvirtd]]: <code>systemctl restart [[libvirtd]]</code> | ||
Line 27: | Line 34: | ||
VM_MACHINE.log:2018-11-20 08:00:38.835+0000: shutting down, reason=destroyed | VM_MACHINE.log:2018-11-20 08:00:38.835+0000: shutting down, reason=destroyed | ||
</pre> | </pre> | ||
+ | |||
+ | == Related terms == | ||
+ | * <code>[[virsh shutdown]] VM_NAME</code> | ||
+ | * <code>[[virsh reboot]] VM_NAME</code> | ||
+ | * <code>[[virsh undefine]] VM_NAME</code> | ||
+ | * <code>[[virt-install]]</code> | ||
+ | * [[virsh reset]] | ||
== See also == | == See also == | ||
* {{virsh}} | * {{virsh}} | ||
+ | * {{libvirtd}} | ||
+ | * {{virsh operations one line}} | ||
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:KVM]] | [[Category:KVM]] |
Latest revision as of 06:35, 18 October 2021
virsh destroy
ungraceful shutdown/stop your virtual machine.
virsh destroy YOUR_VM
will not destroy or delete your VM or data but you can corrupt guest file systems. --graceful
flag attempts to flush the cache for the disk image file before powering off the virtual machine. To delete your virtual machine you will have to use virsh undefine
command.
virsh destroy --graceful VM_MACHINE_NAME
virsh destroy VM_MACHINE_NAME Domain infrastructure destroyed
Contents
Errors[edit]
- Error while destroying VM_MACHINE:
virsh destroy VM_MACHINE_NAME error: Failed to destroy domain VM_MACHINE_NAME error: Timed out during operation: cannot acquire state change lock (held by remoteDispatchDomainBlockJobAbort)
virsh destroy VM_MACHINE_NAME-3 error: Disconnected from qemu:///system due to keepalive timeout error: Failed to destroy domain VM_MACHINE_NAME-3 error: internal error: connection closed due to keepalive timeout
Logs[edit]
- Review your log files:
/var/log/libvirt/qemu/
,virsh domblklist
output and try to restart libvirtd:systemctl restart libvirtd
- Logs:
/var/log/libvirt/qemu
VM_MACHINE.log:2019-04-18 07:53:30.584+0000: shutting down, reason=shutdown VM_MACHINE.log:2018-11-20 07:58:56.193+0000: shutting down, reason=crashed VM_MACHINE.log:2018-11-20 08:00:38.835+0000: shutting down, reason=destroyed
Related terms[edit]
virsh shutdown VM_NAME
virsh reboot VM_NAME
virsh undefine VM_NAME
virt-install
- virsh reset
See also[edit]
virsh
: Storage information, Connecting, Operations, Memory, Snapshots, Networking, CPU, release notes,virsh nodedev-list
- libvirtd:
systemctl status libvirtd
,systemctl status libvirt-guests
, Libvirt release notes, logs,libvirtd.conf
,/etc/libvirt/
,/var/log/libvirt/
- Changing VM running status operations:
start
,shutdown
,destroy
,reboot
,reset
,resume
Advertising: