networking & restoration of OpenVZ & KVM
Sunday, July 11, 2010 3:52:58 PM
** For OpenVZ **
To add an interface to an OpenVZ container you can use the following
command:
vzctl set <VMID> --netif_add <interface>,,,,<bridge> --save
Example:
vzctl set 101 --netif_add eth1,,,,vmbr1 --save
** For KVM **
just create the new KVM guest (I assume you already did this), navigate to the hardware tab and add a second network card.
--
Restore with vzrestore and qmrestore
To restore a Virtual Machine, just copy the tar file to the host where you want to restore. Depending on the type of virtual machine, use 'vzrestore' to restore OpenVZ containers, or 'qmrestore' to restore KVM machines.
Example1: Restore the backup of KVM VM 555 (backup file: vzdump-qemu-555.tar) to CT 500
qmrestore vzdump-qemu-555.tar 500
Example2: Restore the backup of OpenVZ container CT 777 (backup file: vzdump-openvz-777.tar) to CT 600
vzrestore vzdump-openvz-777.tar 600
REFERENCES:
http://pve.proxmox.com/pipermail/pve-user/2010-February/001249.html
http://forum.proxmox.com/threads/1180-Multiple-Network-Interfaces
http://pve.proxmox.com/wiki/Backup_-_Restore_-_Live_Migration#Restore_with_vzrestore_and_qmrestore
To add an interface to an OpenVZ container you can use the following
command:
vzctl set <VMID> --netif_add <interface>,,,,<bridge> --save
Example:
vzctl set 101 --netif_add eth1,,,,vmbr1 --save
** For KVM **
just create the new KVM guest (I assume you already did this), navigate to the hardware tab and add a second network card.
--
Restore with vzrestore and qmrestore
To restore a Virtual Machine, just copy the tar file to the host where you want to restore. Depending on the type of virtual machine, use 'vzrestore' to restore OpenVZ containers, or 'qmrestore' to restore KVM machines.
Example1: Restore the backup of KVM VM 555 (backup file: vzdump-qemu-555.tar) to CT 500
qmrestore vzdump-qemu-555.tar 500
Example2: Restore the backup of OpenVZ container CT 777 (backup file: vzdump-openvz-777.tar) to CT 600
vzrestore vzdump-openvz-777.tar 600
REFERENCES:
http://pve.proxmox.com/pipermail/pve-user/2010-February/001249.html
http://forum.proxmox.com/threads/1180-Multiple-Network-Interfaces
http://pve.proxmox.com/wiki/Backup_-_Restore_-_Live_Migration#Restore_with_vzrestore_and_qmrestore






