Re: [libvirt] virsh edit error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Doug Goldstein wrote:
> In an attempt to rename a kvm vm (which was powered off) I performed
> the following:
> 
> $ virsh edit old-name
> 
> Then changed <name>old-name</name> to <name>new-name</name> and saved
> and quit from the editor.
> 
> $ virsh list --all
> 
>  Id Name                 State
> ----------------------------------
>  -  old-name            shut off
>  -  new-name          shut off
> 
> Performing an edit on each of these shows they're completely
> identical. Even the <name> section shows the old-name on both of them.
> I've performed restarts of libvirtd as well.
> 
> If the action I did is truly invalid, we should catch that an error
> out on it. However I think VM renaming can be a valid use case and we
> have the UUID to match off of for the rename. Basically, I'm
> contacting the list to see if my use case was invalid and I should
> write my patch to spit an error, or if I should write my patch to
> correct the improper handling. Patch to follow based on responses.

I actually noticed this the other day too, I just forgot to file a bug about it.
 Since the "uniqueness" of a domain is ultimately decided by the UUID, I think
that editing the name should be an allowed operation, and we should just handle
it.  This, of course, brings up the question of what do you do if you want to
change the UUID.  Following the principle of least surprise, though, I would
think that editing the UUID would also be allowed.  If you did so, I guess it
would be considered a new domain, but we should be able to handle that as well.

-- 
Chris Lalancette

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]