Monday, August 6, 2007

virtual CentOS using VMWare 5.5.4 install howto

As covered with the last blog entry, VMWare provides an incredible usefulness to anyone who wishes to have virtual machines up and running without having any additional set of hardware by simply making your host machine as a test bed server running virtual machines with different OS in parallel. Imagine managing these virtual machines while having access and control with your current desktop. Not only that, you can switch back and forth from your desktop to any running parallel virtual OS you have.

This document entry describes a step by step installation procedures on how to create a virtual machine running CentOS 5 with VMWare 5.5.4 under Fedora 7. This is not the only way to achieve it, but this is how I am going to cover it live from my desktop. Sure it will work for me, but I cannot guarantee it will work for you too, so be careful and use at your own risk!

I currently have 1GB of RAM, 2GB swap space and enough disk space to proceed with the next installation instructions. Make sure you have enough disk space and free memory to handle virtual machines. If you wish to add more swap space, you can check out this entry on how to add more swap space.

PREPARE CENTOSVIRTUAL MACHINE using VMWare 5.5.4 under Fedora OS .
=================================================================

This procedures utilizes my existing CentOS 5 DVD ISO image from my first harddisk. You can have the installation from DVD/CD disk using your DVD/CD drive too as an alternative.

Now, carefully follow the next steps on accomplishing this.

1. Launch VMWare: Ctrl+F2 , vmware
2. Click File > New > Virtual Machines


3. Click Next
4. Click Custom

5. Select New - Workstation 5

6. Select Linux as the Guest Operating System (GOS) and Version 'Red Hat Enterprise Linux 4' and click Next.

7. Now create a name identifier for your virtual machine. And remember to click Browse and change the folder location. This would be the folder location where your virtual hard disk and more virtual OS settings would be created and saved. The more disk capacity the system has, the more disk space you can allocate with the virtual OS.


8. VMWare 5.5.4 can support up to 2 virtual processors. I would be choosing single processor for my x86 based hardware that I now have.


9. You would be allocating your virtual memory here. Read the legend carefully. I am choosing the recommended VMWare default based from VMWare detection of my current desktop memory specs .


10. From here, I am choosing NAT since I am only going to work between my master host and my virtual machine, no need for me to go out of web. In case you need to access web from your virtual machine directly without NAT, choose 'Bridged Networking' and prepare a separate IP adderss for your virtual machine.

At this point of choosing Network Address Translation (NAT), you can also enable your DHCP daemon service from your desktop. That is if you wish to have a dynamic IP from your virtual machine.


11. Select Next with LSI Logic,

12. Select Create New Virtual Disk


13. Select Virtual Disk Type as SCSI which is recommended.


14. Considering I have ample disk space on separate secondary harddisk, I am going to enter a 10GB virtual diskspace and tick/check 'Allocate all disk space now' option box. Click Next.
This would take time depends on the disk size being created. You can take a coffee and come back say after 5 minutes time.



15. Lastly, choose the name of your virtual disk like so. Click Finish.


Summarized major virtual machine's specs that was created with the above steps:
a. 10 GB of disk apce
b. 256 of virtual memory
c. single processor
d. with NAT ethernet interface (host machine to virtual machine only)

Other virtual devices are also included during the virtual machine creation such as
a. USB and sound controller,
b. floppy and CD-ROM drive,
c. and mouse and network card.

The default virtual machine setup has a bootup source from CD or DVD drive. You can verify this by going to 'Edit Virtual Machine settings' then click CD-ROM . This is the default setup for booting from CD/DVD drive. You can see that CD-ROM drive is enabled.

If you wish to boot from DVD ISO image, make sure the ISO image is not mounted from host. Go to go to Edit Virtual Machine settings > click CD-ROM and choose 'Use ISO image:' > Browse and select the DVD ISO image and click OK.

Optionally, you can also disable any unneeded device setup before powering on. Simple select the device to be disabled from the list and uncheck the box option that says 'Connect at power on'. You can apply this settings with devices such as floppy, sound adapter or even your USB controller if you plan not to use them inside the virtual machine.

INSTALL CENTOS 5 as VIRTUAL OS
==============================

The below installation steps would be done using CentOS DVD ISO image from my harddisk. I have done and selected to boot from DVD ISO image with these next installation steps. CentOS website can be viewed here.



