Bug 698077

Summary: [LXC] repeating to define lxc guest with the same xml gets no error prompt
Product: Red Hat Enterprise Linux 6 Reporter: Vivian Bian <vbian>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 6.1CC: eblake, jyang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-20 08:06:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vivian Bian 2011-04-20 06:20:55 UTC
Description of problem:


Version-Release number of selected component (if applicable):
libvirt-0.8.7-18.el6.x86_64


How reproducible:
Always

Steps to Reproduce:
# virsh -c lxc:///
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # define lxc-1.xml 
Domain vm1 defined from lxc-1.xml

virsh # list --all
 Id Name                 State
----------------------------------
  - vm1                  shut off

virsh # define lxc-1.xml 
Domain vm1 defined from lxc-1.xml

virsh # define lxc-1.xml 
Domain vm1 defined from lxc-1.xml

virsh # list --all
 Id Name                 State
----------------------------------
  - vm1                  shut off


  
Actual results:


Expected results:
the prompt message enhancement is required . 

Additional info:
Tried to change the lxc guest name in the xml , and leave the uuid the same with the existing one . Could get the exact error prompt 
virsh # define lxc-1.xml 
error: Failed to define domain from lxc-1.xml
error: operation failed: domain 'vm1' is already defined with uuid 386f5b25-43ee-9d62-4ce2-58c3809e47c1

Comment 1 Osier Yang 2011-04-20 07:41:11 UTC
You can also define a domain with same xml for qemu, but that's expected, and actually it's a design.

If a same domain (same domain name and UUID) is already defined, any new "define" will update the domain config. That's why you can define it many times with no changes on the domain xml, but error when you changed the guest name.