[lxc-devel] [lxd/master] VM: lxd_ device name prefix cannot be changed

tomponline on Github lxc-bot at linuxcontainers.org
Tue Apr 14 10:04:18 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 411 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200414/52a0334d/attachment.bin>
-------------- next part --------------
From a0ce4973c8226cf10e3c66a844b50a50474f2d32 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Tue, 14 Apr 2020 11:03:02 +0100
Subject: [PATCH] lxd/instance/drivers/driver/qemu/templates: lxd_ device name
 prefix cannot be changed

Is used by MAAS to identify devices inside VM.

Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
 lxd/instance/drivers/driver_qemu_templates.go | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lxd/instance/drivers/driver_qemu_templates.go b/lxd/instance/drivers/driver_qemu_templates.go
index 78529836a8..f83979a9bb 100644
--- a/lxd/instance/drivers/driver_qemu_templates.go
+++ b/lxd/instance/drivers/driver_qemu_templates.go
@@ -201,7 +201,8 @@ fsdev = "qemu_config"
 mount_tag = "config"
 `))
 
-// Devices use "lxd_" prefix indicating that this is a internally named device.
+// Devices use "lxd_" prefix indicating that this is a user named device.
+// The device name prefix must not be changed as it used by MAAS to identify devices inside the VM.
 var qemuDriveDir = template.Must(template.New("qemuDriveDir").Parse(`
 # {{.devName}} drive
 [fsdev "lxd_{{.devName}}"]
@@ -223,6 +224,7 @@ mount_tag = "{{.mountTag}}"
 `))
 
 // Devices use "lxd_" prefix indicating that this is a user named device.
+// The device name prefix must not be changed as it used by MAAS to identify devices inside the VM.
 var qemuDrive = template.Must(template.New("qemuDrive").Parse(`
 # {{.devName}} drive
 [drive "lxd_{{.devName}}"]
@@ -244,6 +246,7 @@ bootindex = "{{.bootIndex}}"
 `))
 
 // qemuDevTapCommon is common PCI device template for tap based netdevs.
+// The device name prefix must not be changed as it used by MAAS to identify devices inside the VM.
 var qemuDevTapCommon = template.Must(template.New("qemuDevTapCommon").Parse(`
 {{if ne .architecture "ppc64le" -}}
 [device "qemu_pcie{{.chassisIndex}}"]
@@ -268,6 +271,7 @@ bootindex = "{{.bootIndex}}"
 `))
 
 // Devices use "lxd_" prefix indicating that this is a user named device.
+// The device name prefix must not be changed as it used by MAAS to identify devices inside the VM.
 var qemuNetDevTapTun = template.Must(qemuDevTapCommon.New("qemuNetDevTapTun").Parse(`
 # Network card ("{{.devName}}" device)
 [netdev "lxd_{{.devName}}"]
@@ -280,6 +284,7 @@ downscript = "no"
 `))
 
 // Devices use "lxd_" prefix indicating that this is a user named device.
+// The device name prefix must not be changed as it used by MAAS to identify devices inside the VM.
 var qemuNetdevTapFD = template.Must(qemuDevTapCommon.New("qemuNetdevTapFD").Parse(`
 # Network card ("{{.devName}}" device)
 [netdev "lxd_{{.devName}}"]
@@ -290,6 +295,7 @@ fd = "{{.tapFD}}"
 `))
 
 // Devices use "lxd_" prefix indicating that this is a user named device.
+// The device name prefix must not be changed as it used by MAAS to identify devices inside the VM.
 var qemuNetdevPhysical = template.Must(template.New("qemuNetdevPhysical").Parse(`
 # Network card ("{{.devName}}" device)
 [device "dev-lxd_{{.devName}}"]


More information about the lxc-devel mailing list