The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/7547

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) ===
Otherwise CentOS 7 VM guests can't mount 9p shares.

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From 0b89e4b39881a1463c0b8a58ea9a9f3481652206 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parr...@canonical.com>
Date: Thu, 18 Jun 2020 09:29:39 +0100
Subject: [PATCH] lxd/instance/drivers/driver/qemu: Adds trans=virtio to 9p
 mounts

Otherwise CentOS 7 VM guests can't mount 9p shares.

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
---
 lxd/instance/drivers/driver_qemu.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lxd/instance/drivers/driver_qemu.go 
b/lxd/instance/drivers/driver_qemu.go
index 8316e05ab4..8ebb0fdd41 100644
--- a/lxd/instance/drivers/driver_qemu.go
+++ b/lxd/instance/drivers/driver_qemu.go
@@ -1912,6 +1912,11 @@ func (vm *qemu) addDriveDirConfig(sb *strings.Builder, 
bus *qemuBus, fdFiles *[]
                FSType: driveConf.FSType,
        }
 
+       // If mount type is 9p, we need to specify to use the virtio transport 
to support more VM guest OSes.
+       if agentMount.FSType == "9p" {
+               agentMount.Options = append(agentMount.Options, "trans=virtio")
+       }
+
        // Indicate to agent to mount this readonly. Note: This is purely to 
indicate to VM guest that this is
        // readonly, it should *not* be used as a security measure, as the VM 
guest could remount it R/W.
        if shared.StringInSlice("ro", driveConf.Opts) {
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to