Red Hat Bugzilla – Bug 507405
virsh: renaming of guests creates a copy
Last modified: 2013-04-29 12:11:07 EDT
Description of problem:
Changing a guests name using virsh edit creates a copy of it.
Version-Release number of selected component (if applicable):
Fedora 11 x86_64 libvirt-0.6.2
Steps to Reproduce:
1. virsh edit somehost
2. Edit name inside of <name>somehost</name>
3. virsh list --all
4. Now you should have 2 guests with the same UUID - one with the old name, one with the new one
The latest libvirt now has proper UUID/name uniqueness checking and complains suitably if you edit the 'name', but leave the UUID alone.
# virsh edit openfiler23
error: operation failed: domain 'openfiler23' is already defined with uuid 7699653a-0b6c-d8b1-6c37-8e39d219cd3f
Opps, shouldn't have closed this one, since its against F11, not rawhide.
Upstream fix was
Author: Daniel P. Berrange <email@example.com>
Date: Fri May 8 10:11:14 2009 +0000
Improve name & UUID uniqueness checking in QEMU driver
Built fix into libvirt-0.6.2-14.fc11
libvirt-0.6.2-14.fc11 has been submitted as an update for Fedora 11.
libvirt-0.6.2-14.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update libvirt'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8333
after the upgrade i'm completely unable to rename a guest.
virsh edit Drupal-Testing // changed name; save and quit editor
Fehler: operation failed: domain 'Drupal-Testing' is already defined with uuid 352617c1-d0f3-a1c1-add5-7d4a429be183
Yes, that is the intended fix, renaming is not supported in libvirt.
libvirt-0.6.2-14.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
I'm using FC13 with libvirt-0.8.2, but the problem still persist! I tried rename my VM using the following steps:
1) virsh edit win-xp
2) change the attribute : "name" in xml the my VM.
After save the XML VM windows I recevied the following message:
error: operation failed: domain 'win-xp' is already defined with uuid 0f318195-9fbd-cedc-6683-6c8f876e957e
Sorry, maybe I'm making a mistake in the procedure.
Version my packages libvirt...
[root@dellbook2 qemu]# rpm -qa |grep -i libvirt
(In reply to comment #10)
> Hi, people!
> I'm using FC13 with libvirt-0.8.2, but the problem still persist! I tried
> rename my VM using the following steps:
> 1) virsh edit win-xp
> 2) change the attribute : "name" in xml the my VM.
> After save the XML VM windows I recevied the following message:
> error: operation failed: domain 'win-xp' is already defined with uuid
No, that is exactly the expected behavior. virsh edit does not support changing the name or UUID. If you want to change either of those, you'll need to:
virsh dumpxml $DOMAIN > domain.xml
virsh undefine $DOMAIN
virsh define domain.xml
This worked. Pardon my ignorance!!! ;o)
Thanks for the tips..