You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Nux (Jira)" <ji...@apache.org> on 2022/02/28 11:07:00 UTC

[jira] [Updated] (CLOUDSTACK-10450) GSoC 2022 Idea: Autodetect IPs used inside the VM

     [ https://issues.apache.org/jira/browse/CLOUDSTACK-10450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nux updated CLOUDSTACK-10450:
-----------------------------
    Description: 
With regards to IP info reporting, Cloudstack relies entirely on it's DHCP data bases and so on. When this is not available (L2 networks etc) no IP information is shown for a given VM.

I propose we introduce a mechanism for "IP autodetection" and try to discover the IPs used inside the machines by means of querying the hypervisors. For example with KVM/libvirt we can simply do something like this:

 
{code:java}
root@fedora35 ~]# virsh domifaddr win2k22 --source agent  
Name MAC address Protocol Address 
------------------------------------------------------------------------------- 
Ethernet 52:54:00:7b:23:6a ipv4 192.168.0.68/24 
Loopback Pseudo-Interface 1 ipv6 ::1/128 - - ipv4 127.0.0.1/8 {code}

The above command queries the qemu-guest-agent inside the Windows VM. The VM needs to have the qemu-guest-agent installed and running as well as the virtio serial drivers (easily done in this case with [virtio-win-guest-tools.exe|https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.215-2/virtio-win-guest-tools.exe] ) as well as a guest-agent socket channel defined in libvirt.

Once we have this information we could display it in the UI/API as "Autodetected VM IPs" or something like that.

I imagine it's very similar for VMWare and XCP-ng.

Thank you

  was:
With regards to IP info reporting, Cloudstack relies entirely on it's DHCP data bases and so on. When this is not available (L2 networks etc) no IP information is shown for a given VM.

I propose we introduce a mechanism for "IP autodetection" and try to discover the IPs used inside the machines by means of querying the hypervisors. For example with KVM/libvirt we can simply do something like this:

{{}}
{code:java}
root@fedora35 ~]# virsh domifaddr win2k22 --source agent  Name MAC address Protocol Address ------------------------------------------------------------------------------- 
Ethernet 52:54:00:7b:23:6a ipv4 192.168.0.68/24 
Loopback Pseudo-Interface 1 ipv6 ::1/128 - - ipv4 127.0.0.1/8 {code}
{{}}
The above command queries the qemu-guest-agent inside the Windows VM. The VM needs to have the qemu-guest-agent installed and running as well as the virtio serial drivers (easily done in this case with [virtio-win-guest-tools.exe|https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.215-2/virtio-win-guest-tools.exe] ) as well as a guest-agent socket channel defined in libvirt.

Once we have this information we could display it in the UI/API as "Autodetected VM IPs" or something like that.

I imagine it's very similar for VMWare and XCP-ng.

Thank you


> GSoC 2022 Idea: Autodetect IPs used inside the VM
> -------------------------------------------------
>
>                 Key: CLOUDSTACK-10450
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10450
>             Project: CloudStack
>          Issue Type: New Feature
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server
>            Reporter: Nux
>            Priority: Minor
>              Labels: gsoc2022, new-feature
>
> With regards to IP info reporting, Cloudstack relies entirely on it's DHCP data bases and so on. When this is not available (L2 networks etc) no IP information is shown for a given VM.
> I propose we introduce a mechanism for "IP autodetection" and try to discover the IPs used inside the machines by means of querying the hypervisors. For example with KVM/libvirt we can simply do something like this:
>  
> {code:java}
> root@fedora35 ~]# virsh domifaddr win2k22 --source agent  
> Name MAC address Protocol Address 
> ------------------------------------------------------------------------------- 
> Ethernet 52:54:00:7b:23:6a ipv4 192.168.0.68/24 
> Loopback Pseudo-Interface 1 ipv6 ::1/128 - - ipv4 127.0.0.1/8 {code}
> The above command queries the qemu-guest-agent inside the Windows VM. The VM needs to have the qemu-guest-agent installed and running as well as the virtio serial drivers (easily done in this case with [virtio-win-guest-tools.exe|https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.215-2/virtio-win-guest-tools.exe] ) as well as a guest-agent socket channel defined in libvirt.
> Once we have this information we could display it in the UI/API as "Autodetected VM IPs" or something like that.
> I imagine it's very similar for VMWare and XCP-ng.
> Thank you



--
This message was sent by Atlassian Jira
(v8.20.1#820001)