Showing posts with label Solaris. Show all posts
Showing posts with label Solaris. Show all posts

Sunday, 11 October 2009

Creating Solaris OS VM

Solaris10 U6 virtual machine build up process Host OS used is Ubuntu 8.04 Hardy ( IP: 192.168.1.140)
KVM/Qemu is used as Virtualization software. KVM uses hardware assisted virtualization.
Solaris-10 ISO is needed for the purpose.
Following steps were followed Create the virtual disk on which OS will be installed.
# qemu-img create -f qcow2 Solaris10U6-x86.img
Start the OS installation.
kvm -m 4028 -cdrom /home/testuser/sol-10-u6-ga1-x86-dvd.iso -hda Solaris10U6-x86.img -vnc :14
Note: Above command will start a virtual machine with 4G of RAM (-m 4028) along with a VNC session started at VNC port 14
From another machine or same machine capture the above started VNC session and complete the installation.
kvm -m 2048  -hda Solaris10U6-x86.img -vnc :30 -net nic,macaddr=00:00:00:00:00:11 -net tap,script=
Above command will start machine with the networking provided bridging is in place. Also you may have to configure the network interface on guest machine manually.
if you have previously stopped the installation of Virtual guest, starting it again may give you some error. This is due to the fact that OS image (the harddisk of virtual OS) will now have corrupted OS and loader and virtual guest will attempt to boot from this corrupted image rather than cdrom image. To avoid this , run the following command ( it has an added "boot -d" parameter).
kvm -m 4028 -cdrom /home/testuser/sol-10-u6-ga1-x86-dvd.iso -hda Solaris10U6-x86.img -vnc :14 -boot d
If Solaris-10U6 was used to install as virtual guest. Its grub boot loader will not update the grub.conf correctly. ( This is only in Solaris10-U6)
Boot the virtual machine in single user mode Solaris Failsafe -- the other grub boot option. and run following commands.
# cd /a/boot/grub
# TERM=xterm
# export TERM
# EDITOR=vi
# export EDITOR
Change the following line under the section title Solaris 10 10/08 s10x_u6wos_07b x86
kernel /platform/i86pc/multiboot
to
kernel /platform/i86pc/multiboot kernel/unix
save and reboot Note: You may have to use traditional vi editor commands like h,j,k,l to navigate.