Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
kvm [2012/04/14 14:13] stojan |
kvm [2012/04/14 14:25] (current) stojan |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ** | ** | ||
| Creating VMs from Debian repositories** | Creating VMs from Debian repositories** | ||
| + | |||
| + | How to create a new VM with 2GB of memory and 15GB disk image directly from Debian repo: | ||
| + | |||
| < | < | ||
| virt-install -n vmserver -r 2048 --os-type=linux --os-variant=debiansqueeze \ | virt-install -n vmserver -r 2048 --os-type=linux --os-variant=debiansqueeze \ | ||
| - | --disk /backups/ | + | --disk /vmdisk/ |
| --vnc --noautoconsole --location | --vnc --noautoconsole --location | ||
| </ | </ | ||
| + | |||
| + | use VNC to connect to the VM console after creating it. | ||
| + | |||
| + | **Some useful commands for handling VMs** | ||
| + | |||
| + | List existing VMs: | ||
| + | < | ||
| + | virsh list | ||
| + | </ | ||
| + | |||
| + | Shutdown an existing VM: | ||
| + | < | ||
| + | virsh shutdown vmname | ||
| + | </ | ||
| + | |||
| + | Destroy (hard shutdown) an existing VM: | ||
| + | < | ||
| + | virsh destroy vmname | ||
| + | </ | ||
| + | |||
| + | Start an existing VM: | ||
| + | < | ||
| + | virsh start vmname | ||
| + | </ | ||
| + | |||
| + | Set the ' | ||
| + | < | ||
| + | virsh autostart vmname | ||
| + | </ | ||
| + | |||
| + | Clone an existing VM. Make sure you update the udev settings after cloning if you want your network to work: | ||
| + | < | ||
| + | virt-clone -o OldVM -n NewVM -f / | ||
| + | </ | ||
| + | |||
| + | Remove a VM from the system ' | ||
| + | < | ||
| + | virsh undefine vmname | ||
| + | </ | ||
| + | |||
| + | **KVM performance boost** | ||
| [[http:// | [[http:// | ||

