web-dev-qa-db-ja.com

virsh destroyとvirsh undefineの違いは何ですか

私はサーバーが初めてで、vmsの違いを知りたい

virsh destroy

そして

virsh undefine
1

man virsh を見てみましょう。

destroy domain
  Immediately terminate the domain domain.  This doesn't give the domain
  OS any chance to react, and it's the equivalent of ripping the power cord
  out on a physical machine. In most cases you will want to use
  the shutdown command instead.  However, this does not delete any
  storage volumes used by the guest, and if the domain is persistent, it
  can be restarted later.


undefine domain
  Undefine a domain. If the domain is running,
  this converts it to a transient domain, without stopping it. 
  If the domain is inactive, the domain configuration is removed.

これは、destroyはドメインを非常に不自然にシャットダウンする方法であり、undefineはドメインを一時的なドメインに変換するか、その構成を削除することを示します。

1
dessert