You can create, delete, run, stop, and manage your virtual machines from the command line, using a tool called virsh.
Installing
Install virsh:
- 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
- First, download an ISO cd image of some OS you want to run. For Ubuntu, you can find these at:
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: