With graphical desktop, it is easy to move files between guest VM and host. But TurnKey is in text mode, I need a shared folder for file exchange.
Fortunately, it is easy to add a shared folder in VirtualBox. It may be auto-mount in guest VM.
- Right click on your VM in VirtualBox for [Settings﹍] or select from [Machine] menu.
- In [Shared Folders] Tab, add the shared folder on host and tick [Auto-mount]
You may also use any folder on an external hard drive to your host computer as a shared folder. It is useful when you don’t want the shared folder to stay with the same physical hard drive with the guest VM.
Setup Shared Folder in Guest Linux VM
You need to install GNU C compiler and the kernel development packages and VirtualBox Guest Additions to use the shared folder in guest Linux VM.
To install compiler and development package tools in TurnKey,: switch to root and type:
apt-get update apt-get install dkms build-essential linux-headers-$(uname -r)
For other Linux, you may identify the Linux distribution of your guest VM by below command. Then follow the instruction specify to your distribution in Guest Additions for Linux.
Now, choose [Install Guest Additions﹍] from [Devices] menu and mount by:
mount /dev/cdrom /mnt
Install VirtualBox Guest Additions and stop spawning an xterm AFAICS support:
Now, you may see your shared folder under /media directory with prefix sf_ before your folder name.
- Oracle VM VirtualBox
- TurnKey: How to install VirtualBox Guest Addons & mount shared folders
- VirtualBox: Guest Additions
- linuxquestions.org: How tell what Linux distribution and version is running?
- VirtualBox: 4.2.2. Guest Additions for Linux
- VirtualBox: Guest additions without X
- VirtualBox: Shared folders and Apache
- VirtualBox: HOWTO: Use Shared Folders