Provide a common share between VMs to allow easy communication

Every VM now mounts a common SMB share on /tmp/shared.
This commit is contained in:
Eelco Dolstra
2012-08-16 10:47:33 -04:00
parent 0e3f03106f
commit a025e7e7e2
2 changed files with 23 additions and 1 deletions

View File

@@ -155,6 +155,14 @@ let
cd $TMPDIR
mkdir -p $TMPDIR/xchg
EXTRA_SAMBA_CONF="
[shared]
force user = $WHO
path = ''${SHARED_DIR:-$TMPDIR/xchg}
read only = no
guest ok = yes
"
${pkgs.vmTools.startSamba}
# Start QEMU.
@@ -328,6 +336,12 @@ in
options = "guest,sec=none,noperm,noacl";
neededForBoot = true;
}
{ mountPoint = "/tmp/shared";
device = "//10.0.2.4/shared";
fsType = "cifs";
options = "guest,sec=none,noperm,noacl";
neededForBoot = true;
}
] ++ optional cfg.useBootLoader
{ mountPoint = "/boot";
device = "/dev/disk/by-label/boot";