From b4332ca6fe2a524b35fc7d42973d8897ca16f631 Mon Sep 17 00:00:00 2001 From: Arthur Bols Date: Fri, 16 Aug 2019 14:03:15 +0200 Subject: [PATCH] virsh: add page (#3241) --- pages/common/virsh.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pages/common/virsh.md diff --git a/pages/common/virsh.md b/pages/common/virsh.md new file mode 100644 index 000000000..41f5e1f3f --- /dev/null +++ b/pages/common/virsh.md @@ -0,0 +1,37 @@ +# virsh + +> Manage virsh guest domains. +> More information: . +> NOTE: 'guest_id' can be the id, name or UUID of the guest. + +- Connect to a hypervisor session: + +`virsh connect {{qemu://system}}` + +- List all domains: + +`virsh list --all` + +- Dump guest configuration file: + +`virsh dumpxml {{guest_id}} > {{path/to/guest.xml}}` + +- Create a guest from a configuration file: + +`virsh create {{path/to/config_file.xml}}` + +- Edit a guest's configuration file (editor can be changed with $EDITOR): + +`virsh edit {{guest_id}}` + +- Start/reboot/shutdown/suspend/resume a guest: + +`virsh {{command}} {{guest_id}}` + +- Save the current state of a guest to a file: + +`virsh save {{guest_id}} {{filename}}` + +- Delete a running guest: + +`virsh destroy {{guest_id}} && virsh undefine {{guest_id}}`