[lxc-devel] [lxd/master] lxd/vm: Set WorkingDirectory in unit
stgraber on Github
lxc-bot at linuxcontainers.org
Sat Nov 9 01:29:52 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20191108/24ba3811/attachment-0001.bin>
-------------- next part --------------
From 7680a8ca8e55e8b95cb26f9b597e4e3a90d04483 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 8 Nov 2019 20:27:35 -0500
Subject: [PATCH] lxd/vm: Set WorkingDirectory in unit
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 | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lxd/vm_qemu.go b/lxd/vm_qemu.go
index b00d5a0825..06d63aa044 100644
--- a/lxd/vm_qemu.go
+++ b/lxd/vm_qemu.go
@@ -676,9 +676,12 @@ local-hostname: %s
lxdAgentServiceUnit := `[Unit]
Description=LXD - agent
After=media-lxd_config.mount
+
[Service]
Type=simple
+WorkingDirectory=/media/lxd_config/
ExecStart=/media/lxd_config/lxd-agent
+
[Install]
WantedBy=multi-user.target
`
@@ -691,10 +694,12 @@ WantedBy=multi-user.target
lxdConfigDriveMountUnit := `[Unit]
Description = LXD - config drive
Before=local-fs.target
+
[Mount]
Where=/media/lxd_config
What=/dev/disk/by-label/cidata
Type=iso9660
+
[Install]
WantedBy=multi-user.target
`
More information about the lxc-devel
mailing list