Add disks to VM without formatting

ejimenez

New Member
Apr 4, 2023
9
0
1
Hello everyone!.

I have a problem to add a disk to a VM, I have 2 directories DIC1 and DIC2 in node 1 of proxmox where I have 2 disk 1 mounted in each directory. I have a zentyal VM (samba) it has the DIC1 disk mounted and I want to add a second DIC2 disk but on the DIC2 disk I have another VM that I don't want to lose, and to be able to mount the DIC2 disk in Zentyal (samba ) I need to format it, any solution to avoid formatting the disk? Thanks!
 
Last edited:
¿Porqué es eso?
In DIC2 the sdb1 disk is mounted, but when I add the disk to the Zentyal VM from proxmox, hardware, add disk, storage: DIC2", zentyal recognizes it but without partitions, that is, it only shows "sdb".

If I format the disk from the zentyal VM and I create a partition, I lose the disk information of the other VM, or am I wrong?
 
Last edited:
You can unmount the disk in your PVE host and passthrough the whole disk to the guest and then there will be partitions. It is crucial that you properly unmount the disk before mounting it in your guest, otherwise you'll probably have dataloss.
 
Hello!



I had forgotten to comment on how I solved it, in case it can help someone else.


The initial problem was that the partition table of a Zentyal VM, where it had shared files, was deleted.

In proxmox I used the command "qm set vmid -virtio1 /mnt/pve/myDirectory/images/vmid/imageVM.qcow2 (the image of the virtual machine where the data was stored)" and with that I could mount the disk and copy the information to another disk.
 

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!