Question on shared folder host

So, after the Whonix was installed and for ability to share files between host and VM I need to create and run “.sh” file (wrote below) with this code inside? Em I right?

##Create shared directory and adjust permissions
mkdir --parents /mnt/shared
chmod 777 /mnt/shared
mkdir --parents /mnt/gateway-shared
mkdir --parents /mnt/workstation-shared
chmod 777 /mnt/gateway-shared
chmod 777 /mnt/workstation-shared

virsh -c qemu:///system net-autostart “default” || true
virsh -c qemu:///system net-start “default” || true
@@ -81,7 +83,8 @@ virsh -c qemu:///system net-start “Whonix-Internal” || true
virsh -c qemu:///system define “$temp_dir/xml/Whonix-Gateway.xml” || true
virsh -c qemu:///system define “$temp_dir/xml/Whonix-Workstation.xml” || true

virt-xml “Whonix-Workstation” --add-device --filesystem source=/mnt/shared,target=shared,type=mount,accessmode=mapped || true
virt-xml “Whonix-Gateway” --add-device --filesystem source=/mnt/gateway-shared,target=shared,type=mount,accessmode=mapped || true
virt-xml “Whonix-Workstation” --add-device --filesystem source=/mnt/workstation-shared,target=shared,type=mount,accessmode=mapped || true

if [ “$kill_libvirtd” = “true” ]; then
kill -s sigterm “$libvirtd_pid”

I’m assuming you want to create the folder with a script after doing a manual install?

If that’s so then the only part that is relevant is the mkdri and chmod commands which you run as root.

1 Like

This is a development discussion. It does not contain user documentation. https://www.whonix.org/wiki/KVM#Shared_Folders is the only supported way for now.

Copying from a git diff won’t work.

And out into its new thread it goes.

1 Like