Sharing a folder between Ubuntu and Windows using VirtualBox

Apr 16, 2015 | Default

Today I did something completely odd and built a virtual machine on a windows box to hold a Ubuntu VM. Usually I’m building on a Linux host to hold windows or another linux box.

Anyway – it’s pretty straightforward and easy to do. I used Ubuntu and I went with the 14.04 Desktop Install that you can get here. I grabbed virtual box from here. The box was built and a load of GIS software was installed for testing purposes. The question ended up being “How to I share a directory in Windows with Ubuntu?”. I’ve done it with samba – but not quite like this.

So to share a folder between a Ubuntu VM and  windows host here is what I did (thanks to Google and here)

1. Install the Virtual Box Additions under Devices -> Insert Quest Additions CD Image

2. Start your VM. In Virtual Box go to Devices -> Shared Folder Settings. I added a Folder called C:\Users\rjhale and I made it permanent and I wanted it remounted after a reboot.

vm

3. The trick is now to open a terminal in your VM (my case Ubuntu) and create a folder. I made mine under the media directory.

windowshare_term

 

 

4. Issue the next command to mount the VirtualBox Shared folder under Ubuntu at /media/windows-share

mount

 

And you’re sharing a folder with windows. Move your files back and forth with ease until you reboot and you’ll need to issue the command in 4 again. Of course you don’t have to make a directory under /media – I almost used /mount. If you want you can script the mount command to automatically do this upon boot.

Go forth and build a virtual machine. I’m 99% sure these commands aren’t Ubuntu centric if that distro is not your favorite. BUT I DIDN’T TEST IT.

You may also like

Almost 11 months later

Almost 11 months later

I've been trying to write my thoughts down more and have just been lost in life. The last 30 days have had me in Oak Ridge, Murfreesboro, and Reston Virginia. Yet another reason I mumble I really need to cut down on traveling. Which reminds me I need to discuss...

Updates on the TN911 side of things

Updates on the TN911 side of things

News of the weird...or possibly normal. . I hit two "almost a problem" problems with the longest running install of this system: I need to update it which means changing names on three of the layers. I expect much screaming when this happens. I already did a dry run...

I want to ride my bicycle: Third Act

I want to ride my bicycle: Third Act

I may have done something terrible or something good. To get some of you up to speed: I'm not a web programmer...or developer...... I have been woefully ignorant of web mapping I decided to learn some leaflet by mapping bike lanes. There's more discussion if you dig...