The VirtualBox has a neat feature of "shared folders" between host and guest. Here is description of how to do it on Ubuntu 7.10
The shared folders are folders on the host that can be shared by the guest. First, you need to create shared folders via the GUI by adding the folders on the host and give names for them. I created a shared folder of /home/$myaccount/work and give it a name of work.
The other things to be done is on the guest side.
I created a directory of /home/$myaccount/work on the guest os.
To mount the directory, the following command can be run
sudo mount.vboxsf work /home/$myaccount/work
or
sudo mount.vboxsf work ~/work
It is interesting that the following commands will not work
sudo mount -t vboxsf work /home/$myaccount/work
/sbin/mount.vboxsf: mounting failed with the error: Protocol error
This maybe is because sudo mount -t vboxsf is different from sudo mount .vboxsf.
It is found that after you ran sudo -i to get a shell, the command of
mount -t vboxsf work /home/$myaccount/work will work.
To mount the shared folder easier and writable by the my account, the following line was added to /etc/fstab.
"work /home/$myaccount/work vboxsf rw,gid=$mygid,uid=$myuid,auto 0 0"
In addition, I appended the following in the .bashrc
mount | grep work 1>/dev/null 2>&1
if [ ! $? ]; then
sudo mount.vboxsf work ~/work
fi
This way whenever I logged in the shared folder is accessible.
Showing posts with label virtualbox. Show all posts
Showing posts with label virtualbox. Show all posts
Thursday, January 3, 2008
Tuesday, January 1, 2008
Install VirtualBox on Ubuntu 7.10
After downloading the VirtualBox 1.5.4, right click the package and click install. The package will be installed.
After the installation, you can run a command of "sudo usermod -a -G vboxusers $username" to add the current user to the group of vboxusers. This is needed because the user to run VirtualBox needs to access virtualbox device.
Download the iso of Xubuntu Desktop to local. Add a new virtual machine, and use the ISO file as the CDRom image.
Then I met a problem when trying to configure devices for a virtual machine. The error message is "Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND). The service might be not installed on the host computer."
This bug is https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/151585.
And to solve the problem
"Please open the following file: /etc/init.d/mountdevsubfs.sh
Find the following lines:
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount --rbind /dev/bus/usb /proc/bus/usb
Unmark them".
Reboot the machine. And the error is solved.
Configure the networking, enable one ethernet adapter and use NAT. Start powering the virtual machine and install the Xubuntu as the guest os.
Install the Guest addition:
1. Click the menu of "Device->Install Guest Additions...", then start a terminal in Xubuntu and run "cd /media/cdrom0" and "sudo bash VBoxLinuxAdditions.run" to install the guest addition.
2. Reboot the machine to make the guest addition take effect.
Make the full screen higher resolution:
Need to edit the file of /etc/X11/xorg.conf in the following section
Section "Screen"
Identifier "Default Screen"
Device "Generic Video Card"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Modes "800x600"
EndSubSection
EndSection
Add a mode of 1280x800 in the line of "Modes", the line will became
Modes "1280x800" "800x600"
After this is done, log out and you got a full screen now.
After the installation, you can run a command of "sudo usermod -a -G vboxusers $username" to add the current user to the group of vboxusers. This is needed because the user to run VirtualBox needs to access virtualbox device.
Download the iso of Xubuntu Desktop to local. Add a new virtual machine, and use the ISO file as the CDRom image.
Then I met a problem when trying to configure devices for a virtual machine. The error message is "Could not load the Host USB Proxy Service (VERR_FILE_NOT_FOUND). The service might be not installed on the host computer."
This bug is https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/151585.
And to solve the problem
"Please open the following file: /etc/init.
Find the following lines:
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs "" /dev/bus/usb/.usbfs -obusmode=
#ln -s .usbfs/devices /dev/bus/
#mount --rbind /dev/bus/usb /proc/bus/usb
Unmark them".
Reboot the machine. And the error is solved.
Configure the networking, enable one ethernet adapter and use NAT. Start powering the virtual machine and install the Xubuntu as the guest os.
Install the Guest addition:
1. Click the menu of "Device->Install Guest Additions...", then start a terminal in Xubuntu and run "cd /media/cdrom0" and "sudo bash VBoxLinuxAdditions.run" to install the guest addition.
2. Reboot the machine to make the guest addition take effect.
Make the full screen higher resolution:
Need to edit the file of /etc/X11/xorg.conf in the following section
Section "Screen"
Identifier "Default Screen"
Device "Generic Video Card"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Modes "800x600"
EndSubSection
EndSection
Add a mode of 1280x800 in the line of "Modes", the line will became
Modes "1280x800" "800x600"
After this is done, log out and you got a full screen now.
Subscribe to:
Posts (Atom)