Introduction
Proxmox is an open-source server platform for enterprise virtualization that uses a modified Ubuntu kernel to deploy and manage multiple virtualized environments on a single bare metal server.
After installing Proxmox and setting up virtual machines (VMs), move on to mastering the skill of managing them. One of these skills is deleting a virtual machine.
In this article, you will learn how to delete a VM in Proxmox, as well as how to remove a VM disk and snapshot.
Delete a VM in Proxmox
There are two ways to delete a virtual machine in Proxmox:
- Using the graphical user interface (GUI).
- Using the command line.
Deleting a VM via GUI
To delete a VM using the Proxmox graphical user interface, follow the steps outlined below:
1. Log in to the Proxmox web console.
2. Select the VM you want to delete.
3. If the machine is running, click the Shutdown button before moving on to the next step. The VM has to be shut down or stopped.
4. Select More to open a drop-down menu and click Remove.
5. To confirm, enter the VM ID and click Remove.
Wir machen es nun mal so :
Deleting a VM via Command Line
To delete a Proxmox VM using the command line:
1. Log into the node.
2. Find the VMID (virtual machine ID) in the VM list by running the command:
cat /etc/pve/.vmlist
The output lists information about the VMs created, including their IDs. In the example below, there is only one VM with the ID 100.
3. Shut down or stop the VM by running:
qm shutdown [vmid]
Or:
qm stop [vmid]
4. Copy the ID number and add it to the following command to remove the virtual machine:
qm destroy [vmid]
Delete a VM Disk on Proxmox
In most cases, Proxmox deletes associated disks when deleting a virtual machine. To remove a disk manually, use the GUI or a terminal shell.
Delete a VM Disk via GUI
1. Select the virtual machine from the resource tree and open the Hardware tab.
2. Click the disk you want to delete.
3. Then, use the Remove button to instruct Proxmox to delete the disk.
4. Confirm you want to remove the disk and permanently erase all data with Yes.