Hello!

I have a use case which I'm struggling to support with libvirt:
saving a VM to a file, cloning it (which renames the VM), and restoring it.

My search revealed a number of tutorials for using virt-clone [1], but that
doesn't seem to cover VMs which are _saved_ (only running or paused).

[1] https://github.com/virt-manager/virt-manager/blob/main/virtinst/virtclone.py

In a nutshell, I want to power on a VM and do some setup, then save its full
state to disk (e.g., with virsh save). Finally I want to modify the XML to:
- rename the VM
- change which bridge its NICs are on (while maintaining mac addresses)
- change the disk image to a copy (done while the VM is saved)

But the restore operation fails because of a target domain name check
implemented in virDomainDefCheckABIStabilityFlags(). I've debated how to best
address this and I'm looking for your views.

I suspect this call is there for a reason (which may still be relevant),
although the name is clearly not part of the ABI; it's the host identifier for
that domain and not guest-visible. My first stab at this is therefore just to
drop this check (patch attached).

I'm open to suggestions, for example by plumbing through a flag which makes the
check optional. Please let me know how you prefer that I take this forward.

Thanks,
F.

Felipe Franciosi (1):
  conf: remove domain name change check on CheckABI

 src/conf/domain_conf.c | 11 -----------
 1 file changed, 11 deletions(-)

-- 
2.39.5

Reply via email to