Migrate VM Task error

Jun 20, 2023
54
2
8
Hi,

I want to migrate vm to other node, but the result :

Code:
TASK ERROR: can't activate LV '/dev/High-Performance/vm-108-disk-0':   device-mapper: create ioctl on High--Performance-vm--108--disk--0 LVM-0yMsCViOMZn9xYKxPDIpYZ3lid4L6cCU9Ib0t2cbkd1NRYlMkalifzl6ys1F2kE7 failed: Device or resource busy

When i check to destination node, there is a same disk but different size
Code:
sdh                                                                                                     8:112  0     7T  0 disk
├─High--Performance-vm--101--disk--0                                                                  252:8    0   200G  0 lvm
├─High--Performance-vm--104--disk--0                                                                  252:10   0    40G  0 lvm
├─High--Performance-vm--108--disk--0                                                                  252:11   0    50G  0 lvm
├─High--Performance-vm--110--disk--0                                                                  252:12   0    15G  0 lvm
├─High--Performance-vm--111--disk--0                                                                  252:13   0   125G  0 lvm
├─High--Performance-vm--122--disk--0                                                                  252:15   0   500G  0 lvm
├─High--Performance-vm--129--disk--0                                                                  252:18   0   100G  0 lvm
├─High--Performance-vm--129--disk--1                                                                  252:20   0   100G  0 lvm
├─High--Performance-vm--113--disk--0                                                                  252:22   0    50G  0 lvm
├─High--Performance-vm--106--disk--0                                                                  252:23   0    60G  0 lvm
├─High--Performance-vm--118--disk--0                                                                  252:24   0    30G  0 lvm
├─High--Performance-vm--123--disk--0                                                                  252:25   0    30G  0 lvm
├─High--Performance-vm--124--disk--0                                                                  252:26   0    30G  0 lvm
├─High--Performance-vm--127--disk--0                                                                  252:27   0   127G  0 lvm
├─High--Performance-vm--127--disk--1                                                                  252:28   0   125G  0 lvm
├─High--Performance-vm--131--cloudinit                                                                252:29   0     4M  0 lvm
├─High--Performance-vm--131--disk--0                                                                  252:30   0    30G  0 lvm
├─High--Performance-vm--132--cloudinit                                                                252:31   0     4M  0 lvm
├─High--Performance-vm--131--disk--1                                                                  252:32   0    80G  0 lvm

When check with lvdisplay, there's no High--Performance-vm--108--disk--0 with size 50Gb
Code:
  --- Logical volume ---
  LV Path                /dev/High-Performance/vm-108-disk-0
  LV Name                vm-108-disk-0
  VG Name                High-Performance
  LV UUID                9Ib0t2-cbkd-1NRY-lMka-lifz-l6ys-1F2kE7
  LV Write Access        read/write
  LV Creation host, time CBN-node1, 2024-05-29 11:20:31 +0700
  LV Status              NOT available
  LV Size                100.00 GiB
  Current LE             25600
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
 
  --- Logical volume ---
  LV Path                /dev/High-Performance/vm-108-cloudinit
  LV Name                vm-108-cloudinit
  VG Name                High-Performance
  LV UUID                zVieHc-mNyH-9X6f-BfGp-j6y7-V2tn-6d2GdR
  LV Write Access        read/write
  LV Creation host, time CBN-node1, 2024-05-29 11:25:03 +0700
  LV Status              NOT available
  LV Size                4.00 MiB
  Current LE             1
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto

Here vm configuration
1722484737507.png
 
Last edited:
Could that disk be an old one from an old deleted VM?

If you don't know what's inside you could create a new VM on the target node.
After that add a live cd image to the cdrom.
Then you could rename that disk so it matches the id of new VM and mount it.
 
Datacenter > Node (with the VM disk) > Storage (with the VM disk) > VM Disks
Select the VM disk from the list and click the "Remove" button.
 
The other day, I encountered a similar issue and resolved it by:

1. Shutting down the virtual machine;
2. Moving it to another node.
3. Removing the locked disk using the command dmsetup remove /dev/.../vm-108" etc;
4. Starting the virtual machine again. This resolved the issue.

I hope this helps you.
 
  • Like
Reactions: rian81
Update :

Thanks a lot @Parfu , it works, but i didn't shutoff the vm
Unfortunately, this won't work for me unless the computer is turned off. I get an error message in shell "Device or resource is busy".
However, I'm glad that I was able to help you.
 

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!