virsh Virtualization

virsh – basic management

Reading Time: < 1 minute

Images for the VM are typically stored in /var/lib/libvirt/images

virsh nodeinfo
virsh dumpxml template > template.xml
virsh destroy template
virsh create template.xml
virsh undefine template

virsh list --all

virsh hostname
virsh domstate template
virsh dominfo template
root@server:/var/lib/libvirt/images# virsh list
 Id    Name                           State
----------------------------------------------------
 1     bind                           running
 2     apache                         running
 3     sftp                           running

To find the IP address of a VM

root@server:/var/lib/libvirt/images# virsh domifaddr sftp
 Name       MAC address          Protocol     Address
-------------------------------------------------------------------------------
 vnet2      52:54:00:7b:36:33    ipv4         192.168.122.165/24
  • http://libvirt.org/virshcmdref.html

Related posts

kvm

Tom Hamilton

Installing VMware 6.5

Tom Hamilton

CORE STUDY: Docker – Installing

Tom Hamilton