On 12.08.2015 15:16, Michal Privoznik wrote: > On 10.08.2015 21:59, Tomas Meszaros wrote: >> This is an effort to implement domain rename API. Presented patch series >> consists of the following: virDomainRename API implementation for qemu, >> implementation of the virsh command domrename and the additional support >> code. >> >> The idea behind this endeavor is to provide convenient and safe way to rename >> a domain. >> >> Instead of the: >> >> virsh dumpxml domain > domain.xml >> (change domain name in domain.xml) >> virsh undefine domain >> virsh define domain.xml >> >> user can simply type: >> >> virsh domrename foo bar >> >> or call virDomainRename() API and domain "foo" will be renamed to "bar". >> >> We currently support only renaming inactive domains without snapshots. >> Renaming procedure takes care of domain log, config, guest agent path and should >> be able to recover in case of failure. >> >> I've been working on this functionality in collaboration with Michal Privoznik >> who is my mentor during the GSoC 2015. If you have any questions, ideas >> or criticism feel free to join the discussion. >> >> >> v2: >> - removed guest agent path rename code >> - removed rename permission >> - added code for emitting undefined+renamed event for the old domain >> >> v3: >> - removed domain rename permission >> - fixed virDomainRename doc comment >> - added @flags parameter to the virDomainRename API >> >> Tomas Meszaros (5): >> Introduce virDomainRename API >> virsh: Implement "domrename" command >> domain_conf: Introducde virDomainObjListRenameAddNew() & >> virDomainObjListRenameRemove() >> Introduce new VIR_DOMAIN_EVENT_DEFINED_RENAMED event >> qemu: Implement virDomainRename >> >> examples/object-events/event-test.c | 4 + >> include/libvirt/libvirt-domain.h | 6 ++ >> src/conf/domain_conf.c | 35 +++++++++ >> src/conf/domain_conf.h | 5 ++ >> src/driver-hypervisor.h | 6 ++ >> src/libvirt-domain.c | 34 +++++++++ >> src/libvirt_private.syms | 2 + >> src/libvirt_public.syms | 5 ++ >> src/qemu/qemu_driver.c | 145 ++++++++++++++++++++++++++++++++++++ >> src/remote/remote_driver.c | 1 + >> src/remote/remote_protocol.x | 18 ++++- >> src/remote_protocol-structs | 8 ++ >> tools/virsh-domain.c | 63 +++++++++++++++- >> tools/virsh.pod | 7 ++ >> 14 files changed, 336 insertions(+), 3 deletions(-) >> > ACK series. Although, since this is somewhat controversial topic, I'll > let others to chime in and express their feelings before pushing. > Since nobody objected, I've pushed these. Good job! Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list