Add installation instructions for VM in Gnome Boxes

This commit is contained in:
tar 2024-01-06 17:29:17 +01:00
parent 98849d50d6
commit babfd91f38
3 changed files with 61 additions and 0 deletions

View File

@ -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

View File

@ -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

1
vm-gnome-boxes/mount.sh Executable file
View File

@ -0,0 +1 @@
mount -t 9p -o trans=virtio shared /home/zed/Downloads