Deleting a virtual machine

ustim

New Member
Aug 12, 2020
2
0
1
43
1. I created a virtual machine with a system virtual disk.
2. I connected an additional virtual hard disk on which a lot of information is stored.

If now I want to delete the virtual machine, but this additional hard drive is also deleted. Why is this happening?
I tried unplugging this drive but it gets deleted anyway.

Can you help me remove the virtual machine correctly, but leave the additional hard drive in place?
 
Hi,
that's because from PVE's perspective the virtual disk belongs to the VM and thus is deleted when the VM is deleted. PVE is not really designed to have VM-less virtual disks lying around.

If you want to retain the virtual disk, you can either make a copy beforehand or rename/move it. In both cases it's important to choose a name different than vm-<ID>-* or a location that's not one of your configured storages.

Alternatively, you could delete/replace only the system disk.
 
Thank. Now I'll know.
Will have to find the right way to organize the file storage for a particular virtual machine.
 

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!