Virsh: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(42 intermediate revisions by the same user not shown)
Line 1: Line 1:
=External=
=External=


* https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/chap-Managing_guest_virtual_machines_with_virsh.html
* [https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Deployment_and_Administration_Guide/chap-Managing_guest_virtual_machines_with_virsh.html RHEL7 Virtualization Administration - Managing guest virtual machine with virsh]


=Internal=
=Internal=


* [[Linux_Virtualization_Concepts#libvirt|Linux Virtualization Concepts - libvirt]]
* [[Linux_Virtualization_Concepts#libvirt|Linux Virtualization Concepts - libvirt]]
* [[Linux Virtualization Operations]]
* [[virt-install]]


=Overview=
=Overview=


virsh is a command-line tool for managing the KVM hypervisor and guest virtual machines. It is the primary tool to manage RHEL 7 virtualization.  
virsh is a command-line tool for managing the KVM hypervisor and guest virtual machines. It is part of the  libvirt-client package.
 
virsh is the primary tool to manage RHEL 7 virtualization.  


It can be used to:
It can be used to:
Line 18: Line 22:
* shut down virtual machines
* shut down virtual machines
* manage virtual networks
* manage virtual networks
* [[Linux_Virtualization_Configuration#Storage_Pool_Configuration|manage storage]]
* [[Linux_Virtualization_Operations#Virtualization_Host_Storage_Operations|manage storage]]
* load virtual machine disk images
* load virtual machine disk images


Line 30: Line 34:


{|
{|
| [[Virsh pool-list|pool-list]]  || [[Virsh pool-info|pool-info]]
| '''Operation Category''' ||
|-
| '''Storage Pool''' ||  [[Virsh pool-list|pool-list]]  || [[Virsh pool-info|pool-info]] || [[virsh pool-create|pool-create]] || [[virsh pool-define-as|pool-define-as]] || [[Virsh pool-build|pool-build]] || [[Virsh pool-start|pool-start]]
|-
| || [[Virsh pool-autostart|pool-autostart]] || [[virsh pool-edit|pool-edit]] || [[virsh pool-dumpxml|pool-dumpxml]] || [[virsh pool-destroy|pool-destroy]] || [[virsh pool-delete|pool-delete]] || [[virsh pool-undefine|pool-undefine]]
|-
| '''Storage Volume''' || [[virsh vol-list|vol-list]] || [[virsh vol-info|vol-info]] || [[virsh vol-name|vol-name]] || [[virsh vol-path|vol-path]] || [[virsh vol-key|vol-key]] || [[virsh vol-create-as|vol-create-as]] || [[virsh vol-create|vol-create]] || [[virsh vol-clone|vol-clone]]  || [[virsh vol-delete|vol-delete]]
|-
| '''Nework''' || [[virsh net-edit|net-edit]]
|-
| '''Guest VMs''' || [[virsh list|list]] || [[virsh define|define]] || [[virsh dumpxml|dumpxml]]  || [[virsh edit|edit]]  || [[virsh start|start]] || [[virsh console|console]] || [[virsh shutdown|shutdown]] || [[virsh undefine|undefine]]  
|-
|-
| [[virsh pool-define-as|pool-define-as]] || [[Virsh pool-build|pool-build]] || [[Virsh pool-start|pool-start]] || [[Virsh pool-autostart|pool-autostart]]
|  || [[virsh domstate|domstate]] || [[virsh dominfo|dominfo]] || [[Linux KVM Virtualization Guest Snapshot Using virsh snapshot Functionality|snapshot]] || [[virsh autostart|autostart]]
|-
|-
| [[virsh pool-destroy]] || [[virsh pool-delete]] || [[virsh pool-undefine]]
| '''Guest Device Management''' || [[virsh attach-disk|attach-disk]]
|}
|}

Latest revision as of 06:47, 4 December 2020

External

Internal

Overview

virsh is a command-line tool for managing the KVM hypervisor and guest virtual machines. It is part of the libvirt-client package.

virsh is the primary tool to manage RHEL 7 virtualization.

It can be used to:

  • create virtual machines
  • configure virtual machines
  • pause virtual machines
  • list virtual machines
  • shut down virtual machines
  • manage virtual networks
  • manage storage
  • load virtual machine disk images

Installation

yum install libvirt-client

Commands

Operation Category
Storage Pool pool-list pool-info pool-create pool-define-as pool-build pool-start
pool-autostart pool-edit pool-dumpxml pool-destroy pool-delete pool-undefine
Storage Volume vol-list vol-info vol-name vol-path vol-key vol-create-as vol-create vol-clone vol-delete
Nework net-edit
Guest VMs list define dumpxml edit start console shutdown undefine
domstate dominfo snapshot autostart
Guest Device Management attach-disk