[lxc-devel] [lxd/master] Add LXD VM identifier file

stgraber on Github lxc-bot at linuxcontainers.org
Wed Nov 13 16:44:19 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 301 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20191113/e0a3df30/attachment.bin>
-------------- next part --------------
From e98358a247ed931bb4d5e886875d331aa719548d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 13 Nov 2019 08:43:09 -0800
Subject: [PATCH 1/2] lxd/vm: Cleanup config layout
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxd/vm_qemu.go | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/lxd/vm_qemu.go b/lxd/vm_qemu.go
index 2a87f9c893..db958c8b94 100644
--- a/lxd/vm_qemu.go
+++ b/lxd/vm_qemu.go
@@ -763,17 +763,21 @@ type = "q35"
 accel = "kvm"
 usb = "off"
 graphics = "off"
+
 [global]
 driver = "ICH9-LPC"
 property = "disable_s3"
 value = "1"
+
 [global]
 driver = "ICH9-LPC"
 property = "disable_s4"
 value = "1"
+
 [boot-opts]
 strict = "on"
-# SCSI root
+
+# PCIe root
 [device "qemu_pcie1"]
 driver = "pcie-root-port"
 port = "0x10"
@@ -781,10 +785,12 @@ chassis = "1"
 bus = "pcie.0"
 multifunction = "on"
 addr = "0x2"
+
 [device "qemu_scsi"]
 driver = "virtio-scsi-pci"
 bus = "qemu_pcie1"
 addr = "0x0"
+
 # Balloon driver
 [device "qemu_pcie2"]
 driver = "pcie-root-port"
@@ -792,25 +798,30 @@ port = "0x12"
 chassis = "2"
 bus = "pcie.0"
 addr = "0x2.0x1"
+
 [device "qemu_ballon"]
 driver = "virtio-balloon-pci"
 bus = "qemu_pcie2"
 addr = "0x0"
+
 # Random number generator
 [object "qemu_rng"]
 qom-type = "rng-random"
 filename = "/dev/urandom"
+
 [device "qemu_pcie3"]
 driver = "pcie-root-port"
 port = "0x13"
 chassis = "3"
 bus = "pcie.0"
 addr = "0x2.0x2"
+
 [device "dev-qemu_rng"]
 driver = "virtio-rng-pci"
 rng = "qemu_rng"
 bus = "qemu_pcie3"
 addr = "0x0"
+
 # Console
 [chardev "console"]
 backend = "pty"

From ff24242cf333dda85df757a5fe3cc2696ad7c1f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 13 Nov 2019 08:43:44 -0800
Subject: [PATCH 2/2] lxd/vm: Add an identifying serial device
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxd/vm_qemu.go | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lxd/vm_qemu.go b/lxd/vm_qemu.go
index db958c8b94..7cd377504d 100644
--- a/lxd/vm_qemu.go
+++ b/lxd/vm_qemu.go
@@ -777,6 +777,14 @@ value = "1"
 [boot-opts]
 strict = "on"
 
+# LXD serial identifier
+[device]
+driver = "virtio-serial"
+
+[device]
+driver = "virtserialport"
+name = "org.linuxcontainers.lxd"
+
 # PCIe root
 [device "qemu_pcie1"]
 driver = "pcie-root-port"


More information about the lxc-devel mailing list