Attach disk from one VM to another VM with Ceph

normic

Active Member
Apr 17, 2018
19
3
43
Germany, Baden
Hi,
I'd like to attach a single disk of a (restored) VM to another VM.

I detached the said disk from the old VM but how can I attach it to another VM?

I've tried qm importdisk <newvmid> CephPool:vm-detached-disk-name CephPool
But this gives me "non-existent or non-regular file"

Is this possible?

I thought it would be possible to reattach it without having to export and import it, as it's already on an available storage.

Thanks in advance.
 
The command you are using is not meant for what you are trying to achieve:
qm importdisk <vmid> <source> <storage> [OPTIONS]
Import an external disk image as an unused disk in a VM. The image format has to be supported by qemu-img(1).

The Ceph volume in a PVE managed pool is neither external nor in supported format.
You can use "importdisk" for something like a locally located qcow or raw images.

The support for moving a disk between VMs has been recently introduced and you may or may not have it, depending on your level of PVE.
Check the man page for instructions:
qm move-disk <vmid> <disk> [<storage>] [OPTIONS]
Move volume to different storage or to a different VM.


Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

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!