move cloudinit driver without reboot VM

Dzung

Well-Known Member
Feb 20, 2019
86
2
48
33
Hello!
I want to move cloudint driver from local storage to share storage, on webgui I not found option but when I used command it can move to new storage, but it can not delete on old storage, so when I migrate vm to new node it show error.
anyone have solution to move disk cloudinit without reboot vm.
this is my step to move disk:
Code:
root@pve02:/etc/pve/qemu-server# qm move_disk 1269 ide0 storageshare --delete
create full clone of drive ide0 (vmlocal:vm-1269-cloudinit)
  Logical volume "vm-1269-cloudinit" created.
Use of uninitialized value $completion in string eq at /usr/share/perl5/PVE/QemuServer.pm line 7252.
lvremove 'vmlocal/vm-1269-cloudinit' error:   Logical volume vmlocal/vm-1269-cloudinit in use.
on 1269.conf
Code:
ide0: storagem1:vm-1269-cloudinit,media=cdrom,size=4M
when migrate it still error
Code:
2021-10-13 14:38:12 starting migration of VM 1269 to node 'pve1' ()
2021-10-13 14:38:14 ERROR: Problem found while scanning volumes - storage 'vmlocal' is not available on node 'pve1'
2021-10-13 14:38:14 aborting phase 1 - cleanup resources
2021-10-13 14:38:14 ERROR: migration aborted (duration 00:00:04): Problem found while scanning volumes - storage 'vmlocal' is not available on node 'pve1'
TASK ERROR: migration aborted
I rescan it show disk is unused disk, but I can not remove
Code:
qm rescan --vmid 1269
 
Last edited:
There's a workaround to do that, but it involves regenerating the cloud-init disk.
To do so first set the drive to `none` by running qm set <vmid> --ide<N> none and then qm set <vmid> --ide<N> <Storage>:cloudinit .
Replace <vmid> with the VM ID, <N> with the number of the drive, in the case above `0` and <Storage> with your target storage.
 
  • Like
Reactions: gurubert
There's a workaround to do that, but it involves regenerating the cloud-init disk.
To do so first set the drive to `none` by running qm set <vmid> --ide<N> none and then qm set <vmid> --ide<N> <Storage>:cloudinit .
Replace <vmid> with the VM ID, <N> with the number of the drive, in the case above `0` and <Storage> with your target storage.
thank you
 
There's a workaround to do that, but it involves regenerating the cloud-init disk.
To do so first set the drive to `none` by running qm set <vmid> --ide<N> none and then qm set <vmid> --ide<N> <Storage>:cloudinit .
Replace <vmid> with the VM ID, <N> with the number of the drive, in the case above `0` and <Storage> with your target storage.
That works. But why is this not build into "qm move_disk" or possible via GUI?
 

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!