john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Virtualbox windows host linux guest ubuntu8.04 SHARED folder

virtualbox windows host linux guest (ubuntu 8.04 server) SHARED folder

In the virtualbox program choose the settings for your Virtual Machine

Choose the CD/DVD rom drive -> ISO -> VBoxGuestAdditions.iso

(Ensure under advanced that the cdrom boots before HD)

(Ensure you have created a folder in Windows, e.g. SHARED, and then select it under the Shared Folder options in Virtualbox Virtual Machine Settings)

once you have logged into your linux guest:

You'll notice ubuntu 8.04 makes mounting the cdrom easy...

Browse to root, list the folders/files, mount the cdrom drive...

cd / ls mount /dev/cdrom

//now I've skipped the step in the manual: sudo apt-get install dkma

cd cdrom ls

sh ./VBoxLinuxAdditions-x86.run

WHICH THEN SHOWS ME THE HELPFUL ERROR MESSAGE Please install the build and header files for your current Linux kernel. The current kernel version is 2.6.24-23-server Please install GNU make... please install the GNU compiler

which means I need to use apt-get which means I need to setup the ethernet adapter on ubuntu server... THANKFULLY I have NAT configured so I can get DHCP from Virtualbox and access the internet (e.g. use aptget)


ifconfig -a //shows us all of the devices detected

cat /etc/network/interfaces //shows only the loopback device configured...

nano /etc/network/interfaces //ADD THE LINES

auto eth1 iface eth1 inet dhcp

The DHCP server will provide the default gateway (implemented via the route command), the device's IP address (implemented via the ifconfig command), and and DNS servers used on the network (implemented in the /etc/resolv.conf file.)

THUS THE COMMAND

ifup eth1 //tells ubuntu to start using the defined devices

It should show you a DHCP offer from 10.0.2.15, getting an IP address etc.

ping 10.0.2.15 should now work! ping google.com should now show "packets received, 0 loss"...


apt-cache search gcc

//to build from cdrom sudo apt-cdrom add sudo apt-get update sudo apt-get install build-essential

Sudo nano /etc/apt sources.list

Uncomment the two lines: deb http://us.archive.ubuntu.com/ubuntu dapper universe main restricted universe deb http://security.ubuntu.com/ubuntu dapper-security universe THEN, sudo apt-get update

//note that "df" only shows 589MB used...

sudo apt-get install linux-headers-uname -r build-essential

//which installs the necessary GCC compiler & make binaries

//now the following commands finally work... except the X window drivers //because ubuntu-server is command line only...

cd /cdrom sh ./VBoxLinuxAdditions-x86.run

shutdown -r "now" //reloads the kernel with the new drivers


now we can mount our shared drive!

(VBoxManage sharedfolder add "VM name" -name "sharename" -hostpath "C:\test"

-transient //option to make the share temporary

mount -t vboxsf sharename mountpoint //vbox manual sucks... should be: )

mount.vboxsf sudo nano /etc/fstab vboxsf rw,uid=1000,gid=1000 0 0

Shared /home/fatsobob/Shared_Folder vboxsf rw,uid=1000,gid=1000 0 0


  • « Virtualbox windows2003 guest
  • Virtualbox win2003 terminal server nat port redirection »

Published

Feb 6, 2010

Category

virtualization

~427 words

Tags

  • folder 4
  • guest 11
  • host 8
  • linux 249
  • shared 1
  • ubuntu8.04 1
  • virtualbox 36
  • virtualization 87
  • windows 72