Hi libvirt guys, I am an newbie to libvirt. There is an requirement for libvirt: Every time I want to rename an guest by virsh command, I need to virsh edit origin_guest(edit the name,delete/edit the uuid) after that a new guest with the same configuration as origin_guest was defined, then virsh undefine origin_guest. Seems it's a little complex, so should be there an virsh command like "virsh rename origin_guest new_guest"? I know I can use virt-manager to rename an guest,but if there is an virsh command can do it, I think it's much useful. Thanks -- Regards shyu
On Wed, Oct 30, 2013 at 07:49:22AM -0400, shyu wrote:> Hi libvirt guys, > > I am an newbie to libvirt. There is an requirement for libvirt: > Every time I want to rename an guest by virsh command, I need to virsh > edit origin_guest(edit the name,delete/edit the uuid) after that a new > guest with the same configuration as origin_guest was defined, > then virsh undefine origin_guest. > Seems it's a little complex, so should be there an virsh command like > "virsh rename origin_guest new_guest"? > I know I can use virt-manager to rename an guest,but if there is an > virsh command can do it, I think it's much useful.There's no libvirt API for guest rename, though one has often been requested. It would be non-trivial (potentially impossible) to make it work for running guests, but certainly doable for inactive guests. Patches welcome from anyone interested in tackling it... If you focus on the inactive guest rename only, it would be a fairly simple piece of work that is a good introduction to writing code for libvirt & its QEMU/KVM driver. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Got it. Thanks ----- Original Message -----> From: "Daniel P. Berrange" <berrange@redhat.com> > To: "shyu" <shyu@redhat.com> > Cc: libvirt-users@redhat.com > Sent: Wednesday, October 30, 2013 7:59:54 PM > Subject: Re: [libvirt-users] A RFE for libvirt > > On Wed, Oct 30, 2013 at 07:49:22AM -0400, shyu wrote: > > Hi libvirt guys, > > > > I am an newbie to libvirt. There is an requirement for libvirt: > > Every time I want to rename an guest by virsh command, I need to virsh > > edit origin_guest(edit the name,delete/edit the uuid) after that a new > > guest with the same configuration as origin_guest was defined, > > then virsh undefine origin_guest. > > Seems it's a little complex, so should be there an virsh command like > > "virsh rename origin_guest new_guest"? > > I know I can use virt-manager to rename an guest,but if there is an > > virsh command can do it, I think it's much useful. > > There's no libvirt API for guest rename, though one has often been > requested. It would be non-trivial (potentially impossible) to make > it work for running guests, but certainly doable for inactive guests. > > Patches welcome from anyone interested in tackling it... If you focus > on the inactive guest rename only, it would be a fairly simple piece > of work that is a good introduction to writing code for libvirt & its > QEMU/KVM driver. > > Regards, > Daniel > -- > |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| > |: http://libvirt.org -o- http://virt-manager.org :| > |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| > |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| >-- Regards shyu
Maybe Matching Threads
- Re: A RFE for libvirt
- Re: Problem about Disk Dize of Destination and Source File after Do Blockcopy
- Problem about Disk Dize of Destination and Source File after Do Blockcopy
- virsh blockcopy without undefine
- virsh blockcopy: doesn't seem to flatten the chain by default