phsm commented on issue #11725: URL: https://github.com/apache/cloudstack/issues/11725#issuecomment-3338332273
@wido The example you've provided seems to be indeed too basic, as Cloudstack supports more than just 1 IPv4 and IPv6 address per VM. There may be multiple NICs, and each of them can have multiple IP addresses... I checked the nics table (NicVO object if I am not mistaken), and this is what is possible to do with that info: ```xml <metadata> <cloudstack:instance xmlns:cloudstack="http://cloudstack.apache.org/instance"> <!-- .. the rest of the metadata .. --> <cloudstack:network> <cloudstack:nic> <network:address type="primary" netmask="255.255.255.0" gateway="192.168.122.1" family="ipv4" isolation_uri="vlan://10">192.168.122.5</network:address> <network:address type="secondary" netmask="255.255.255.0" gateway="192.168.122.1" family="ipv4" isolation_uri="vlan://10">192.168.122.6</network:address> <network:address type="primary" cidr="2001:db8::/64" gateway="2001:db8::1" family="ipv6" isolation_uri="vlan://10">2001:db8::2</network:address> </cloudstack:nic> <cloudstack:nic> <network:address type="primary" netmask="255.255.255.0" gateway="10.0.0.1" family="ipv4" isolation_uri="vlan://11">10.0.0.2</network:address> <network:address type="secondary" netmask="255.255.255.0" gateway="10.0.0.1" family="ipv4" isolation_uri="vlan://10">10.0.0.3</network:address> </cloudstack:nic> </cloudstack:network> </cloudstack:instance> </metadata> ``` Note that this example misses the fields from your proposal: - prefix (although it can be derived from the netmask) - bridge name because it needs to be traced all the way back from the NIC to the correct traffic type on the physical network. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
