<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 6, 2017 at 11:26 AM, Milan Zamazal <span dir="ltr"><<a href="mailto:mzamazal@redhat.com" target="_blank">mzamazal@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">Valentina Makarova <<a href="mailto:makarovavs07@gmail.com">makarovavs07@gmail.com</a>> writes:<br>
<br>
> I may use a pakamiko only like this :<br>
> <a href="https://github.com/vmakarova/ovirt-system-tests/commit/" rel="noreferrer" target="_blank">https://github.com/vmakarova/<wbr>ovirt-system-tests/commit/</a><br>
> 3e9e5ce697da7e0567aaad8397fa88<wbr>6469bc5ae3<br>
> Lago also use pakamiko, so there is not new dependencies.<br>
><br>
> Is this a good way?<br>
<br>
</span>If we don't have higher level means to access VMs via ssh in<br>
Lago/Ovirt-System-Tests (do we?) then I'd say using paramiko is fine.<br>
<span class="gmail-"><br>
> And few more questions about tests and ovirt network.<br>
><br>
> 1) This address of vm0 192.168.201.213. What is this addres? Why it is<br>
> ip of 'vm0'? What gave it to vm0 and how the user may to understand<br>
> that the address would be that? There is not this ip in virsh<br>
> net-list and net-dumpxml<br>
<br>
</span>It's probably obtained from DHCP, it's in the DHCP range specified in<br>
LagoInitFile (*.100-*.254).<br>
<span class="gmail-"><br>
> 2) In test vm_run (004_basic_sanity) we configure interface eth0 on<br>
> vm0 with ip 192.168.200.200. But this interface is unreacheble from<br>
> engine-host.And when I ask vm0 'ip address' via ssh, there is not<br>
> interface eth1 there. What for does test add it, if it does not work?<br>
> Should it work? And why test finished successful if eth0 was not<br>
> configured according a start_params?<br>
<br>
</span>Good questions. The complex setup in vm_run looks somewhat mysterious.<br>
But we should be able to use the Yaniv's suggestion:<br>
<span class="gmail-"><br>
> 2017-05-31 23:06 GMT+03:00 Yaniv Kaul <<a href="mailto:ykaul@redhat.com">ykaul@redhat.com</a>>:<br>
<br>
</span>[...]<br>
<span class="gmail-"><br>
>> We can add a fake entry in Lago init file just as we do for hosted-engine.<br>
>> Most importantly, it'll create a MAC to IP address mapping in libvirt's<br>
>> DHCP.<br>
>> Of course, then we need to use this MAC.<br>
<br>
</span>If I understand it correctly:<br>
<br>
- We can create a fake VM in LagoInitFile. How do we specify it's fake,<br>
is it the vm-provider entry?<br></blockquote><div><br></div><div>Not sure, but here's the example of hosted-engine VM:</div><div> __ENGINE__:</div><div> vm-provider: ssh</div><div> vm-type: ovirt-engine</div><div> distro: el7</div><div> service_provider: systemd</div><div> ssh-password: 123456</div><div> nics:</div><div> - net: __LAGO_NET__</div><div> ip: 192.168.200.99</div><div> metadata:</div><div> ovirt-engine-password: 123</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
- If we assign IP to that VM, the mapping for DHCP is automatically<br>
created, and the MAC address is determined by lago.utils.ipv4_to_mac.<br></blockquote><div><br></div><div>Or use static IP mapping - see above.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
- Then we can specify `nics' parameter to params.VM constructor or to<br>
add a NIC to the VM as in add_nic test (but I'm not sure sshd would be<br>
available on it in that case).<br></blockquote><div><br></div><div>I'd hope so...</div><div>Y.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Thanks,<br>
Milan<br>
</blockquote></div><br></div></div>