Move disk image between servers

Vittorio

Well-Known Member
Jul 24, 2019
79
5
48
59
Hi

I'm not new to Proxmox, but I never neede to move a disk image from one server to another
I'm on version 7.2.xxx and I've created the disk image from the 1st server to a shared NFS storage that also 2nd server can see

Now, I've created the new VM (in this case I've used a script to create a Home Assistant VM, so it has already a disk attached.
How can I detach the created storage and attach the image disk?

I'm trying this way, because restoring the VM from server 1 (only one disk for Proxmox and VM/LXC) to server 2 (one disk for Proxmox and another one for VM/LXC in ZFS) is causing me strange behaviour in HA, stopping the UI.

Thanks
 
Hi,

with disk image you mean a qcow2 file? If so, you would need todo this:

You can import that file from the command line via this command:
Code:
qm importdisk <vmid> <source> <storage> [OPTIONS]

"source" would be your qcow2 file and "storage" would be the storage name (found under "Datacenter/Storage") where you want to put the file. VMID is the current ID number of your vm.

When you do that, you will see something like that on the VM you imported the disk to:
1668500319105.png
You will need to edit it (double-click on it) and press the add button. Afterwards, you will need to modify the boot order under "Options/Boot order" of this VM.
 
Hi,

with disk image you mean a qcow2 file? If so, you would need todo this:

You can import that file from the command line via this command:
Code:
qm importdisk <vmid> <source> <storage> [OPTIONS]

"source" would be your qcow2 file and "storage" would be the storage name (found under "Datacenter/Storage") where you want to put the file. VMID is the current ID number of your vm.

When you do that, you will see something like that on the VM you imported the disk to:
View attachment 43231
You will need to edit it (double-click on it) and press the add button. Afterwards, you will need to modify the boot order under "Options/Boot order" of this VM.
Thanks @shrdlicka
I have created a VM with a script for Home assistant that already have a disk attached.

After importing the qcow2 disk should or can I remove the other disk?
Is there any option to set to let it boot from the imported disk?
 
Is there any option to set to let it boot from the imported disk?
Afterwards, you will need to modify the boot order under "Options/Boot order" of this VM.
:). I it is clear what I mean.

After importing the qcow2 disk should or can I remove the other disk?
You can remove the disk, but you don't have to. Just change the boot order and remove the checkmark from the old disk. If it works as expected you can detach and then remove the disk.
 
  • Like
Reactions: Vittorio

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!