[libvirt-users] new guest with same name as undefined one

hi, - host: rhel6 - I created a guest rmdev2 (centos6) - undefined it - again created rmdev2 guest (centos6) now I get: [root@rmdev1 var]# virsh -c qemu:///system Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh # list --all Id Name State ---------------------------------- - rmdev2 shut off virsh # start rmdev2 error: Failed to start domain rmdev2 error: operation failed: cannot restore domain 'rmdev2' uuid 9e9ea633-9691-f3d6-64da-ae9c8b3e5810 from a file which belongs to domain 'rmdev2' uuid 4f425d14-335b-0adc-11af-06e503c6b54d why ? it seems the ghost of the old guest is causing problems... all the files used by the first guest are deleted... thanks. /sergio

On 09/25/2011 02:45 PM, Sergio A. Kessler wrote:
hi,
- host: rhel6 - I created a guest rmdev2 (centos6) - undefined it
This step is buggy on older servers; it was fixed in upstream libvirt 0.9.4 to refuse deletion unless you first ensure that any managed save metadata has been removed (also, 0.9.5 also refuses deletion unless you first ensure any snapshot metadata has been removed, but that does not appear to be your problem).
- again created rmdev2 guest (centos6)
now I get:
virsh # start rmdev2 error: Failed to start domain rmdev2 error: operation failed: cannot restore domain 'rmdev2' uuid 9e9ea633-9691-f3d6-64da-ae9c8b3e5810 from a file which belongs to domain 'rmdev2' uuid 4f425d14-335b-0adc-11af-06e503c6b54d
start is trying to reuse the stale managed save image that was left behind by the older domain that was not completely undefined. You should be able to correct the problem by doing 'virsh managedsave-remove rmdev2' before 'virsh start rmdev2'.
why ? it seems the ghost of the old guest is causing problems... all the files used by the first guest are deleted...
Yep, and that's why newer libvirt prevents this situation from happening. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

Hi, See if you have a /var/lib/libvirt/qemu/save/your_guest_name.save That might be the ghost of the old guest preventing startup. -- David Cohen On Sunday 25 September 2011 23:45:01 Sergio A. Kessler wrote:
hi,
- host: rhel6 - I created a guest rmdev2 (centos6) - undefined it - again created rmdev2 guest (centos6)
now I get:
[root@rmdev1 var]# virsh -c qemu:///system Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands 'quit' to quit
virsh # list --all Id Name State ---------------------------------- - rmdev2 shut off
virsh # start rmdev2 error: Failed to start domain rmdev2 error: operation failed: cannot restore domain 'rmdev2' uuid 9e9ea633-9691-f3d6-64da-ae9c8b3e5810 from a file which belongs to domain 'rmdev2' uuid 4f425d14-335b-0adc-11af-06e503c6b54d
why ? it seems the ghost of the old guest is causing problems... all the files used by the first guest are deleted...
thanks. /sergio
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users

On 09/26/2011 06:52 AM, David Cohen wrote:
Hi, See if you have a /var/lib/libvirt/qemu/save/your_guest_name.save That might be the ghost of the old guest preventing startup.
Yes, that's exactly what I suspect. However, directly messing with files under /var/lib/libvirt/... is not recommended; rather, you should go through public libvirt interfaces; in this case, 'virsh managedsave-remove your_guest_name'. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On Mon, Sep 26, 2011 at 09:57, Eric Blake <eblake@redhat.com> wrote:
On 09/26/2011 06:52 AM, David Cohen wrote:
Hi, See if you have a /var/lib/libvirt/qemu/save/your_guest_name.save That might be the ghost of the old guest preventing startup.
Yes, that's exactly what I suspect. However, directly messing with files under /var/lib/libvirt/... is not recommended; rather, you should go through public libvirt interfaces; in this case, 'virsh managedsave-remove your_guest_name'.
aha, there is ! # ls /var/lib/libvirt/qemu/save rmdev2.save # virsh managedsave-remove rmdev2 Removed managedsave image for domain rmdev2 # virsh start rmdev2 Domain rmdev2 started it seems an easy trap, because the answer of "how do I remove a vm" is just "undefine vm_name", everytime, everywhere, and however google was not helping much... and I didn't know rhel6 is old by now # rpm -q libvirt libvirt-0.8.7-18.el6_1.1.x86_64 thanks eric and david !
participants (3)
-
David Cohen
-
Eric Blake
-
Sergio A. Kessler