Duplicating Virtual Machine to Another Proxmox (Physical Unit)

  • Thread starter Thread starter heavankid
  • Start date Start date
H

heavankid

Guest
Dear All,

Would like to ask whether it's possible to duplicate the current image files to a proxmox on another physical unit.

My purpose is to setup on 1 PC and then duplicate 2 image files to more PCs. Is this allowed?
 
Hi, if I understand your question correctly,

- stop the VM once it is in a state you like (patched, configured, etc)
- do a vzdump to take a backup of its exact state and config
- transfer tgz archive to other host(s) running proxmox
- vzrestore the dump on the new proxVe physical node. Adjust config as required; use a new VEID if all prox nodes are in same cluster.
- spin up the VM on the new proxve host; adjust hostID / mac address / IP address if required to avoid collision with 'original copy'.
- repeat this process on as many physical ProxVE hosts as you wish.

Tim
 
Hi Tim,

Thanks for the info. Yup. That's the direction I'm trying to achieve.

Generally what i'm trying to achieve is to duplicate 2 VM to multiple units and deploy these units to remote sites.
Instead of installing one by one.

I'm still new to proxmox, been using vmware and virtualbox before. Thus can I know where to use the vzdump. Is there shell/console that I need to access?

Btw, have a crazy idea of using ghost to image the whole hdd altogether i.e proxmox as a whole. Possible to do so?

Your further assistance much appreciated.
 
...i can't understando what you mean by
<<duplicate 2 VM to multiple units and deploy these units to remote sites. Instead of installing one by one>>

?

see http://pve.proxmox.com/wiki/Backup_-_Restore_-_Live_Migration
backup/restore is the easiest way to "clone" proxmox virtual machines...
you still have to "make unique" each "cloned" vm, or it will became an exact clone, which usually you wish to avoid...

- scheduled backups are setup via pve gui, but you can start manual backup via pve CLI (vzdump)
see http://wiki.openvz.org/Backup_of_a_running_container_with_vzdump

- restoring is always a pve CLI operation, and is performed either by vzrestore or qmrestore depending on the vm type.

so i guess you could:
- manually backup your vms, transfer backups to "remote sites" (running a compatible: pve version, storage, network and settings), then restore backups and then "make unique"
- manually backup your vms, restore backups as different vms, "make unique", backup new "unique" clones, transfer backups to "remote sites" (running a compatible: pve version, storage, network and settings) and simply restore them

you can prepare your "units" locally, move vms on them or send "units" to remote sites witha a bare pve install and move there vms with ssh.
you can do almost anything on pve remotely with ssh...

hth, but i'm not an expert...

Marco
 
Last edited:
Hi HeavenKid,

in theory you could use some form of block-level clone tool (ghost, or more ideally non-license-requiring tool like Clonezilla or similar). However, to be quite honest, ProxVE is such a dead-easy thing to install as an "appliance" that I'm not sure I would go a HDD clone approach unless I really had a lot of physical units to roll out (ie more than a dozen - and also ideally all hardware would be 'physically identical' to ensure cloned copies work perfectly; although to be honest I'm sure it could tolerate non-trivial variations fairly well)

The dump / restore tools are all command line in Proxmox so you will need to SSH into your proxVE host as root and proceed from there. The commands are well documented / in the wiki / and links to these are now posted to this thread I believe. (look at the vzdump, restore section of the wiki page http://pve.proxmox.com/wiki/Backup_-_Restore_-_Live_Migration )

If your physical hosts are being deployed to different physical sites / different networks that don't interact, you may not need to 'render the cloned VMs unique' - ie - if they won't 'collide' since not in same LAN. It will depend on the project:context.

But certainly it is dead easy to stop a VM; take an exact copy of it; copy the backup file to any other proxVE hosts; and then restore it - to get multiple identical copies of the VM. It just takes a little while for dump-to-disk to happen / depending on size of VM install data footprint / and how fast:slow your network connection is between ProxVE hosts that you are pushing the image through. But really if this is 'pre-deployment' type of work - then time:performance is not a big concern probably.

Note that if you are using OpenVZ (linux only) VMs they will tend to be fairly light disk footprint inherently, and then size of the VM backup will vary purely with the amount of stuff (apps:data) you install in the VM. KVM Based VM - typically is deployed with a 'sparse' raw disk image file, meaning that (for example) a 100gb VM disk image pretends to occupy 100gig of space on the Proxmox host, it is a 'sparse file' which means that it is a kind of 'thin provisioned' disk effectively - ie - Install Win2003 (2gb disk space) plus your apps and data (10gb) gives 12gb of actual data in the "100gb" disk - so your qmdump VM backup file -- will be 12gb (possibly compressed if you so specify) or less in size.

Hope this helps / makes a bit of sense.

Tim