Managing Vm's with Virish

Virsh is a command line interface tool for managing guests and hypervisor. Virsh is a program which uses libvirt to manage KVM Virtual Machines.

Virsh Life Cycle to Manage VM's

Connect to Hypervisor
virsh connect<machine name>
$ virsh --connect qemu:///system

Create a Virtual Machine from Virsh
Create a new instance from virsh console we need an xml file where the template of virtual machines is created. In template we define the requirements of the machine. VM can be created from XML Configuration file. To create a guest with  run the following:-

virsh create configuration_file.xml

suspending a VM
virsh suspend [domain-id, domain-name or domain-uuid]

Resuming a VM
virsh resume [domain-id, domain-name or domain-uuid]

Restoring a VM
virsh restore [filename]

Saving a VM
virsh save [domain-id, domain-name or domain-uuid]

Rebooting a VM
virsh reboot [domain-id, domain-name or domain-uuid]
command

Comments

Popular posts from this blog

How Yum Works?

Steps to install Ubuntu