[Q] [Solved] Migrate qcow2 virtual disk to newly created VM

cmonty14

Well-Known Member
Mar 4, 2014
343
5
58
Hi!

I have previously created a VM with KVM / Qemu and want to migrate this to Proxmox VE.
My intention was to move the virtual disk (that is in qcow2 format) to the Proxmox VE server and then attach it to the newly created VM.
However, this is not straight forward as I expected.

Question:
How can I use an exisiting virtual disc with a newly created VM in Proxmox VE?

THX
 
Last edited:
Re: [Q] Migrate qcow2 virtual disk to newly created VM

Create a new VM in Proxmox.
Overwrite the qcow2 file inside proxmox with the one of your previously created VM.
 
Re: [Q] Migrate qcow2 virtual disk to newly created VM

Do you mean I should rename the old virtual disk giving the name of the virtual disk of the newly created VM?

Can you confirm that modification of the config file for the newly created VM would work, too?

THX
 
Re: [Q] Migrate qcow2 virtual disk to newly created VM

Step by step.
1) On proxmox, create a new VM with the same configuration of the old VM. Assume that new VM has ID 100
2) Copy old VM to the new one, overwriting the destination. For example, on the old machine launch
scp /path/to/VM.qcow2 root@proxmox: /var/lib/vz/images/101/vm-101-disk-1.qcow2"

3) Boot the new VM