Clicking 'Power On' turns on virtual machine.

Do remember that press Ctrl+Alt at the same time switches control back and to virtual host and master host.

The installation would cover default X with Gnome.

Ready.

1. At this point of installation, you can optionally pass advanced kernel parameters by typing them from the boot: line. Generally, most users usually hit Enter key here which is just fine.

2. This installation portion provides an opportunity for testing the source media CD. Normally, after downloading DVD ISO image, the actual ISO image file could also be verified using md5sum linux command. I have also covered how to check file intergrity using md5sum here.

Pressing Skip here would be just fine as the installation is currently being served from DVD ISO image, which have been verified earlier using md5sum.

3. Click Next

4. You can change your regional language settings from below:


5. You can change your appropriate keyboard language settings like so:

6. The virtual disk space needs to be initialized after being created by VMware. Click Yes.

7. This next step brings you to virtual harddisk partitioning. Generally, approach with hard disk partitioning basically depends on many factors. There are particular partitions that needs to be created, separated, extended or even expanded depending on server specs, hard disk capacity, and/or how the server in real-time would function in production environment. Since this installation guide focuses on installing CentOS on a virtual machine via VMWare, all details of operating system harddisk partitioning, specific packages and further application customization would not be covered here in a detailed manner.


From the above image, and considering that this installation is for OS evaluation review only and not for full blown production server use, no further hard disk partition customizations would be done here. You are free to customize your own partitions to tailor your needs. By default, a LVM harddisk partition is currently selected. Simply click Next and confirm by clicking Yes with the next window prompt.

Actual CentOS, Fedora and other linux distro installation would be covered in detailed in the near future blog entries.

8. From here, Anaconda installer prompts for optional IP address assignment. This IP address would be assigned to the virtual machine and not to host machine. No changes would be made here leaving it on DHCP enabled setting. It is assumed here that the current host machine has DHCP daemon service enabled for leasing IP address to this virtual OS. Click Next.



9. You can select your country of location from here to determine appropriate GMT time to be used by virtual OS.


10. Always remember and write down this 6-character superuser password for root.


11. As you can below, the CentOS group and individual packages are now being offered below for further package selection and customization. As mentioned before, this blog entry would not cover any package selection customization and IP address assignment as the need for particular package depends on how the virtual machine would function. Basically, the installation would proceed without any further changes by clicking Next button.

However, you are free to choose which particular server and/or desktop group packages you need to be installed from this installation.

12. At this point, I am clicking Next without any changes and proceed with the installation and objective. Click Next.


13. This is an installation point where the Anaconda installer determines the required packages that needs to be installed as dependencies of selected group packages. Since my selection doesnt go further on any other group packages, I would simple click Next here. You are free to customize any other packages that you need with this virtual machine.



The Anaconda installer continues to format and repartition the virtual harddisk, properly install boot images, and proceed with group packages installation. This would take an average time of 30 minutes more or less. You can take a break and come back after several minutes.




The virtual machine automatically reboots for final completion of installation. There is no need to modify VMWare setting for this virtual machine. The virtual machine would automatically boot from virtual harddisk and not from the specified DVD ISO image which was selected earlier during virtual machine craetion.


In the mean time, SELinux is enabled by default setup. If you want to know more of SELinux, you can visit here.


I have disabled SELinux for this test installation proceed with the confirmation by clicking Yes and Forward buttons.





An installation prompts for further date and time zone changes shown below.


The installation prompts for further details of creating the user and its details. By default, password is 6 characters in length. This process would create a new non-root user account.



Sound card testing and detection. This step is also available inside Gnome X for further customization and setup. You can click Forward then if you wish to test your sound card later on.


Additional CDs just in case, for third-party rpm on CD. Simply click Finish.




After successful installation, the virtual machine reboots and proceeds for user login prompt. During the bootup process, the screen shows all daemon services being activated. You'll be dropped to login prompt.



At this point, your virtual machine now has CentOS 5 successfully installed on a virtual machine. VMWare enables a user to power on, resume, save current state, power off any virtual machines without directly applying these feature directly to host machine.

Congratulations! You now have CentOS 5 as virtual OS installed via VMWare workstation from Fedora 7 desktop workstation!!!

Hope this entry serves its purpose.

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy