Locations

Bestbeast

Well-Known Member
Jul 29, 2016
163
5
58
30
Hello,

I read in another post that the kvm folder for the user data is in /var/lib/vz/images/xxx but there are only strange file formats ended in .qcow2 is that correct? or how can I access the data inside it?
Also wondering why in /var/lib/vz/ there are 2 folders containing the same data, the private and root folders.

Thanks
 
but there are only strange file formats ended in .qcow2 is that correct? or how can I access the data inside it?

.qcow2 is a well known format to store VM data. You normally start the VM to access that data.

Also wondering why in /var/lib/vz/ there are 2 folders containing the same data, the private and root folders.

OpenVZ needs that...
 
.qcow2 is a well known format to store VM data. You normally start the VM to access that data.
So then all the file systems are there and need to start that to access them? I can not open it with any other tool to watch inside? I am asking this because of not being able to start that machine maybe because the SO is corrupted or something
OpenVZ needs that...
Ok, but what is the difference? or which one is the updated one? it is totally clonned?
 
So then all the file systems are there and need to start that to access them? I can not open it with any other tool to watch inside? I am asking this because of not being able to start that machine maybe because the SO is corrupted or something
Or you can attach the broken VM's disk as a secondary disk to an healthy VM to access it form this VM.

Edit1: But it looks like it's not directly possible thru the GUI (why?) so you need to create a new .qcow2 disk on the healthy VM and then overwrite it with the "broken" .qcow2 ...

Edit2: Or it may be even easier to edit the healthy-vm.conf file under /etc/pve/nodes/hostname and add a line with the broken VM's disk path ...

Not sure what is best practice or not, but importing a VM's disk to another VM should be easier within the GUI.
 
Last edited:
Ok

I've just tested the second solution I've given you.

vmtest (112) is my healthy VM:

root@pve1:/etc/pve/nodes/pve1/qemu-server# cat 112.conf
#Debian 8
#
#Test VM ...
bootdisk: ide0
cores: 1
cpuunits: 512
ide0: drbd1:vm-112-disk-1,cache=writethrough,size=32G
ide2: none,media=cdrom
memory: 512
name: vmtest
net0: e1000=82:04:F9:0B:63:BD,bridge=vmbr0
numa: 0
ostype: l26
smbios1: uuid=2b6c9ce9-0ad5-4e47-a525-244051a6919b
sockets: 1


vmsupp (101) is my broken VM:

root@pve2:/etc/pve/nodes/pve2/qemu-server# cat 101.conf
#Debian 8
#
#Former x2go VM (to be decom)
balloon: 512
bootdisk: ide0
cores: 2
cpuunits: 2048
ide0: ds412:101/vm-101-disk-1.qcow2,size=32G
ide2: none,media=cdrom
memory: 2048
name: vmsupp
net0: bridge=vmbr0,virtio=62:65:38:63:66:62
numa: 0
ostype: l26
smbios1: uuid=7088cbe6-6c8a-48c2-b874-792995416a32
sockets: 1


I've added (vi) vmsupp's disk to vmtest as ide1:

ide0: drbd1:vm-112-disk-1,cache=writethrough,size=32G
ide1: ds412:101/vm-101-disk-1.qcow2,size=32G


Then start vmtest (it needs to be stop/shutdown and start, a simple reboot is not enough):

root@vmtest:~# fdisk -l | grep /dev
Disk /dev/sdb: 32 GiB, 34359738368 bytes, 67108864 sectors
/dev/sdb1 4096 2152447 2148352 1G 83 Linux
/dev/sdb2 2154496 67108863 64954368 31G 83 Linux


Disk /dev/sda: 32 GiB, 34359738368 bytes, 67108864 sectors
/dev/sda1 * 2048 64286719 64284672 30.7G 83 Linux
/dev/sda2 64288766 67106815 2818050 1.4G 5 Extended
/dev/sda5 64288768 67106815 2818048 1.4G 82 Linux swap / Solaris

root@vmtest:~# mount /dev/sdb2 /mnt
root@vmtest:~# cat /mnt/etc/hostname
vmsupp


Done.
 
Ok

I've just tested the second solution I've given you.

vmtest (112) is my healthy VM:

root@pve1:/etc/pve/nodes/pve1/qemu-server# cat 112.conf
#Debian 8
#
#Test VM ...
bootdisk: ide0
cores: 1
cpuunits: 512
ide0: drbd1:vm-112-disk-1,cache=writethrough,size=32G
ide2: none,media=cdrom
memory: 512
name: vmtest
net0: e1000=82:04:F9:0B:63:BD,bridge=vmbr0
numa: 0
ostype: l26
smbios1: uuid=2b6c9ce9-0ad5-4e47-a525-244051a6919b
sockets: 1


vmsupp (101) is my broken VM:

root@pve2:/etc/pve/nodes/pve2/qemu-server# cat 101.conf
#Debian 8
#
#Former x2go VM (to be decom)
balloon: 512
bootdisk: ide0
cores: 2
cpuunits: 2048
ide0: ds412:101/vm-101-disk-1.qcow2,size=32G
ide2: none,media=cdrom
memory: 2048
name: vmsupp
net0: bridge=vmbr0,virtio=62:65:38:63:66:62
numa: 0
ostype: l26
smbios1: uuid=7088cbe6-6c8a-48c2-b874-792995416a32
sockets: 1


I've added (vi) vmsupp's disk to vmtest as ide1:

ide0: drbd1:vm-112-disk-1,cache=writethrough,size=32G
ide1: ds412:101/vm-101-disk-1.qcow2,size=32G


Then start vmtest (it needs to be stop/shutdown and start, a simple reboot is not enough):

root@vmtest:~# fdisk -l | grep /dev
Disk /dev/sdb: 32 GiB, 34359738368 bytes, 67108864 sectors
/dev/sdb1 4096 2152447 2148352 1G 83 Linux
/dev/sdb2 2154496 67108863 64954368 31G 83 Linux


Disk /dev/sda: 32 GiB, 34359738368 bytes, 67108864 sectors
/dev/sda1 * 2048 64286719 64284672 30.7G 83 Linux
/dev/sda2 64288766 67106815 2818050 1.4G 5 Extended
/dev/sda5 64288768 67106815 2818048 1.4G 82 Linux swap / Solaris

root@vmtest:~# mount /dev/sdb2 /mnt
root@vmtest:~# cat /mnt/etc/hostname
vmsupp


Done.
WOW, it seems it worked for you, I will try myself also :)

Thank you very much
 
Also, apart from needing it, if I have to do any changes to the files in which of those 2 folders do I have to make the changes?
Hi,
you should change files inside the container... but if you run OpenVZ it show's that your version is not an 4.X...
OpenVZ isn't supported by an actual version - now is lxc the new star for containers ;-)

Udo
 
Hi,
you should change files inside the container... but if you run OpenVZ it show's that your version is not an 4.X...
OpenVZ isn't supported by an actual version - now is lxc the new star for containers ;-)

Udo
Yes I know that version 4.X is running lxc, but lxc is not a star, for me at the moment is quite crap, that is why other virtualpanels are not using it, firstly because of the cpu limiting problems that is having. So sorry to tell you that I will continue using openvz
 

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!