Sunday 29 September 2013

VirtualBox first boot hang issue resolution

Virtual box is a virtual software package, where the user can load one or multiple guest OS like Linux, windows under a single host operating system (like windows, Linux) emulates hardware peripherals.

If you have a laptop with host OS as windows, you can load a guest linux OS with virtualbox and you can conduct your experiments with linux. 

Download the virtual box binary and install.

You can follow the basics of installation from Virtualbox wiki site

Create Virtual machine, you need to specify/select some parameters for virtual machine to be created.

In my case I have created a VM with linux RHEL 6.3 guest OS

Hard disk will be emulated as VDI - Virtual Disk Image which will be configured during creation of virtual machine with virtualbox. (say 8GB to 16 GB)

some part of RAM need to be dedicated to the virtual machine. (say 1024 MB)

Allocate 64 MB for graphics RAM.

set some shared folder

After creating a VDI, you need to install guest OS. you need to specify a location for iso image of hard disk or you need to insert the installation DVD in DVD drive, CD/DVD drive will be identified by virtualbox

Now start installing your guest OS with all necessary packages like make, gcc, glibc, kernel headers.

after installing your guest OS reboot

Issue 1: Virtual machine hangs here

Solution: Remove the CD/DVD drive from boot disk priority in the settings.

Issue 2: After reboot you will go some first time boot parameter starting with welcome screen, time, user login details, finally it may hang on kdump screen

Solution: 
while booting guest OS, edit the kernel cmdline (press e on grub bootloader loading)
edit the kernel command line and append "single" at the end
now guest OS will boot as single user
To disable firstboot
#chkconfig firstboot off  
Type ctrl + D to boot in graphics mode (run level 5).

Issue 3: Vbox package installation needed useful in shared folder

Solution: specify the path C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso path to storage setting in settings.

VirtualBox storage setting



Start your experiments in guest OS, use shared folder to share files/folders between host and guest OS.