Skip to content

Add the ability to get the interface addresses of a Domain (VM) #124

Open
@jessecooper

Description

@jessecooper
SUMMARY

I do not see this implemented, documented or discussed anywhere so, I am created this feature request with the good intention of implementing it if the feature is not already available.

I would like to be able to get the Interfaces Addresses of a Domain (VM).

virsh command:
virsh domifaddr --source <agent|arp|lease> <vm_name>

ISSUE TYPE
  • The idea of this feature would comes from wanting to get the IP address of an interface of a VM that has just been deployed to continue the VMs OS setup.
COMPONENT NAME

It seems the best place for this feature would be in the virt module. The VM_COMMAND could be get_ifaddresses.

ADDITIONAL INFORMATION

This module would be used to get the Domain (VM) interface addresses.
Example code using libvirt-python

- name: vm info
  community.libvirt.virt:
    command: get_ifaddresses
    source: <agent|arp|lease>
    domain: <name_of_vm>
  register: ifaddresses

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions