[libvirt] [PATCH v2] tools: Fix connect command

Martin Kletzander mkletzan at redhat.com
Mon Apr 25 06:11:23 UTC 2016


On Sat, Apr 23, 2016 at 01:18:48PM -0400, Cole Robinson wrote:
>On 04/22/2016 02:28 AM, Martin Kletzander wrote:
>> The man page says: "(Re)-Connect to the hypervisor. When the shell is
>> first started, this is automatically run with the URI parameter
>> requested by the "-c" option on the command line."  However, if you run:
>>
>>   virsh -c 'test://default' 'connect; uri'
>>
>> the output will not be 'test://default'.  That's because the 'connect'
>> command does not care about any virsh-only related settings and if it is
>> run without parameters, it connects with @uri == NULL.  Not only that
>> doesn't comply to what the man page describes, but it also doesn't make
>> sense.  It also means you aren't able to reconnect to whatever you are
>> connected currently.
>>
>> So let's fix that in both virsh and virt-admin add a test case for it.
>>
>> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
>
>There's something funky here:
>
>$ sudo ./tools/virsh --connect qemu:///system
>Welcome to lt-virsh, the virtualization interactive terminal.
>
>Type:  'help' for help with commands
>       'quit' to quit
>
>virsh # connect test:///default
>error: Reconnected to the hypervisor
>
>virsh # list --all
> Id    Name                           State
>----------------------------------------------------
> 1     test                           running
>
>
>It prints an error, but seems to succeed
>

I've never noticed that "Reconnected to hypervisor" is an error :D
I'll look into that.

>- Cole
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160425/80eb817b/attachment-0001.sig>


More information about the libvir-list mailing list