]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commit
Improve Windows libvirt VM IP detection 2045/head
authorIonut Balutoiu <ibalutoiu@cloudbasesolutions.com>
Mon, 8 Aug 2022 11:10:52 +0000 (14:10 +0300)
committerIonut Balutoiu <ibalutoiu@cloudbasesolutions.com>
Mon, 8 Aug 2022 14:18:47 +0000 (17:18 +0300)
commit7321b9506bc9002f7312047c0fcc87934c0e23a8
treeaf92427a72b819708688ac416815ef6bd48f5701
parent0049e3f3a4af6d23bc8bb173f3e98b5e2b4dd6e5
Improve Windows libvirt VM IP detection

On some of the KVM hosts targeted by the Windows jobs, the main
interface within the VM will have a different NIC name.

Therefore, the command:
```
virsh domifaddr --source agent --interface Ethernet --full $VM_NAME
```
will not return anything, since the NIC name is not guaranteed to
have `Ethernet` name.

These changes improve how the VM IP is detected, by filtering the
guest NICs via MAC address to find the proper NIC. Furthermore, the
VM address belonging to the `default` virsh network is returned.
ceph-windows-image-build/build/build
scripts/ceph-windows/setup_libvirt_vm