The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/8182
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From 610d38f21c2eeff3c1f31f3edb30860d559bd2dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Tue, 24 Nov 2020 13:02:26 -0500 Subject: [PATCH] lxd/device/disk: Include network-config in cidata MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/device/disk.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lxd/device/disk.go b/lxd/device/disk.go index ada3f82160..da29808a40 100644 --- a/lxd/device/disk.go +++ b/lxd/device/disk.go @@ -1757,6 +1757,15 @@ func (d *disk) generateVMConfigDrive() (string, error) { return "", err } + // Include a network-config file if the user configured it. + networkConfig := instanceConfig["user.network-config"] + if networkConfig != "" { + err = ioutil.WriteFile(filepath.Join(scratchDir, "network-config"), []byte(networkConfig), 0400) + if err != nil { + return "", err + } + } + // Append any custom meta-data to our predefined meta-data config. metaData := fmt.Sprintf(`instance-id: %s local-hostname: %s
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel