Hi~

Thanks for the comments.

But I still don't think migrating vm1 to remote is a convenient way, because in 
attach-device tests, 
we need to transfer a xml file to remote host, and clean up all the 
environments.

I will send a patch set to test attach-interface command.
I first ssh to remote host, and run "virsh -c src_uri xxx" to test "-c" option.
This patch set is just for comments. So please review it and give some more 
comments.

Thanks. :)

On 07/05/2012 05:52 PM, Alex Jia wrote:
> On 07/05/2012 09:17 AM, tangchen wrote:
>> Hi~
>>
>> On 07/04/2012 07:03 PM, Alex Jia wrote:
>>> On 07/04/2012 06:50 PM, tangchen wrote:
>>>> Hi~
>>>>
>>>> If I want to test "virsh -c" commands, any good idea to do it?
>>>> I think class VM in libvirt_vm.py cannot meet my requirtment.
>>> I have ever suggested to support remote URI, I think it should be what you 
>>> want:
>>>
>>> http://test.kernel.org/pipermail/autotest/2011-November/009440.html
>> This patch is just what virsh_cmd() like now, isn't it?
>> It is not what I am talking about. Correct me if I made a mistake, please.
>>
>> I assume vm1 is on local host. If I run "virsh -c rempte_uri xxx", there is 
>> no vm1 on remote host.
> 
> It's your idea 1, you also test virsh -c during the migrating, although you 
> think it's not good idea,
> IMHO, if you want to write some cases to test 'virsh -c', remote URI make 
> more sense, you know
> libvirt supports many kinds of remote transports such as tls, unix, ssh, ext 
> and tcp:
> 
> http://libvirt.org/remote.html
> 
>> If I only have one case need to test -c option, and all the other cases are 
>> local tests, what should I do ?
>>
>> How about the following idea 2 ?
> URI alias may be helpful for you, for details, please see 
> /etc/libvirt/libvirt.conf.
>>>> For example:
>>>>
>>>> I have 2 Hosts: Host1 with IP1 and Host2 with IP2.
>>>> My autotest is running on Host1, and of course vm1 is also on Host1.
>>>> Now I want to test "virsh -c" option.
>>>>
>>>> 1. If I run "virsh -c qemu://IP2/system xxx", I don't have a vm1 on Host2.
>>>>      Migrating vm1 to Host2 is not a good idea, I think. Because it 
>>>> depends on migration
>>>>      test configurations, which makes my test more complicated.
>>>> OR
>>>> 2. If I ssh to Host2 and run "virsh -c qemu://IP1/system xxx", class VM 
>>>> cannot do this.
>>>>
>>>> Now, I'm using method 2, and I don't use class VM. And all the "non -c" 
>>>> tests are using
>>>> class VM, but "-c" tests are not. This is strange.
> BTW, if you run 'virsh -c qemu://IP/system xxx', you will need to configure 
> TLS certification,
> 'tls' is a default transport.
> 
>>>>
>>>> IMO, if virsh_cmd() can do this, class VM will support this kind of tests.
>>>> So maybe I will modify virsh_cmd() one more time, using method 2.
> I tend to extend virsh_cmd() to support this.
>>>> Any good idea to do this ?
>>>>
>>>> Thanks. :)
>>>>
>>>
> 
> 

-- 
Best Regards,
Tang chen
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to