Bug 579435 - migration: can not rename a guest without "<migrateuri>"
migration: can not rename a guest without "<migrateuri>"
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Libvirt Maintainers
: FutureFeature
Depends On:
Blocks: Rhel6.1LibvirtTier1
  Show dependency treegraph
Reported: 2010-04-05 03:01 EDT by Osier Yang
Modified: 2016-04-26 13:21 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-03-20 19:42:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Osier Yang 2010-04-05 03:01:12 EDT
Description of problem:
If "domain rename" is supported, we can't use it without specify "<migrateuri>" meanwhile. 

If they are really needed be together to work. probly we should update the help strings and document. such as "<dname> rename to new name during migration (if supported), must use with <migrateuri>". but not just says "<migrateuri>" can be omitted. so may be the end-user will try to use like this:
   # virsh migrate --live toy qemu+ssh://${target_host_ip}/system toy-f1
definitely, it will be failed.

If they aren't needed be together to work, probly we should provide "options" to the migrate command to seperate them. such as "virsh migrate --live toy qemu+ssh://${target_host_ip}/system --dname toy-f1". 

following is part of the help strings in virsh:
    --undefinesource  undefine VM on source
    --suspend        do not restart the domain on the destination host
    <domain>         domain name, id or uuid
    <desturi>        connection URI of the destination host
    <migrateuri>     migration URI, usually can be omitted
    <dname>          rename to new name during migration (if supported)

Version-Release number of selected component (if applicable):
virsh # version
Compiled against library: libvir 0.7.8
Using library: libvir 0.7.8
Using API: QEMU 0.7.8
Running hypervisor: QEMU 0.12.1

How reproducible:

Steps to Reproduce:
Actual results:
definitely, it will be failed, because it will parse "toy-f1" as a tcp URI.

Expected results:
if <dname> and <migrateuri> must be used together, improve the document and help strings.

if they need not be used together, provide some options to tell the command line parser seperate them, such as 
--migrateuri qemu+ssh://${target_host_ip}/system --dname toy-f1 

Additional info:
Comment 3 Osier Yang 2010-04-05 04:06:01 EDT
[root@dhcp-66-70-* ~]# rpm -q libvirt libvirt-client qemu-kvm

Comment 4 Daniel Berrange 2010-04-22 09:15:20 EDT
This is a limitation of the way the virsh migrate command was written. It really should have used flags for the optional stuff, instead of positional args. Not sure best way to re-write this.

Perhaps we should allow for any of the named positional args to be set via the flags at the same time.
Comment 7 Cole Robinson 2016-03-20 19:42:59 EDT
I'm pretty sure this limitation has been long since fixed using the different internal migration APIs

Note You need to log in before you can comment on or make changes to this bug.