feat: include -flat.vmdk files in backup reference list

This commit is contained in:
Rizqi 2026-06-22 01:46:42 +07:00
parent 9621175a76
commit 5a1e254ad2

View File

@ -339,7 +339,11 @@ def _run_backup_impl(host, user, password, vm_name, dest, compress, no_verify_ss
if not vmdk_refs: if not vmdk_refs:
print("Warning: no disks selected — backing up VMX config only.") print("Warning: no disks selected — backing up VMX config only.")
all_refs = vmdk_refs[:] all_refs = []
for ref in vmdk_refs:
all_refs.append(ref)
if ref.lower().endswith('.vmdk') and not ref.lower().endswith('-flat.vmdk'):
all_refs.append(ref[:-5] + '-flat.vmdk')
if vmx_ref: if vmx_ref:
all_refs.append(vmx_ref) all_refs.append(vmx_ref)