I was doing some maintenance and noticed that the disk section of a running VM was empty. I have verified that somehow the primary vhd for this VM has the "is-a-snapshot" attribute set as true with no parent. It also seems that it is listed as a snapshot to itself:
xe vdi-param-list uuid=766d1995-19ba-420f-95e4-30e42dcbc698
uuid ( RO) : 766d1995-19ba-420f-95e4-30e42dcbc698
name-label ( RW): rss01 0
name-description ( RW):
is-a-snapshot ( RO): true
snapshot-of ( RO): 766d1995-19ba-420f-95e4-30e42dcbc698
snapshots ( RO): 6714273a-444b-4a21-ad58-b72abb85d6a7; 766d1995-19ba-420f-95e4-30e42dcbc698; 7b3e6fe8-a9f5-4cc1-8f13-d52f474bf7ab
snapshot-time ( RO): 20241228T06:08:27Z
allowed-operations (SRO): snapshot; clone
current-operations (SRO):
sr-uuid ( RO): e5eda81e-540b-029b-f180-20124f81163e
sr-name-label ( RO): HDD RAID1
vbd-uuids (SRO): 47e78473-706f-8e36-a017-c0983fdf2560
crashdump-uuids (SRO):
virtual-size ( RO): 214748364800
physical-utilisation ( RO): 426496
location ( RO): 766d1995-19ba-420f-95e4-30e42dcbc698
type ( RO): System
sharable ( RO): false
read-only ( RO): false
storage-lock ( RO): false
managed ( RO): true
parent ( RO) [DEPRECATED]: <not in database>
missing ( RO): false
is-tools-iso ( RO): false
other-config (MRW):
xenstore-data (MRO):
sm-config (MRO): vhd-parent: 03b82421-c7a0-4c13-8d02-52aae2831674; read-caching-enabled-on-0250c976-1a99-4ee3-8b4b-27840941d478: true; host_OpaqueRef:24473335-4516-4675-aba9-ece2b4a46fef: RW
on-boot ( RW): persist
allow-caching ( RW): false
metadata-latest ( RO): false
metadata-of-pool ( RO): <not in database>
tags (SRW):
cbt-enabled ( RO): false
I found a couple of related posts. The first seems to have no resolution and it seems in the second, the solution was to export and import the VM:
https://xcp-ng.org/forum/topic/6981/vmguest-disk-is-missing-in-xen-orchestra/11
https://xcp-ng.org/forum/topic/6336/vm-missing-disk/26
I checked all SRs and none seem to have any coalesce locks so I'm not sure I have any current problems related to coalescence.
I'd like to resolve this in place if possible. Is there a way to set the "is-a-snapshot" flag to false? Is there something else I should check? Or is it best to export and import?