diff --git a/vm-gnome-boxes/custom-mount.service b/vm-gnome-boxes/custom-mount.service new file mode 100644 index 0000000..c87f377 --- /dev/null +++ b/vm-gnome-boxes/custom-mount.service @@ -0,0 +1,10 @@ +[Unit] +After=network.service +Description=CustomMount + +[Service] +ExecStart=/bin/bash -c '/home/tar/mount.sh' +User=root + +[Install] +WantedBy=default.target diff --git a/vm-gnome-boxes/installation-guide.md b/vm-gnome-boxes/installation-guide.md new file mode 100644 index 0000000..d586780 --- /dev/null +++ b/vm-gnome-boxes/installation-guide.md @@ -0,0 +1,50 @@ +# INSTALLING VM IN GNOME BOXES + +## 1) INSTALL Debian: +su +usermod -aG sudo tar +exit +newgrp sudo +sudo apt update +sudo apt install spice-vdagent + + +## 2) PREPARE THE FOLLOWING FILES (in /home/tar/Public): +custom-mount.service: +[Unit] +After=network.service +Description=CustomMount + +[Service] +ExecStart=/bin/bash -c '/home/tar/mount.sh' +User=root + +[Install] +WantedBy=default.target + +mount.sh: +mount -t 9p -o trans=virtio shared /home/tar/Downloads + +## 3) IN VIRT-MANAGER: + +View -> Details ->Add hardware -> Filesystem + +Type: mount +Driver: Path +Mode: Squash +Write Policy: Immediately +Source path: /home/tar/Public +Target path: shared + +## 4) IN VM: +Power on the virtual machine then install the following (inside the VM): + +sudo mount -t 9p -o trans=virtio shared /home/tar/Downloads +cp ~/Downloads/mount.sh ~/ +cp ~/Downloads/custom-mount.service ~/ + +sudo cp custom-mount.service /etc/systemd/system/ +sudo chmod 660 /etc/systemd/system/custom-mount.service +sudo systemctl daemon-reload +sudo systemctl enable custom-mount +reboot \ No newline at end of file diff --git a/vm-gnome-boxes/mount.sh b/vm-gnome-boxes/mount.sh new file mode 100755 index 0000000..7843470 --- /dev/null +++ b/vm-gnome-boxes/mount.sh @@ -0,0 +1 @@ +mount -t 9p -o trans=virtio shared /home/zed/Downloads