Skip to content

Improve Windows libvirt VM IP detection - #2045

Merged
djgalloway merged 1 commit into
ceph:mainfrom
ionutbalutoiu:fix-windows-jenkins-jobs
Aug 8, 2022
Merged

djgalloway merged 1 commit into
ceph:mainfrom
ionutbalutoiu:fix-windows-jenkins-jobs

Conversation

@ionutbalutoiu

Copy link
Copy Markdown

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.

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.
@djgalloway
djgalloway merged commit 173faed into ceph:main Aug 8, 2022
@ionutbalutoiu
ionutbalutoiu deleted the fix-windows-jenkins-jobs branch August 10, 2022 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants