50 lines
1018 B
Markdown
50 lines
1018 B
Markdown
# 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 |