From 5c2119aa112989f107b7ad8cf34a7c3014a45621 Mon Sep 17 00:00:00 2001 From: Rafael Marçalo Date: Sun, 5 Feb 2023 16:27:42 +0000 Subject: Added references in some pages and upted some stuff --- kvm.html | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'kvm.html') diff --git a/kvm.html b/kvm.html index 1b9e3a8..999aa35 100644 --- a/kvm.html +++ b/kvm.html @@ -98,6 +98,33 @@

Finishing Installation

Now that you have everything setup to run the VM, just hit Finish or Begin Installation.

+ +

Extra: Shared Linux VM folder

+

Create a shared folder

+

In order to use a shared folder between the host machine and the guest VM, you must first create a folder in your filesystem and `chmod 777` it.

+
mkdir ~/KVM_Share
+ +

Adding the shared folder has a filesystem

+

Now open virt-manager, got to your virtual machine and under the virtual hardware tab, click on `Add Hardware`, select filesystem and in the driver option, select the virtio-9p option.

+

In the source path you are going to put the complete path to the host machine shared folder and in the target path you should type where the filesystem should exist inside the guest VM.

+

For this instance we are going to set the source path to ~/KVM_Share and the target path to /shared.

+ +

Mounting the shared folder

+

Boot your guest VM and create a folder anywhere in your filesystem where you will mount the shared folder to.

+
mkdir ~/hostfiles
+

Now, if you type: sudo mount -t 9p -o trans=virtio /shared ~/hostfiles, the shared folder will be mounted.

+ +

Auto mount on startup

+

Now if you want the guest VM to auto mount the shared folder everytime you boot it, you just have to add the following line to your guest VM /etc/fstab file:

+

/shared /home/user/hostfiles 9p trans=virtio,version=9p2000.L,rw 0 0

+

WARNING!!! The mounted folder path must be an absolute path!

+ +

References:

+