- Install Guest additions on the guest
- Prerequisites on the guest OS side:
- yum install dkms kernel-devel
- yum groupinstall "Development Tools"
- and now the additions themselves:
- Devices / Insert Guest Additions CD image...
- mount /dev/sr0 /mnt
- cd /mnt
- ./VBoxLinuxAdditions.run
- Create a shared folder:
- Devices / Shared Folders / Shared folder settings
- Add new..
- Select "Auto mount" and "Permanent" options
- you can find the shared folder in /media/sf_{SHARE_NAME}
- Install guest additions on the host
- {VBoxManage} setextradata {VM_NAME} VBoxInternal2/SharedFoldersEnableSymlinksCreate/{SHARE_NAME} 1
- {VBoxManage} executable (ususally in C:\Program Files\Oracle\VirtualBox)
- {VM_NAME} is the name of the VM
- {SHARE_NAME} name of the share as in shared folders settings on in /media/sf_{SHARE_NAME}
- Run the VM as administrator. Simplest way to get that going is:
- In VirtualBox UI, right click on the VM and "Create Desktop shortcut"
- Right click on the desktop icon, properties, advanced, check "Run as administrator"
- Start the VM
- Watcher configuration: The Guest OS have 0 idea about any changes outside of its jurisdiction. In this setup this pretty much makes watching files from the Linux guest side nearly impossible - except if you use polling. This is an example take from my project's browsersync configuration, something similar must work for any other chokidar based frameworks as well.
sync.init({
server: 'dist',
port: 80,
watchOptions: {
usePolling: true
}
});
});
Nincsenek megjegyzések:
Megjegyzés küldése