Sun Virtual Box
Installation
- Install using Synaptic Package Manager (including dkms etc.; packages virtualbox-ose & virtualbox-ose-guest-utils(don't know if necessary) (Alternatively installable via [1] since open source edition (OSE) does not support USB.)
- Download guestadditions manually from File VBoxGuestAdditions_2.0.4.iso. Move&rename this file to /usr/share/virtualbox (sudo mv /user/pfu/download/VBoxGuestAdditions_2.0.4.iso /usr/share/virtualbox/VBoxGuestAdditions.iso). Then select 'Add guest additions' in VirtualBox menu
- Program can be started from 'Applications', 'Accessories', 'Virtual Box OSE'
- If you have a Windows guest OS you can access the exchange directory via net use t: \\vboxsvr\vbox-exchange (if vbox-exchange is valid directory in your home directory)
- Add fonts from CorelDraw7 CD1 (see [2], e.g. Zurich fonts used for headers in different FW-document templates):
- Start, Run: %windir%\fonts
- File, Install New Fonts
Create MBR-file for starting the existing partition
Save MBR of the NTFS-partition: sudo dd if=/dev/sda2 of=sda2.mbr bs=512 count=1
Not working alternative:
- Download MBRwizard: http://www.mbrwizard.com/download.shtml and unpack it (no installation needed)
- Show current settings of saved MBR: sudo ./mbrwiz /ShowFile=backup-sda.mbr
Access existing partitions (boot from existing partition)
- create /home/pfu/.VirtualBox/Machines directory, if it not yet exist
- Execute in shell: sudo VBoxManage internalcommands createrawvmdk -filename /home/pfu/.VirtualBox/Machines/XpHomeNtfs.vmdk -rawdisk /dev/sda -partitions 2,6 -relative -mbr /home/pfu/.VirtualBox/Machines/sda2.mbr -register
sudo VBoxManage internalcommands createrawvmdk -filename /home/pfu/.VirtualBox/Machines/XpHomeNtfs.vmdk -rawdisk /dev/sda -partitions 2,6 -register Now, the file XpHomeNtfs.vmdk should exist under Machines.
- /dev/sda2 is ntfs partition, /dev/sda6 is ntfs_data partition in my case
- -register Registers set vdmk-file in GUI.
- Overview of existing partitions sudo VBoxManage internalcommands listpartitions -rawdisk /dev/sda (or start Ubuntus Partition Editor)
- Unmount partitions which shall be used by VirtualBox:
- sudo umount /media/ntfs
- sudo umount /media/ntfs_data
- Start GUI as admin to get read/write access to harddisk: gksu VirtualBox
- Create new machine (XP_on_NTFS) and add XpHomeNtfs.vmdk as machine.
Printers
- VirtualBox currently does not support LPT1 (they are working on it on a low priority)
- Variant 1: For accessing a network driver you have to enter an URL like this: http://10.0.2.2:631/printers/C530 (10.0.2.2 is C530 is the printer name)(see Forum entry) Did not longer work recently...
- Variant 2 (best one): 'Add Printer', 'Local printer', Add Port: 192.168.178.27 (printer's IP address), Windows recognizes printer type automatically, go on as normal...
- Variant 3 (only works if NAS is on / had problems (among others) when printer started after the NAS): Accessing a printer connected to my NAS do the following:
- Add printer, connect to printer on the Internet or on your intranet: http://N3200.:631/printers/usb-printer
- Install the appropriate driver...
Some remarks
- Start VirtualBox as admin: gksu VirtualBox
- Do dualbooting Windows with VMware: [3]
Increase size of image file
See here
- Go to your vdi file, open console and enlarge with (e.g. for 20 GB): VBoxManage modifyhd Ubuntu64Bit.vdi --resize 20000
- Download gparted and add it as CD drive in your VM.
- Check that boot order of VM checks the CD drive.
- Start VM which now should start gparted: In my case I had to run into shell (Failsafe mode, 'enter command line prompt'), then start X ('startx'), right-mouse-click to start gparted
- Then I increased the extended partition, moved the swap-partition and applied it. After that I minimized the extended partition and was then able to increase the primary partition.
- Remove the gparted-iso file and restart into your VM.
---OLD---
See [4].
- Download GParted LiveCD e.g. from here: http://gparted.sourceforge.net/download.php (select iso-image, e.g. gparted-live-0.5.2-9.iso)
- Add enlarged VDI (the VDI which shall be used afterwards)
- Add GParted-iso file as CD-image to existing VDI
- Gparted-iso: primary master
- the two harddisks as primary slave and secondary master
- Boot VDI which now should boot GParted. In GParted:
- Create new partition table on new harddisk
- Copy existing partition, enlarge image
- 'Apply' (takes quite a long time)
- Set 'boot'-flag on new partition: 'Partition', 'Manage Flags', select 'boot'
- quit GParted, double-click on exit icon to exit
- Remove old VDI and Gparted iso file, set new VDI as primary master
- Startup the enlarged VDI (normally Windows notices the difference and executes checkdisk)
Performance
Improving performance could be done by disabling VT-x / AMD-V (Settings, System, Acceleration). See performance tips
USB access
See Remark from Frank Dec 3 2009.
- sudo gedit /etc/fstab
- none /proc/bus/usb usbfs devgid=1000,devmode=664 0 0
- You can find out your gid by: id <username>
- Restart computer
Does it work or not?
Update to 4.0
- Add repository in Synaptic Package Manager:
- Click 'Settings', 'Repositories', 'Other Software'
- 'Add...', enter 'deb http://download.virtualbox.org/virtualbox/debian lucid contrib' (Instead of 'lucid' you could run lsb_release -sc')
- Press 'Reload'
- If error message appear, reload PGP keys with: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <key as seen in error message> (
- Press 'Reload' again to check if everything is fine now. (virtualbox 4.0 should now appear)
- (In Synaptic Package Manager) Remove old VirtualBox
- Install VirtualBox 4.0
- Download Extension Pack. Open VirtualBox, 'File', 'Preferences', 'Extensions', add extension and select the downloaded file. Install the extension. (Enter your root-password when asked for a password (dialogue is a bit misleading).)
- Add yourself to 'vboxusers' group, otherwise you won't be able to pass USB-devices to client VMs: sudo usermod -a -G vboxusers pfu. (See [5].) To take in effect, you have to relogin!!!
See:
- http://semangatubuntu.blogspot.com/2011/05/install-virtualbox-40x-stable-in-ubuntu.html
- http://ubuntuforums.org/archive/index.php/t-1221323.html
Add Windows 7 VM
- Create new VM, place CD-ROM with Windows-7 in drive and add it to VM
- Make sure that I/O-caches of all controllers are set
- do the whole Windows-7 installation
- Install guest-additions:
- remove Windows-7 installation-CD, but don't remove whole CD-drive ("Leave empty")
- start Windows-7 VM and click 'Devices', 'Install Guest Additions...' in the menubar. This takes a moment. Then 'Run VBoxWindowsAdditions.exe'. Y, Y, Next, Install, Install, Install, Reboot now.