[SOLVED] How to remove/fix the state file after snapshot failed

parker0909

Member
Aug 5, 2019
81
0
11
35
Hi All,

I am facing the strange problem, i find that the vm still have one state file even i already removed the snapshot. I don't know how to fix the problem and i am afraid it cause data lost when i try to remove state file in the zfs volume. May i know some suggestion to solve the problem?

I have checked the conf file but i cant find any snapshot setting

/etc/pve/qemu-server/201.conf

agent: 0
boot: order=scsi0;ide2;net0
cores: 2
ide2: none,media=cdrom
memory: 16384
name: WEBSPACE02
net0: virtio=42:9C:D9:16:8F:91,bridge=vmbr0,firewall=1,tag=118
numa: 1
onboot: 1
ostype: l26
scsi0: data:vm-201-disk-1,size=800G
scsihw: virtio-scsi-pci
smbios1: uuid=c3e6fdb7-5757-442a-9d9d-8d6a64b0c303
sockets: 4
vmgenid: 542abb35-3054-42fb-b1fe-a70e2595f0db

Thank you.

Parker
 

Attachments

  • vm disk.png
    vm disk.png
    11 KB · Views: 20
  • snapshot.png
    snapshot.png
    19.1 KB · Views: 20
Hi,
if there is no reference of the snapshot in the config anymore, the state file is likely a left-over (maybe removal failed? please check the Remove Snapshot log in the VM's Task History. If you're unsure, just rename/move the state file and see if everything works before removing it for real.
 
Thank you. I have tried to check Task History and i found below error during delete the snapshot.

Task viewer: VM 201 - Delete Snapshot

OutputStatus

Stop
TASK ERROR: zfs error: cannot destroy snapshot zfs_pool_01/vm-201-state-bk@__replicate_201-1_1643112007__: dataset is busy
 
Ok, so an active replication was interfering with the removal of the state volume then. It should be safe to remove.
 
Thank you. I got the error message when i try to remove the state file. May i know some suggest to remove the state file?

Cannot remove image, a guest with VMID '201' exists!
You can delete the image from the guest's hardware pane

Thank you.
Parker
 

Attachments

  • remove.png
    remove.png
    21.6 KB · Views: 25
It's currently not possible to clean up such left-over volumes via UI. You need to remove it manually from the CLI, e.g. using pvesm free <storage>:<volume>.
 

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!