Almost every data center has underutilized physical servers running single applications, which makes them perfect...
candidates for virtualization. In this two-part tip series, we show you how to convert an existing physical server into a VMware ESXi virtual machine (VM).
In the first part of this series, we showed you how to use VMware Converter to convert your physical server into a VM on a separate storage location. Now we can install ESXi. This will overwrite the existing physical server, so before we do it we want to be sure of two things. First, we want to make sure that you have a good backup of the server via whatever backup method you normally use. Second, we want to verify that the VM clone that we created of the physical server boots and runs without any problems.
To do this we can use another free product, VMware Player. VMware Player is a stripped-down version of VMware Workstation that lets you open and run existing virtual machines, but it does not allow you to create new VMs.
Follow the below steps to open your VM in VMware Player.
- Download VMware Player and install it. The installation is very straightforward; for our purposes selecting all the defaults will suffice.
- Before you open the new VM clone make sure you have powered off the original physical host. Once VMware Player is installed and you reboot your workstation you are ready to open the VM clone in Player to make sure it boots up OK to confirm the clone process was successful. Launch VMware Player and select the Open option and then browse to the location that you stored the VM clone and select the .vmx (configuration) file for the VM.
- The VM will power on once you open it in VMware Player. The performance will depend on how powerful your workstation is. At this point, all we need is a VM that boots successfully -- if it does not you should try the cloning process again.
- To shut down the VM, either log in to the OS and perform a shut down or select the VMware Player top menu, go toTroubleshoot, then Power Off and select Exit.
Installing VMware ESXi on the physical server
Now that we know the clone we created is working, we can install ESXi on the original physical server. The process for installing ESXi is very straightforward. Follow the below steps to complete this:
- Register to download ESXi at VMware's website.
- Download the ESXi installable version ISO file.
- Burn the ISO file to a CD and place it in the physical server that you want to install it on.
- The installer will load when you boot from the CD. Press ENTER to begin, then F11 to accept the licensing agreement. Next, choose a disk to install to . Finally, press F11 to start the install (remember to eject the install CD first).
- Once the install has completed, press ENTER to reboot and ESXi will start.
Configuring networking and passwords
There are some configuration steps that you need to complete after you install ESXi for things like networking and passwords. This previously published tip on installing and configuring VMware ESXi will help you complete the configuration.
Once you have ESXi configured and running, it's time to move the VM back to the host. You can do this the hard way or the easy way; the hard way consists of creating a new VM on the ESXi host without a virtual disk, copying the VM disk file using the Datastore Browser in the VMware Infrastructure Client to the Virtual Machine File System volume on the ESXi host, importing the disk using the vmkfstools utility,adding a virtual disk to the VM and telling it to use an existing disk. The reason you can't just copy all the VM files to the ESXi host and register them is that the virtual disk format and virtual hardware are different on the hosted products (Workstation/Player) than that of the bare metal products like ESX and ESXi. Creating a new VM and using vmkfstools converts the VM into a format that is compatible with ESXi.
The easy way is to use VMware Converter again, which makes the VM ESXi-compatible as part of the cloning process, creates a new VM and virtual disk on the host and then copies the contents of the source disk file to it. Since we already have Converter installed on a workstation we simply run it again, select our VM files on the network drive as the source and the new ESXi host as the destination. Below are the steps for doing this.
- Run the Converter application on your workstation; connect to a Local Server (your workstation) like before. Click the Convert Machine button. On the Source tab select VMware Workstation or Other Virtual Machine for the source type. Then for the virtual machine file name, enter the universal naming convention (UNC) path and filename of the .vmx file of the VM we created previously. Alternatively, you could map a drive to the location and use that instead. Click Next once you are done.
- On the destination tab, select VMware Infrastructure Virtual Machine as the destination type andenter the name or IP address of the new ESXi server along with the username/password (i.e. root) to log in to it. Click Next once you are done.
- You can also change the name of the virtual machine that will be created and choose a different data store for the VM on the destination tab. Once you have done this, click Next to continue.
- On the View/Edit Options screen you can change the VM hardware options and resize the virtual disk if you desire. You will need to change the Date Copy Type to resize the virtual disk. Once you have your options set, click Next to continue.
- On the Ready To Complete tab, review your selection, go back and make changes if needed and click Finish to begin the process of cloning your VM to the ESXi host.
- Once the cloning process completes you can close Converter, connect to your ESXi host with the VI Client and power-on the newly created VM.
That's it. The original physical Windows 2003 Server has been turned into an ESXi VM.Because we have virtualized, we can add more VMs to that host to make better use of the physical server hardware. This entireprocess cost no money as it used free tools and software. The added usage of your physical server hardware could save you money the next time you have to add a new server, because you don't need to buy more physical hardware. Additionally, you get all the extra benefits of virtualization such as the ability to take snapshots before doing upgrades and applying patches.
The free edition of ESXi is a great way to get started with virtualization. If you choose to add more features later on you can simply purchase and add a license without having to reinstall anything.
Eric Siebert is a 25-year IT veteran with experience in programming, networking, telecom and systems administration. He is a guru-status moderator on the VMware community VMTN forums and maintains VMware-land.com, a VI3 information site.