cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Improve ConfigDrive to store network information

Open wido opened this issue 6 years ago • 15 comments

ConfigDrive / cloud-init supports a network_data.json file which can contain network information for a VM.

By providing the network information using ConfigDrive to a VM we can eliminate the need for DHCP and thus the Virtual Router in some use-cases.

An example JSON file:

{
    "links": [
        {
            "ethernet_mac_address": "52:54:00:0d:bf:93",
            "id": "eth0",
            "mtu": 1500,
            "type": "phy"
        }
    ],
    "networks": [
        {
            "id": "eth0",
            "ip_address": "192.168.200.200",
            "link": "eth0",
            "netmask": "255.255.255.0",
            "network_id": "dacd568d-5be6-4786-91fe-750c374b78b4",
            "routes": [
                {
                    "gateway": "192.168.200.1",
                    "netmask": "0.0.0.0",
                    "network": "0.0.0.0"
                }
            ],
            "type": "ipv4"
        },
        {
            "id": "eth0",
            "ip_address": "2001:db8:100::1337",
            "link": "eth0",
            "netmask": "64",
            "network_id": "dacd568d-5be6-4786-91fe-750c374b78b4",
            "routes": [
                {
                    "gateway": "2001:db8:100::1",
                    "netmask": "0",
                    "network": "::"
                }
            ],
            "type": "ipv6"
        }
    ],
    "services": [
        {
            "address": "8.8.8.8",
            "type": "dns"
        }
    ]
}

In Basic Networking and Advanced Networking zones which are using a shared network you wouldn't require a VR anymore.

wido avatar Oct 02 '18 15:10 wido