Install Virtuabox OSE
To increase speed in networking with shared-folders from host OS, follow these below steps.
Setup host-only networking
The below is the summary of the content in the above link
sudo apt-get install uml-utilities # install the uml-utilities package:
sudo tunctl -t tap0 -u <username> # create the virtual network interface that the two operating systems will share:
sudo ifconfig tap0 10.0.1.1 # assign the IP 10.0.1.1 to the Host system (Linux):
sudo chgrp vboxusers /dev/net/tun # make sure that VirtualBox has full access to /dev/net/tun:
sudo chmod 0666 /dev/net/tun
sudo gedit /etc/group # add all users of VirtualBox in the vboxusers group (add nobody user if it doesnot work): going to System → Administration → User and Groups
Now start VirtualBox and before you boot your Windows XP, highlight your virtual machine and click on Settings. Go to Network. Find a free network adapter. Enable it and select Attached to: Host Interface. At the Host Interface Settings section go to Interface Name and type in the interface’s name, that is, tap0. Click Ok and boot your Windows XP.
When Windows is started, go to Start → Settings → Network Connections. Find the connection you previously added and open its Properties window. Highlight Internet Protocol (TCP/IP) and click Properties. Check the Use the following IP address option. In IP address enter 10.0.1.2. In Subnet mask enter 255.255.255.0. Leave Default gateway empty. It should look like this:
Note that you will have to disable firewall for that network interface in Windows XP in order for ping to work. From Guest (Windows XP) use the IP 10.0.1.1 to ping the Host (Ubuntu):
Although all settings applied to the network interface in Windows will be available every time you boot Windows, the virtual network interface will go away next time you shut down your Linux system. One easy solution to this, is to add the commands that set up your network interface in your /etc/rc.local script:
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# By default this script does nothing.
echo “Setting up tap0 interface…”
tunctl -t tap0 -u <username>
ifconfig tap0 10.0.1.1
Now the tap0 interface will be available every time you boot your Ubuntu system. Note that you do not have to use sudo inside /etc/rc.local as this script is executed by root anyway.
Setup writeable shared folder with samba on ubuntu
First, add the folder you want to share in your Shared Folder list. That is System → Administration → Shared Folders (if this menu item is missing, pres Alt-F2 and run “shares-admin“). You may need to click on the Unlock button and enter your password. Click the Add button. On the opening dialog, choose the path of the folder and the name by which the folder will be exposed. Make sure that you selected Share through: Windows networks (SMB) and that you unchecked the Readonly checkbox. Click Ok and close the Shared Folders dialog.
Now, edit the /etc/samba/smb.conf file as root to change the authentication method:
sudo gedit /etc/samba/smb.conf
Go to the Authentication section and uncomment the security=user line. (You uncomment the line by removing the preceding semicolon). Make it look like this:
####### Authentication #######
# “security = user” is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# in the samba-doc package for details.
security = user
# You may wish to use password encryption. See the section on
# ‘encrypt passwords’ in the smb.conf(5) manpage before enabling.
encrypt passwords = true
Now, you have to setup a password for the user that will have remote access to your shared foders. Run this command:
# smbpasswd your-username
New SMB password: *******
Retype new SMB password: *******
access to shared folders on VirtualBox
When your shared folder is all done you can switch to your Windows XP and access it. Go to Start → Run and type \\10.0.1.1\xfer and click Ok:
Your shared folder should open with no serious delays and browsing should be quite responsive
Resize a Virtual Box disk image
Download Clonezilla: http://www.clonezilla.org/
And follows the steps in here: http://virtualdebian.blogspot.com/2008/03/how-to-resize-virtualbox-virtual-disk.html
Here is the copy from the above link:
- Create a bigger dynamic virtual disk from VirtualBox Disk Manager
- Download Clonezilla
- Set up your virtual machine (VM) to mount Clonezilla ISO disk image and boot from it.
- Add the new bigger virtual disk image as the VM’s primary slave hard disk
- Boot Clonezilla and choose the disk-to-disk cloning mode
- Deselect the option “Resintall Grub bootloader” if you want to preserve Linux Mint styled bootloader.
- When the cloning is done, shutdown the VM.
- Set up the VM to boot from a Linux Mint ISO image (if you have it) or from Linux Mint live CD, Gparted live CD, or any ISO image or live CD which includes Gparted.
- Unselect the use of the VM’s primary slave hard disk and set the bigger virtual disk (which now contains the clone) as the primary master disk.
- Boot the live CD you chose and start Gparted (it’s called Partition tool in Linux Mint).
- If Gparted shows a swap partition it must be moved all the way to the right (together with the extended partition it is on) before you are able to resize the root partition. First you have to enlarge the extended partition, then the swap, preserving their sizes. But before you can do that you must click the swap partition and click the option “swapoff”. Gparted will close, that’s OK, just run it again.
- When you have your partitions as you like, apply the changes and shut down the VM.
- Set up the VM to mount from the primary master disk and eventually remove your old primary master disk from the Virtual Disk Manager.