Location of VM and config files
VM images: proxmox:/var/lib/vz/images# ls
101 102
VM configurations: proxmox:/etc/pve/openvz# ls
100.conf
or proxmox:/etc/pve/qemu-server# ls
101.config
Previous version: proxmox:/etc/qemu-server#
Backup
The backup tool used for OpenVZ containers and KVM is called vzdump; if you are using the UI, first create a backup directory on Datacenter->Storage (using the new UI), and select 'Backup' as content for that storage. If you don’t have a storage created, you will get “Can’t use storage for backups – wrong content type” error.
There are other options to backup an image with no downtime for example using the snapshot mode.
Create a vm image
You can create a vm via command line or using the web UI.The following example creates windows 2003 vm with 3G of ram and using 1 core/socket CPU.
qm create 101 --name BuildSlave01 --vlan0 virtio=DA:28:61:58:71:5B --ide2 none,media=cdrom --bootdisk ide0
--ostype w2k3 --memory 3072 --sockets 1 --onboot no --cores 1 --virtio0 local:100,format=qcow2
Make sure to assign a new mac address every time a vm is created.
Restore from a backup
To restore use vzrestore for OpenVZ containers or qmrestore for KVM machines.Copy VM image
It is also possible to copy the vm disk image from one virtual machine to another, doing this will keep each vm configuration separate.proxmox:/var/lib/vz/images# cp 101/vm-101-disk-1.qcow2 106/vm-106-disk-1.qcow2
Extend vm disk size
The following example will add 20G to the vm.qemu-img resize vm-101-disk-1.qcow2 +20G
You can use gparted to make this space available on windows server 2003 c:\ drive. First, upload the iso image on proxmox and then boot the vm from cd using uploaded gparted iso image.
Using gparted to extend disk space is explained in more details here http://es.scribd.com/doc/39059599/How-to-Resize-Proxmox-Qcow2-Raw-Images-and-Windows-Partitions-Using-Qemu-0-13-and-Linux-Gparted.
Converting image formats
Theqemu-img
program can be used to convert images from one format to another. For example: qemu-img convert -O qcow2 MyVmwareImage.vmdk MyProxmoxImage.qcow2