VirtualBox Virtual Machine Creation

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Linux VM Creation

From the VirtualBox Manager -> New -> Expert Mode (it may already start in Expert Mode, and in that case, you'll see a button named "Guided Mode" at the bottom of the screen).

The VM creation process with create the corresponding files in a directory associated with the VM, in ~/VirtualBox VMs/<vm-name>.

The VID (VirtualBox disk image) is a file with .vdi extension.

Name: master31-1.openshift.local


Type: Linux

Version: Red Hat (64-bit)

Memory Size:

Create a virtual hard disk now

Create

File Location: <vm-name> in ~/VirtualBox VMs/<vm-name>/<vm-name>

Will get the .vdi extension.

File size:

Hard disk file type: VDI (VirtualBox Disk Image)

Storage on physical hard disk: Dynamically allocated

Create


After this step, the VM should be created and you can review configuration in the right pane.

!!!VM Post-Creation Configuration

__Note:__ Click OK often, if you go through many changes and successive tabs and don't click OK, Cancel will discard all changes.

!!Settings -> System -> Motherboard

Boot Order: Optical, Hard Disk (deselect Floppy)

Chipset: ICH9

Pointing Device: USB Tablet (so I don't need to Left Command to release the mouse)

Extended Features: Enable I/O APIC

Extended Features: Hardware Clock in UTC Time

!!Settings -> System -> Processor

Processors(s)

Execution Cap:

Extended Features: Enable PAE/NX


!!Settings -> System -> Acceleration

Paravirtualization Interface: Default

Hardware Virtualization: Enable VT-x/AMD-v, Enable Nested Paging.

!!Settings -> Display -> Screen

Video Memory: 128 MB.

HiDPI Support: Use Unscaled HiDPI Output

!!Settings -> Storage

Controller IDE

Name: IDE

Type: ICH6

Use Host I/O Cache

Empty -> Leave it IDE Secondary Master.

No Live CD/DVD

Controller SATA

Type AHCI

Port Count 1

Don't use Host I/O Cache

*.vdi -> Hard Disk SATA Port 0

Solid-state Drive (if it's a Solid-state Drive)

!!Settings -> Network

See [VirtualBox Networking Concepts], but usually we we want to add a Host-only adapter and a NAT (in this order).

Before adding the Host-only network adapter, go to VirtualBox -> Preferences -> Network -> Host-only Networks and add a Host-only network, if required. If one already exists and you plan to share it, you're all set. If there isn't any, add "vboxnet0". Configure it as described here: [VirtualBox Host-Only Networking Configuration].

For all adapters:

Advanced -> Paravirtualized Network (virtio-net)

Promiscuous Mode: Deny

Cable connected: yes

!!!Linux Guest OS Installation

Select the VM -> Settings -> Storage -> Controller: IDE -> Select drive -> Attributes: Optical Drive: IDE Primary Master -> click on the Disk icon -> Choose Virtual Disk File -> Select the OS iso file.

Start -> Normal Start

From now on go to [RHEL7] to perform the guest OS installation and then return here to continue with Guest Additions.

!!!Guest Additions

The guest additions are special software packages that are shipped with VirtualBox but designed to be installed inside a VM to improve the performance of the guest OS and add extra features.

Guest Additions are supposed to be installed inside the virtual machine after the guest operating system has been installed:

[1]

Download Template:VBoxGuestAdditions 5.0.4.iso from the same place, then mount the image as a local filesystem: Select the VM -> Settings -> Storage -> Controller IDE -> Disk icon -> Choose Virtual Optical Disk File

Then I found the content under: /dev/disk/by-label/VBOXADDITIONS_5.0.4_102546

Then I mounted it

{{{ mount /dev/disk/by-label/VBOXADDITIONS_5.0.4_102546 /mnt }}}


Installation as root:

{{{

yum update yum install bzip2 kernel-devel gcc

cd /mnt ./VBoxLinuxAdditions.run }}}


!!!Reboot to Make Sure the Host Starts


!!!Still TODO

Set shared folders and write down the procedure. Manual page 70.


!!!Windows VM Creation

Lessons learned so far:

  • The screen resolution does not seem great and the mouse interaction is choppy.
  • It is probably best if I access it over Remote Desktop
  • Some way to exchange files/


__Referenced by:__\\ [{INSERT com.ecyrd.jspwiki.plugin.ReferringPagesPlugin WHERE max=20, maxwidth=50}]