Subsequently changing the location of the hard disk image

BrotherJ

Active Member
Sep 14, 2019
31
2
28
32
After the disaster here https://forum.proxmox.com/threads/pve-cluster-service-doesnt-start-and-ipcc_send_rec-failed.146224/ I have another issue to solve.
I restored the backup of "pve-cluster/config.db" to /var/lib/pve-cluster/ and made a restart of the services. Now PVE runs fine, the important VM is running again. But there are other VMs which include still an old path to the disk image. Meanwhile I made the expierence the directory "/etc/pve" will build at start of the service every time new. So I can't change any files here.
But the definitions of the VMs are included here:
Code:
ls -l /etc/pve/qemu-server/
total 5
-rw-r----- 1 root www-data 533 Apr 26 00:06 100.conf
-rw-r----- 1 root www-data   0 Mar 21 00:00 100.conf.tmp.682527
-rw-r----- 1 root www-data 633 Apr 26 00:09 101.conf
-rw-r----- 1 root www-data 554 Apr 26 00:12 102.conf
-rw-r----- 1 root www-data 482 Apr 26 10:19 103.conf
-rw-r----- 1 root www-data 624 Apr 26 00:17 104.conf
-rw-r----- 1 root www-data 533 Apr 26 00:26 105.conf
-rw-r----- 1 root www-data 581 Mar 25 12:32 106.conf
-rw-r----- 1 root www-data 627 Apr 27 12:09 107.conf
-rw-r----- 1 root www-data 478 Apr 26 02:49 108.conf
-rw-r----- 1 root www-data 527 Apr 27 12:51 109.conf

There definitions of paths like
Code:
scsi0: local-btrfs:102/vm-102-disk-0.raw,cache=writethrough,iothread=1,size=150G
But that's wrong because I had mad a clone of all VMs with location "local-btrfs" to "zp_100" (ZFS):
Code:
# zfs list
NAME                   USED  AVAIL     REFER  MOUNTPOINT
zp_100                3.26T  4.60T       96K  /zp_100
zp_100/vm-100-disk-0   155G  4.75T     4.42G  -
zp_100/vm-102-disk-0   155G  4.74T     12.3G  -
zp_100/vm-102-disk-1   206G  4.73T     70.8G  -
zp_100/vm-106-disk-0   155G  4.61T      142G  -
zp_100/vm-106-disk-1  1.03T  5.53T      106G  -
zp_100/vm-106-disk-2  1.03T  5.53T      109G  -
zp_100/vm-107-disk-0   155G  4.72T     31.5G  -
zp_100/vm-108-disk-0  89.1G  4.60T     74.4G  -
zp_100/vm-109-disk-0   155G  4.69T     67.1G  -
zp_100/vm-110-disk-0   155G  4.75T     5.11G  -
zp_200                 155G  1.77T       96K  /zp_200
zp_200/vm-103-disk-0   155G  1.92T     4.20G  -

Okay, now I want to change exactly all entries in the .conf-files to example:
Code:
scsi0: zp_100:vm-100-disk-0,cache=writethrough,iothread=1,size=150G
instead of
Code:
scsi0: local-btrfs:100/vm-100-disk-0.raw,cache=writethrough,iothread=1,size=150G
The last don't exist anymore.
In the Web-Gui of Proxmox I can't change it. Because if I want to edit under "Hardware" the point "Hard Disk (scsi0)", so it is still impossible. Also if the VM is stopped. At KVM it is more easier, the files for the VMs are stored at /etc/libvirt/qemu/ as .xml-files, which are editable.

What would be the way at Proxmox to change it? Editing the /var/lib/pve-cluster/config.db?

Best regards
BrotherJ
 

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!