Changes

Jump to navigation Jump to search
3,163 bytes added ,  08:25, 31 December 2018
revert edits to fix search where character encoding was a problem
{{highlight|text=This page needs an update. The introduction is all new.}}
 
First of all, if you're going to use VirtualBox with Ubuntu, and either dual-boot, or even if Ubuntu is the only thing on your machine, you will probably need to deal with EUFI Secure Boot. For example, if you have a Hewlett Packard system, you'll find instructions [https://support.hp.com/in-en/document/c04784866 here] for enabling and disabling Secure Boot. (hint; hit <kbd>F10</kbd> at POST). While you're in your system setup (aka "BIOS" although it's not BIOS anymore) make sure you enable [[wp:X86_virtualization#Intel_virtualization_(VT-x)|VT-x]] / VT-d
 
* https://era86.github.io/2018/01/24/vagrant-virtualbox-secureboot-in-ubuntu-1604.html
* https://askubuntu.com/questions/914997/install-virtualbox-while-keeping-secure-boot
* https://stegard.net/2016/10/virtualbox-secure-boot-ubuntu-fail/
* Assuming you disable secure boot due to a package installation, even when you re-enable secure boot in your system configuration, you may still see [https://askubuntu.com/questions/726052/ubuntu-booting-in-insecure-mode-with-secureboot-enabled Booting in insecure mode with SecureBoot enabled]
 
You'll always find a newer version of VirtualBox [https://www.virtualbox.org/wiki/Linux_Downloads using the Oracle ppa], so use that rather than the packaged version that comes with your distro. Warning: if you've already got VirtualBox installed from packages, you should remove it (but not 'completely' meaning don't destroy your existing images). Also, under packaged Ubuntu, you can simply <code>apt-get install virtualbox-guest-additions-iso</code>; however with the PPA, you'll need to download it yourself.
 
You'll also want to download an ISO or two for your virtual machines http://releases.ubuntu.com/
 
Note: you don't have to mount the ISO, you can just select it by clicking the little folder icon during setup.
 
== VirtualBox ==
=== Getting it ===
Ubuntu users can add it from virtualbox repos, but when 3.2 was released Oracle changed the name/key so you have to get a new key<source lang="bash"># prep# Stop any virtual machinesvagrant halt qualitybox
cd ~/Downloads
wget http://download.virtualbox.org/virtualbox/5.0.26/virtualbox-5.0_5.0.26-108824-Ubuntu-trusty_i386.deb
sudo dpkg -i ~/Downloads/virtualbox-5.0_5.0.26-108824-Ubuntu-trusty_i386.deb
</source>
If you get a 'conflict with virtualbox' error, remove the existing package and re-try the previous install command
<code>sudo dpkg --remove virtualbox-4.3</code>
 
You may also need to upgrade vagrant E.g. VirtualBox GUI runs fine, but 'vagrant up' does not. This happened to me when my installed version of vagrant 1.7.1 only supported VirtualBox <= 4.3. Upgrading to vagrant 1.8.5 added support for VirtualBox 5.x
<source lang="bash">
wget sudo dpkg -q http:i /home/greg/Downloads/downloadvagrant_1.virtualbox8.org/virtualbox/debian/oracle_vbox5_i686.asc -O- | sudo apt-key add -deb
</source>
 
=== VBoxManage ===
Besides the GUI interface for VirtualBox, you can manage your VirtualBox machines with the <code>[[VBoxManage]]</code> command line tool.
== Vagrant =Important Settings ===Be sure to [https://www.virtualbox.org/manual/ch03.html#settings-processor enable PAE/NX] in the System -> Processor tab for your Ubuntu guests
"Vagrant is a tool for building and distributing virtualized development environments== Guest Additions ==If you have problems with installing Guest Additions, see https://www. By providing automated creation and provisioning of virtual machines using Oracle's VirtualBox (edvirtualbox.: as well as other virtualization engines), Vagrant provides org/wiki/LinuxAdditionsDebug which describes what the tools to create and configure lightweightdrivers are, reproduciblewhat they do, and portable virtual environmentshow to install them manually."
http:<code>lsmod | grep vbox<//wwwcode> will give you some info on what's installed; which will be different for the host and the guest.vagrantup.com/
<code>modinfo vboxdrv</code> will give you info about the specific driver; especially the filename and version. The MediaWiki project uses vagrant and provides instructions as well as version of the driver should match the configuration itself so version of VirtualBox that you can setup a development instance in a snap're running. See [[MediaWiki-Vagrant]]  == Quickstart == [[Quickstart]] is a complete [[:Category:development|development]] environment for [[Drupal]] running in a VirtualBox virtual machine
== Extensions ==
You may need/want to install the "'''Extension Pack'''" for VirtualBox. That's because it provides USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, and NVMe. First download the file (it's a tarball with a .vbox-extpack extension), and then use VBoxManage to install it.
<source lang="bash">
VBoxManage list extpacks
VBoxManage extpack --help
VBoxManage extpack install --replace ~/Downloads/Oracle_VM_VirtualBox_Extension_Pack-5.2.13-122773.vbox-extpack
</source>
== Shared Folders ==
Once you create a shared folder in the VirtualBox UI, you may need to mount that folder from the guest.
Configuring shared folders in virtualbox E.g. for Quickstart developmentmeza, <source lang="bash">cd ~/src/mezavagrant ssh # to get onto the guestsudo mount -t vboxsf -o uid=$UID,gid=$(id -g) opt_meza /opt/meza# now the /home/greg/src/meza folder on the host is available to the vagrant user on the guest at /opt/meza</source>
# Power down the Quickstart virtual machine== Disk Images ==Learn more about VDI - Virtual Disk Images.# On the host All about how VirtualBox stores a 'snapshot' of a guest computer, start the Virtualbox management UI.# right-click Quickstart -> settings -> shared folders -> click the folder with the green plus on the right# Set the "Folder Path" to into a path file on the host computer. Give full readhttp://write accessforums.# Set the "Folder Name" to "shared"virtualbox. no caps. no vbox-# Ok -> Ok -> start Quickstart vm and this file should disappear.# Test by moving a file in the host computer into the host shared folderorg/viewtopic.php?t=8046
== Other Projects using VirtualBox ==* See [[Drupal/virtualization]]Learn more about VDI - Virtual Disk Images* VirtualBox is the default 'provider' (virtualization system) used by HashiCorp's [[Vagrant]] http://forums* The MediaWiki project uses vagrant so that you can setup a development instance in a snap.virtualbox.org/viewtopic.php?t=8046 See [[MediaWiki-Vagrant]]
[[Category:Virtualization]]
[[Category:Development]]
[[Category:DevOps]]

Navigation menu