mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 08:02:08 +02:00
virsh: add page (#3241)
This commit is contained in:
parent
565654b6f0
commit
b4332ca6fe
1 changed files with 37 additions and 0 deletions
37
pages/common/virsh.md
Normal file
37
pages/common/virsh.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
# virsh
|
||||
|
||||
> Manage virsh guest domains.
|
||||
> More information: <https://libvirt.org/virshcmdref.html>.
|
||||
> 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}}`
|
Loading…
Add table
Reference in a new issue