I have a directory on a system which is the host for a virtual machine. I want to make this directory accessible from the guest of the virtual machine.
There are some way I can think of, packing the directory to iso or img file which means make a copy of the directory, not the directory itself. For virtualbox, there's shared folder method which I have to install guest additions to the guest machine. That's not what I need because I want to mount the directory when installing Arch Linux on a new virtual machine.
I can't find a way for Qemu too. Then I wondering, is it even possible? If it is, how to do that?
My goal is to do something like:
mount /dev/sdb /mnt
inside the guest machine, but instead of
/dev/sdb, somehow pass a directory of the host machine.
More specifically, I've backed up all of packages that
pacman has downloaded to a directory in host machine. And I want to mount that directory to
/var/cache/pacman/pkg so I don't need to download the package everytime I install Arch Linux. I'm doing Arch installations often for testing purposes.