VirtualBox - Virtualització

De WikiMar
Dreceres ràpides: navegació, cerca

Install VirtualBox in Ubuntu 14.10 - date 141104

Add one of the following lines according to your distribution to your /etc/apt/sources.list:

deb trusty contrib
deb saucy contrib
deb raring contrib
deb quantal contrib
deb precise contrib
deb lucid contrib non-free
deb wheezy contrib
deb squeeze contrib non-free

wget -q -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-4.3

More info:

Install Oracle VM VirtualBox Extension Pack (file .vbox-extpack) from

Compact virtual disk

In the Windows guest run:

sdelete –z

(download from

Linux guest:

sudo dd if=/dev/zero of=/bigemptyfile bs=4096k
sudo rm -rf /bigemptyfile

Linux host run:

VBoxManage.exe modifyhd thedisk.vdi --compact

More info:

Make USB to work

Install VirtualBox

sudo adduser $USER vboxusers
sudo kate /etc/init.d/

Where it says

#Magic to make /proc/bus/usb work

remove comments:

mkdir -p /dev/bus/usb/.usbfs
domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=120,devmode=664
                                                                  120 is from grep vbox /etc/group
ln -s .usbfs/devices /dev/bus/usb/devices
mount /rbind /dev/bus/usb /proc/bus/usb
sudo kate /etc/fstab


none /proc/bus/usb usbfs devgid=120,devmode=664 0 0

Share Folders

  • First share the folder in properties of the Virtual Machine

or do:

VBoxManage sharedfolder add "VmName" -name tmp -hostpath /tmp/
  • Add network unit in the M.V.:
    • Windows:
net use x:\\vboxsvr\tmp /persistent:yes
    • Linux:
mkdir /mount/tmp && mount -t vboxsf tmp /mount/tmp
      • or editing /etc/fstab
tmp /mount/tmp vboxsf default 0 0

To change the Floppy disk label in Windows




More info