Editing Virsh destroy

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{lowercase}}
+
Ungraceful Shutdown but do not destroy data or VM but you can corrupt guest file systems
<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.
+
<pre>
 +
virsh destroy VM_MACHINE_NAME
 +
Domain infrastructure destroyed
 +
</pre>
  
* <code>[[virsh]] destroy [[--graceful]] VM_MACHINE_NAME</code>
 
  
virsh destroy VM_MACHINE_NAME
 
Domain infrastructure destroyed
 
  
 +
<pre>
 +
virsh destroy VM_MACHINE_NAME --graceful
 +
</pre>
  
== Errors ==
 
 
* Error while destroying VM_MACHINE:
 
* Error while destroying VM_MACHINE:
+
<pre>
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)
+
</pre>
  
 
  virsh destroy VM_MACHINE_NAME-3
 
  virsh destroy VM_MACHINE_NAME-3
Line 24: Line 25:
  
  
== 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>
 
* 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 34: Line 35:
 
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}}
 
* {{virsh operations one line}}
  
 
[[Category:Linux]]
 
[[Category:Linux]]
 
[[Category:KVM]]
 
[[Category:KVM]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: