Diff for "KVM/Virsh"


Differences between revisions 1 and 2
Revision 1 as of 2009-11-09 18:46:31
Size: 987
Editor: rrcs-24-153-219-148
Comment: initial page creation
Revision 2 as of 2009-11-09 18:53:03
Size: 1277
Editor: rrcs-24-153-219-148
Comment: add console section
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
 Id Name State
----------------------------------
  1 foo running
Line 28: Line 31:
Line 31: Line 35:
Sometimes, it's useful to attach to the console of a running VM, to obtain debugging information, etc.
{{{
$ virsh console foo
Connected to domain foo
Escape character is ^]

}}}

You can create, delete, run, stop, and manage your virtual machines from the command line, using a tool called virsh.

Installing

Install virsh:

  1. From a Command Line
    sudo apt-get install virsh

Connecting

Connect to your hypervisor. This can be local, or even remote. In most cases, if you want to manage VMs running on the local hypervisor:

$ virsh connect qemu:///system
Connecting to uri: qemu:///system

Listing VMs

$ virsh list
 Id Name                 State
----------------------------------
  1 foo                  running

Creating a Virtual Machine

Working with a Running Virtual Machine

Console

Sometimes, it's useful to attach to the console of a running VM, to obtain debugging information, etc.

$ virsh console foo
Connected to domain foo
Escape character is ^]

Details

Deleting a Virtual Machine

More Information

For more complete documentation on virsh, see:

KVM/Virsh (last edited 2014-04-03 22:33:31 by 79-113-255-204)