[ovirt-devel] [ovirt-system-tests] ssh to an oVirt VM in Lago

Milan Zamazal mzamazal at redhat.com
Tue Jun 6 15:26:54 UTC 2017


Valentina Makarova <makarovavs07 at gmail.com> writes:

> I may use a pakamiko only like this :
> https://github.com/vmakarova/ovirt-system-tests/commit/
> 3e9e5ce697da7e0567aaad8397fa886469bc5ae3
> Lago also use pakamiko, so there is not new dependencies.
>
> Is this a good way?

If we don't have higher level means to access VMs via ssh in
Lago/Ovirt-System-Tests (do we?) then I'd say using paramiko is fine.

> And few more questions about tests and ovirt network.
>
> 1) This address of vm0 192.168.201.213. What is this addres? Why it is
> ip of 'vm0'?  What gave it to vm0 and how the user may to understand
> that the address would be that?  There is not this ip in virsh
> net-list and net-dumpxml

It's probably obtained from DHCP, it's in the DHCP range specified in
LagoInitFile (*.100-*.254).

> 2) In test vm_run (004_basic_sanity) we configure interface eth0 on
> vm0 with ip 192.168.200.200.  But this interface is unreacheble from
> engine-host.And when I ask vm0 'ip address' via ssh, there is not
> interface eth1 there. What for does test add it, if it does not work?
> Should it work?  And why test finished successful if eth0 was not
> configured according a start_params?

Good questions.  The complex setup in vm_run looks somewhat mysterious.
But we should be able to use the Yaniv's suggestion:

> 2017-05-31 23:06 GMT+03:00 Yaniv Kaul <ykaul at redhat.com>:

[...]

>> We can add a fake entry in Lago init file just as we do for hosted-engine.
>> Most importantly, it'll create a MAC to IP address mapping in libvirt's
>> DHCP.
>> Of course, then we need to use this MAC.

If I understand it correctly:

- We can create a fake VM in LagoInitFile.  How do we specify it's fake,
  is it the vm-provider entry?

- If we assign IP to that VM, the mapping for DHCP is automatically
  created, and the MAC address is determined by lago.utils.ipv4_to_mac.

- Then we can specify `nics' parameter to params.VM constructor or to
  add a NIC to the VM as in add_nic test (but I'm not sure sshd would be
  available on it in that case).

Thanks,
Milan


More information about the Devel mailing list