Editing Virsh
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: | ||
− | + | <code>virsh</code><ref>http://manpages.ubuntu.com/manpages/xenial/man1/virsh.1.html</ref><ref> https://github.com/libvirt/libvirt/blob/master/tools/virsh.c</ref> is a command line utility for managing virsh guest domains/virtual machines and the hypervisor<ref>https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/virtualization/chap-virtualization-managing_guests_with_virsh</ref>. Can be used to operate vm like create, list, start, [[shutdown]] or suspend and to manage storage, [[Virsh Snapshots|snapshots]] and [[checkpoints]]<ref>https://github.com/libvirt/libvirt/commit/689beaa47c51fb49fafa992dd468116b8f6b0782#diff-f41fa7374ab97c527387ea4ce48fd04e</ref> among other actions. <code>[[virt-manager]]</code> is a graphical alternative to virsh. It supports Xen, QEMU, [[KVM]], LXC, OpenVZ, VirtualBox and VMware ESX. | |
− | <code>virsh</code><ref>http://manpages.ubuntu.com/manpages/xenial/man1/virsh.1.html</ref><ref> https://github.com/libvirt/libvirt/blob/master/tools/virsh.c</ref> is a command line utility for managing virsh guest domains/virtual machines and the hypervisor<ref>https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/virtualization/chap-virtualization-managing_guests_with_virsh</ref>. Can be used to operate vm like create, list, start, [[shutdown]] or suspend and to manage | ||
<code>virsh</code> is include in <code>[[libvirt|libvirt-client]]</code> package in [[RHEL]] and [[Ubuntu]] and uses [[libvirt]] management API. Binaries included: | <code>virsh</code> is include in <code>[[libvirt|libvirt-client]]</code> package in [[RHEL]] and [[Ubuntu]] and uses [[libvirt]] management API. Binaries included: | ||
− | * | + | * virsh |
− | * | + | * [[virt-admin]] |
− | * | + | * [[virt-host-validate]] |
− | * | + | * [[virt-login-shell]] |
− | * | + | * [[virt-pki-validate]] |
− | * | + | * [[virt-xml-validate]] |
== Basic Commands == | == Basic Commands == | ||
Line 24: | Line 23: | ||
* <code>[[virsh blockresize]]</code> | * <code>[[virsh blockresize]]</code> | ||
* <code>[[virsh change-media]]</code> | * <code>[[virsh change-media]]</code> | ||
− | * <code>[[virsh create]] [[MY_XML_VM_DEFINITION.XML/]] | + | * <code>[[virsh create]] [[/MY_XML_VM_DEFINITION.XML/]]</code> |
− | + | * <code>[[virsh define]] [[/MY_XML_VM_DEFINITION.XML/]]</code> (define machine but do not start it) | |
− | * <code>[[virsh define]] [[MY_XML_VM_DEFINITION.XML]]</code> (define machine but do not start it) | ||
** <code>[[virsh define]] xmlfile.xml --validate</code> | ** <code>[[virsh define]] xmlfile.xml --validate</code> | ||
** <code>[[virsh destroy]] VM_MACHINE_NAME </code> (Ungraceful Shutdown but do not destroy data or VM but you can corrupt guest file systems) | ** <code>[[virsh destroy]] VM_MACHINE_NAME </code> (Ungraceful Shutdown but do not destroy data or VM but you can corrupt guest file systems) | ||
Line 58: | Line 56: | ||
* <code>[[virsh reboot]]</code> | * <code>[[virsh reboot]]</code> | ||
* <code>virsh restore</code> | * <code>virsh restore</code> | ||
− | * <code> | + | * <code>virsh resume</code> |
− | * <code> | + | * <code>virsh save</code> |
* <code>virsh set-lifecycle-action</code>. Added in November 2017 (v.3.9.0)<ref>https://libvirt.org/news.html</ref> | * <code>virsh set-lifecycle-action</code>. Added in November 2017 (v.3.9.0)<ref>https://libvirt.org/news.html</ref> | ||
* <code>[[virsh setmaxmem]]</code> | * <code>[[virsh setmaxmem]]</code> | ||
Line 68: | Line 66: | ||
* <code>[[virsh start]]</code> | * <code>[[virsh start]]</code> | ||
* <code>[[virsh suspend]]</code> | * <code>[[virsh suspend]]</code> | ||
+ | * <code>virsh save</code> | ||
* <code>[[virsh shutdown]]</code> | * <code>[[virsh shutdown]]</code> | ||
* <code>[[virsh undefine]]</code> | * <code>[[virsh undefine]]</code> | ||
Line 73: | Line 72: | ||
* <code>[[virsh vcpuinfo]]</code> | * <code>[[virsh vcpuinfo]]</code> | ||
* <code>[[virsh vncdisplay]]</code> | * <code>[[virsh vncdisplay]]</code> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
== Getting Information == | == Getting Information == |
Advertising: