Problem with qmrestore: VM is locked (created)

Tony

Renowned Member
Nov 4, 2010
113
9
83
Hello,

I am having this problem and could not find any hint on this forum. I have also googled for a while without success.

I have a proxmox server 2.X with a few VMs running on it. Now I want to move the VMs to a 5.X Proxmox server. I did the following:

- create a backup on the old server using vzdump
- restore the backup on the new server using qmrestore as follows:
qmrestore /backup/vzdump-qemu-123-2019_11_04-18_35_26.tar.lzo 103 --unique --storage local

However qmrestore gave this error message:
VM is locked (create)

and the disk was not imported. I tried with various storage ids and vm ids, same result. The vm was created but without disk.

The backup is a tar file consisting of these files:
qemu-server.conf
vm-disk-virtio0.raw


and the content of qemu-server.conf is:
# cat qemu-server.conf
args: -vnc 127.0.0.1:3123,
boot: cdn
bootdisk: virtio0
cores: 2
ide2: cdrom,media=cdrom
lock: backup
memory: 512
name: bcv
net0: virtio=26:E1:90:0C:C6:2C,bridge=vmbr0
onboot: 1
ostype: l26
sockets: 1
virtio0: shared-storage-on-drbd:vm-123-disk-1
#vzdump#map:virtio0:vm-disk-virtio0.raw:8589934592:shared-storage-on-drbd:

Any hint what I can try?

Regards,
Tony
 
Hi,

it seems that a previous restore or create of a VM/CT with VMID 103 failed, and thus the "create" lock is left over.

can you see if there's an config: qm config 103

Any hint what I can try?

Another, free, VMID:
Code:
qmrestore /backup/vzdump-qemu-123-2019_11_04-18_35_26.tar.lzo "$(pvesh get /cluster/nextid)" --unique --storage local
 
Hi Thomas,

thank you for your hint. I have tried the following:
Code:
 # qm config 103
Configuration file 'nodes/hn5/qemu-server/103.conf' does not exist
# pvesh get /cluster/nextid
103

I have also tried with various IDs, but the result is always the same: vm created but disk not imported.

Yesterday I tried to create a VM and then import the raw file:
Code:
 qm importdisk 102 ./vm-disk-virtio0.raw lvm-thin-ssd

after that the disk was imported, and I could boot the VM (with some extra steps, since the device has changed from /dev/vda to /dev/sdb)

btw, how can I remove a disk from a VM? The GUI doesn't seem to allow that

Regards,
Tony
 
thank you for your hint. I have tried the following:

hmm strange result, did you destroy the VM 103 in-between? Just asking for sanity, else it would seem like there was a ghost VM..

I have also tried with various IDs, but the result is always the same: vm created but disk not imported.

So just the empty VM skelleton created? Were there any error messages during qmrestore?

btw, how can I remove a disk from a VM? The GUI doesn't seem to allow that

You can only destroy "unused" disks, so you first need to detach a disk, then you can remove the resulting "unusedX" disk entry, both should work over the Webinterface.
 
hmm strange result, did you destroy the VM 103 in-between? Just asking for sanity, else it would seem like there was a ghost VM..
yes I did destroy VM 103 (and other VMs that I tried in-between)


So just the empty VM skelleton created? Were there any error messages during qmrestore?
yes the VM was created very quickly with a single short error:
Code:
qmrestore /backup/vzdump-qemu-123-2019_11_04-18_35_26.tar.lzo 999 --unique --storage local
VM is locked (create)

You can only destroy "unused" disks, so you first need to detach a disk, then you can remove the resulting "unusedX" disk entry, both should work over the Webinterface.

ah yes, indeed. Thanks a lot.


Regards,
Tony
 

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!