Whats the difference between virsh destroy and virsh undefine
Whats the difference between virsh destroy and virsh undefine
I am new to servers and vms wanted to know the difference between
virsh destroy
and
virsh undefine
Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See What topics can I ask about here in the Help Center. Perhaps Super User or Unix & Linux Stack Exchange would be a better place to ask.
– jww
Jun 29 at 10:19
2 Answers
2
The virsh destroy
command initiates an immediate ungraceful shutdown
and stops the specified guest virtual machine. Using virsh destroy
can
corrupt guest virtual machine file systems. Use the virsh destroy
command only when the guest virtual machine is unresponsive. The virsh
command with the
destroy--graceful
option attempts to flush the cache
for the disk image file before powering off the virtual machine.
virsh destroy
virsh destroy
virsh destroy
virsh
destroy
--graceful
virsh delete
@ access.redhat.com
virsh delete
The virsh undefine
domain command undefines a domain. If domain is inactive, the
configuration is removed completely. If the domain is active
(running), it is converted to a transient domain
. When the guest
virtual machine becomes inactive, the configuration is removed
completely.
virsh undefine
transient domain
virsh undefine
@ access.redhat.com
virsh undefine
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-virsh-delete
Undefine - undefines the configuration for the Virtual Machine. However, if there is any VM running with the configuration, the configuration is not removed immediately but is deffered till all the VM's with that configuration are removed. Imagine a configuration template that you are using to create your Virual Machine i.e. (Storage Required, Memory, CPU required etc). Once deleted you won't be able to create any new VM with that template.
The virsh undefine domain [--managed-save] [storage] [--remove-all-storage] [--wipe-storage] [--snapshots-metadata] [--nvram] command undefines a domain.
Destory - Is as good as killing your virtual machine.
The virsh destroy command initiates an immediate ungraceful shutdown and stops the specified guest virtual machine.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
why did you tag python to this? have you checked the manual pages for the comand? I found this on the net: docs.oracle.com/cd/E19053-01/ldoms.mgr10/820-3838-10/…
– dopstar
Jun 29 at 9:36