just another cloudy day….

Best Practices- Installing CentOS VM on VMware Workstation- Part 3

Best Practices- Installing CentOS VM on

VMware Workstation

– Part 3


In PART 1 of this series, we successfully installed CentOS 5.8 on a VMware Workstation environment.. and in PART 2, I showed you how to install VMware Tools in CentOS manually..

In this continuation series (PART 3), I am going to show you how to add a additional virtual Hard Drive to the CentOS VM, that too without rebooting it..

There are two ways to configure a new disk drive into a CentOS system:

  • One very simple method is to create one or more Linux partitions on the new drive, create Linux file systems on those partitions and then mount them at specific mount points so that they can be accessed. This is the approach that will be covered in this tutorial.
  • Another approach is to add the new space to an existing volume group or create a new volume group.

When CentOS is installed using the default disk configuration layout, a volume group is created and called VolGroup00. Within this volume group are two logical volumes named LogVol00 and LogVol01 that are used to store the / file system and swap partition respectively. By configuring the new disk as part of a volume group we are able to increase the disk space available to the existing logical volumes. Using this approach we are able, therefore, to increase the size of the / file system by allocating some or all of the space on the new disk to LogVol00. This topic will be discussed in detail in Adding a New Disk to a CentOS Volume Group and Logical Volume.

First, we will add the Hard Disk to the VM…

Select your virtual machine, as you can see from the above PIC selected the virtual machine. Next press the “Settings‘ to open the Virtual Machine Settings dialog.

From the “Virtual Machine Settings” dialog select the “Add…” button at the bottom of the screen. From this dialog you can also modify how much memory you dedicate to the machine when it boots.

Next we will walk through the “Add Hardware Wizard” the process makes it very simple to add additional hardware to a predefined virtual machine. From this screen we can see the many types of hardware we can add to a virtual machine. You can emulate just about any piece of hardware that one can expect in a modern operating system. It definitely makes testing with different configurations and devices much easier. For our example we want to select “Hard Disk” and then select the “Next >” button.

In the next screen we see the three options for adding a new disk. We can “Create a new virtual disk“, this will create a brand new disk on the guest operating system.

The second option, “Use an existing virtual disk“, allows you to mount a disk from another virtual machine.

The last option is to “Use a physical disk“, this allows you to mount a local physical disk to the operating system. This option is akin to NFS mounting a drive to a virtual machine. To add a new disk we select the “Create a new virtual disk” option and select the “Next >” button.

Next we want to select the type of disk. So in this step we want to select “SCSI (Recommended)” and the “Next >” button.

Now we want to set the size of the disk we are creating.

One of the nice features of VMware is that you don’t have to allocate all of the disk when you create it. So if you create a 40 GB disk it doesn’t have to take it all right away, the disk will grow as your virtual machine needs it. I will say this is a big performance hit you take when the disk has to extend, but for most applications its OK.

Also, I will warn that if the virtual disk grows and there is no physical disk left on the host operating system you will see a catastrophic failure and in most cases both the host and guest operating systems lock up and become unusable. (Don’t say I didn’t warn you !)

Lastly, you can split the files into 2GB sizes, while this isn’t necessary, it just makes all the disks much easier to manage and move around. For this step we want to set our disk size (12 GB in this case), I chose to allocate the disk space right now.. 10 GB in size and Split disk into 2 GB files.

This is actually pretty simple in that you decide what you want to physically call the disk and where to put it. .vmdk is the extension for VMware virtual disks. After we name the disk we can select the “Finish” button which adds the disk to the virtual machine.

So now we can see that the new disk has been added to the “Virtual Machine Settings” within the selected virtual machine. From here the disk acts just like it would if you added a new disk to a standalone server. So we select the “OK” button to continue.

After we’ve logged in and accessed a terminal window as root (or another user with root/sudo priveledges) we first want to run fdisk -l to display list of partitions.

In Linux the first SCSI drive is sda, the second sdb, the third sdc, etc. since this was the second SCSI drive we added to the system, the device is known as /dev/sdb

As shown above, the new hard drive has been assigned to the device file/dev/sdb. At this point the drive has no partitions shown (because we have yet to create any).

The next step is to create one or more Linux partitions on the new disk drive. This is achieved using the fdisk utility which takes as a command-line argument the device to be partitioned:

The basic fdisk commands you need are:

  • m – print help
  • p – print the partition table
  • n – create a new partition
  • d – delete a partition
  • q – quit without saving changes
  • w – write the new partition table and exit

In order to view the current partitions on the disk enter the p command:

As we can see from the above fdisk output the disk currently has no partitions because it is a previously unused disk.

The next step is to create a new partition on the disk, a task which is performed by entering n (for new partition) and p (for primary partition):

In this example we only plan to create one partition which will be partition 1.

Next we need to specify where the partition will begin and end. Since this is the first partition we need it to start at cylinder 1 and since we want to use the entire disk we specify the last cylinder as the end.

Note that if you wish to create multiple partitions you can specify the size of each partition by cylinders, bytes, kilobytes or megabytes.

The next option is t. t is used to replace the type of the current partition.

You can list the different types of Partitions by pressing L as shown below.. this will list down all the available partition types..

for our example, we need a Linux Partition, i.e. number 83.. similarly, if you want to create a SWAP out of this new HDD, then the number would be 82 (Linux/ Swap). Type 83 and press Enter key to continue

Now that we have specified the partition we need to write it to the disk using the w command:

If you do a fdisk -l again, you will see the newly created Disk with the Partition table allocated as shown below.

The next step is to create a file system on our new partition.

We now have a new disk installed, it is visible to CentOS and we have configured a Linux partition on the disk.

The next step is to create a Linux Filesystem system on the partition so that the operating system can use it to store files and data. The easiest way to create a file system on a partition is to use the mkfs.ext3 utility which takes as arguments the label and the partition device:

In order to do this we need to create a mount point. A mount point is simply a directory or folder into which the file system will be mounted. For the purposes of this example we will create a /extra in root (/) directory to match our file system label (although it is not necessary that these values match): mkdir /extra

The file system may then be manually mounted using the mount command: mount /dev/sdb1 /extra

In order to set up the system so that the new file system is automatically mounted at boot time an entry needs to be added to the /etc/fstab file.

The following example shows an fstab file configured to automount our /extra partition:

With the appropriate configuration line added to the fstab file, the file system will automatically mount on the next system restart.


Best Practices- Installing CentOS VM on VMware Workstation – Part 2

Best Practices- Installing CentOS VM on

VMware Workstation

– Part 2


in PART 1, we saw how to effectively install CentOS 5.8 on VMware Workstation…

in this PART, we will install VMware Tools in the VM..

NOTE: If you had selected Easy Install during the install process from Workstation, then this step can be avoided as Easy Install installs VMware-Tools automatically.. still if you ever want, you can install VMware-Tools anytime you want…

Benefits of VMware Tools

The followings are benefits of VMware Tools on your Guest OS:

  1. A set of VMware device drivers:

These drivers include:

  • Graphics Performance: VMware Tools installs a SVGA driver that increases vide0 refresh.
  • Efficient Memory Allocation: A memory control driver that is installed with  VMware Tools provides increased efficiency in memory allocation.
  • Accelerated Mouse Driver: For increased mouse responsiveness.
  • Optimized SCSI Driver: A Bus Logic SCSI driver provides faster I/O performance for some guest OS.

VMware Tools control panel:

The Tools control panel lets you modify settings.

  • Run Scripts: Scripts can be defined to run after particular events such as the VM starting up or shutting down.
  • Shrink the Virtual Disk: By reducing the amount of disk space a VM’s virtual disk takes up by removing empty unused space will lead to more usable storage on your hosts volume.

Connect External Devices:

  • You can connect external media devices such as a floppy (who uses those anymore)  or CD/DVD drive. These appear as a virtual device when presented within the guest

To summarize,Installing VMware Tools eliminates or improves the following issues:

  • Low video resolution
  • Inadequate color depth
  • Incorrect display of network speed
  • Restricted movement of the mouse
  • Inability to copy and paste and drag-and-drop files
  • Missing sound

Installing VMware Tools within X

Select VM > Install VMware Tools in your Workstation menu as shown:

When you choose VM > Install VMware Tools from the VMware Workstation menu, VMware Workstation temporarily connects the virtual machine’s first virtual CD-ROM drive to the ISO image file that contains the VMware Tools installer for your guest operating system and you are ready to begin the installation process.

Double-click the VMware Tools CD icon on the desktop.

Note: In some Linux distributions, the VMware Tools CD icon may fail to appear when you install VMware Tools within an X windows session on a guest.

Extract the VMwareTools.tar to the Desktop as shown below:

In an X terminal, logged in as root (su -), configure VMware Tools by navigating to the path where we extracted the VMwareTools.tar contents.. in this case, its /root/Desktop/vmware-tools-distrib/

Once there, simply execute the vmware-install.pl file as shown below:

Respond to the questions the installer displays on the screen. Press Enter to accept the default value.

Note: Be sure to respond yes when the installer offers to run the configuration program.

Note: Some guest operating systems require a reboot for full functionality.

Installing VMware Tools from the Command Line with the Tar Installer

The first steps are performed on the host, within Workstation menus:

1. Power on the virtual machine.

2. After the guest operating system has started, prepare your virtual machine to install VMware Tools.

  • Choose VM > Install VMware Tools.

The remaining steps take place inside the virtual machine.

3. As root (su -), mount the VMware Tools virtual CD-ROM image, change to a working directory (for example, /tmp), uncompress the installer, then unmount the CD-ROM image.

Note: Some Linux distributions automatically mount CD-ROMs. If your distribution uses automounting, do not use the mount and umount commands below. You still must untar the VMware Tools installer to /tmp.

Some Linux distributions use different device names or organize the /dev directory differently. If your CD-ROM drive is not /dev/cdrom or if the mount point for a CD-ROM is not /mnt/cdrom, you must modify the following commands to reflect the conventions used by your distribution.

  • mount /dev/cdrom /mnt/cdrom
  • cd /tmp

Note: If you have a previous installation, delete the previous vmware-distrib directory before installing. The default location of this directory is

4. Untar the VMware Tools tar file:

  • tar zxf /mnt/cdrom/VMwareTools-5.0.0-<xxxx>.tar.gz
  • umount /dev/cdrom

Where <xxxx> is the build/revision number of the VMware Workstation release.

Note: If you attempt to install a tar installation over an rpm installation — or the reverse — the installer detects the previous installation and must convert the installer database format before continuing.

5. Run the .tar VMware Tools installer:

  • cd vmware-tools-distrib
  • ./vmware-install.pl

Respond to the configuration questions on the screen. Press Enter to accept the default value.

6. Log off of the root account.

  • exit

7. Start X and your graphical environment

8. In an X terminal, launch the VMware Tools background application.

  • vmware-toolbox &

Note: You may run VMware Tools as root or as a normal user. To shrink virtual disks, you must run VMware Tools as root (su -).

Uninstalling VMware Tools

To remove VMware Tools from your Linux guest operating system, log on as root (su -) and enter the following command:

From a tar install
  • vmware-uninstall-tools.pl
From an RPM install
  • rpm -e VMwareTools

In PART 3 of this series, I’ll show you how to ADD A EXTERNAL HDD TO CentOS AND THEN MOUNT IT !!

Leave a comment »

Best Practices- Installing CentOS VM on VMware Workstation- Part 1

Best Practices- Installing CentOS VM on

VMware Workstation

– Part 1


In this series of blogs I am going to share my experiences and few best practices when it comes to installing and configuring a LINUX, in this case, a CentOS VM using VMware Workstation 8.

NOTE that these steps can well be used to install any LINUX VM on vSphere platforms as well… just the tuning with respect to the class of OS changes then.. like Debian, or Red-Hat..

Software used in this tutorial:

We are going to create a TYPICAL Virtual Machine

Now there are two ways of installing a VM using VMware Workstation.. first; there is something called as Easy Install which assumes certain criteria for installing the OS and provides a quick way to complete the OS installation.. but i am going to avoid that and install the OS manually. In this way, i can specify the Partitioning tables for my CentOS as I want it.

Select Linux from the Guest OS Menu and CentOS 64-Bit as the Version from the drop down list as shown

Provide a suitable name for your VM.. i usually go with Defaults…

Specify 5 GB as the Disk Capacity.. we don’t want to provide a lot of Disk unnecessarily.. 5 GB is enough for installing any LINUX OS.. We will show you how to attach a HDD to the VM in our PART 3 of the series..

Click Customize Hardware to mount the CentOS ISO File manually and do other bit of “cleaning up” !!

First of all, we do the “clean up“.. just remove unwanted devices like Floppy Drives and Printers (Unless you want to use them for your self !!)

Click on CD-ROM (IDE 1) item, select Use ISO image option and click Browse button to select your recently downloaded *.iso installation file of CentOS as shown below

Once done, the VM is ready to be Powered ON. Select the Power On this Virtual Machine as shown below

When your virtual pc starts, you’ll see welcome screen of installation CentOS. Press ENTER to begin the Installation Process…

If you’ll not be able to see this screen, then restart your virtual machine and click Esc button for Boot menu. And from this menu, select CD-ROM Drive

Click ENTER. The installation will tell you to begin testing of your installation CD or DVD. Select Skip button. It will skip testing your CD media and save your time..

Then you’ll get another welcome screen, you only have to click next button on this screen

Select your language of installation and click Next

Then, select your keyboard configuration to use it for the system you’re installing and click Next

Then, you’ll be warned to create new partitions by erasing ALL DATA on your newly created hard drive. As there’s no information in this drive, you’ll select Yes

We will Create a Custom Layout as in this case we will be able to specify the partitions and provide them sizes and all 🙂

We will first create a SWAP Partition. the size of the SWAP Partition depends on how much RAM is provided to the VM.. in this case, the VM is provided with 1 GB RAM.. hence we are providing SWAP 1000 MB..

Similarly, create a BOOT Partition of 100 MB

You can provide the remaining 4000MB (approximately) to the ROOT (/) Partition as shown.. The ROOT partition houses the installation of your CentOS System..

After you have created the Partitions, it should look something like this:

NOTE: Three Partitions are created; namely, sda1, sda2 and sda3

You may get a warning saying you have allocated less SWAP space than available. You can ignore this message as anyways, SWAP is only used when the system is almost at crashing point.. 🙂

You can create the GRUB BOOT Loader on the /dev/sda partitions. Leave this for default values and click NEXT

Then, you’ll see Network Configurations screen, don’t change anything and click next. You can change whatever you want after installation, for now, let it continue in this way and click Next

From this screen, select your region and click Next

Then, you’ll be prompted to enter password for root user, enter it and click Next

To install packages that you may want in your OS, you can select them Customizing your installation here. Select Customize now option and click Next

I am not a big fan of having all these extra services running on my VM.. so I simply remove what ever I don’t require.. in this case, Games and Entertainment, Graphics, Office Suite etc are removed from Installation process.

Now, you’re ready for installation. Click next on this screen, the installation will begin

You’ll see how all packages are installing. After a while, your OS will be ready for use

After the installation is completed, click Reboot button to reboot your OS

After reboot, you’ll face with another Welcome screen. There are some steps need to be completed

Click Forward button on the screen.

Here, just disable your Firewall. Do remember that this is only for test purpose, don’t disable your Firewall on a real system! And click forward button

For testing purpose, it would be good to disable SELinux too 🙂

If you need, make your Date and Time configuration and click Forward

If you want to create a new user, you can fill these blanks. You can pass this step too by clicking Forward button

Then Click Finish and the system will reboot

After reboot, CentOS will be opened and you’ll be prompted to enter username (root) and password (root’s password)

Your CentOS is ready to use! Congratulations !!

In the next article, I’m going to show installation of VMware-tools ..

Till then, keep VMware-ing !!!


VMware hits out at Microsoft…. AGAIN !!

NOTE from yoyoclouds: Although I must admit I am a HUGE fan of VMware… but I hold no grudges what so ever against Microsoft… This was taken from a Blog posted on VMware’s Community Site..!!

Sorry Microsoft; Not Only Does vSphere Cost Less to Buy, It Also Costs Less to Operate

Microsoft’s wildly exaggerated claims of providing a less expensive virtualization platform than VMware vSphere have been hard to miss if you’ve spent any time on the web lately. We’ve previously pointed out the flaws in their math and our public Cost Per Application Calculator clearly shows how deploying a virtual infrastructure built with vSphere will cost about the same as one built using Microsoft Hyper-V and System Center (or even much less when vSphere’s proven VM density advantage over Hyper-V is factored in.) Now we’re pleased to share recent independent test results that show how vSphere also delivers dramatically lower operational costs compared to Microsoft.

The acquisition capital expense (CapEx) advantage for vSphere shown by our Cost Per Application Calculator is just part of the Total Cost of Ownership (TCO) that diligent customers will want to evaluate when choosing a virtualization and cloud platform. The other key TCO element to consider is Operational Expenses (OpEx) representing the ongoing costs of administering your virtual infrastructure. To help customers assess the OpEx differences between vSphere and Hyper-V, we enlisted Principled Technologies to run both platforms in their labs and measure the system administrator labor time needed for typical recurring tasks.
Five Typical Datacenter Tasks Tested

Principled Technologies selected five common tasks that any administrator of a virtualized datacenter must regularly perform and they measured the administrator labor time taken to complete each one using both the VMware and Microsoft platforms. The tasks tested were:

  • Shifting virtual machines off a host to accommodate physical maintenance
  • Adding storage volumes and redistributing virtual disk files across the new storage
  • Isolating storage-intensive “noisy neighbor” virtual machines
  • Provisioning new hosts
  • Performing a non-disruptive disaster recovery failover test

Care was taken to conduct the scenario tasks as realistically as possible using the full capabilities of the latest released versions of the VMware and Microsoft products available at the time of the testing. vCenter Site Recovery Manager was included in the VMware configuration (and the full list SRM license costs were included in the VMware total cost figures.) vSphere 5 delivered a convincing across-the-board win over Microsoft for each task tested: tasks took 78% to 97% less time to complete using vSphere. The time savings provided by the VMware platform arise from the more advanced capabilities built into vSphere and the more efficient and optimized implementation of those features we’ve perfected over our years of focusing purely on delivering the best virtual infrastructure and cloud platform.

It’s important to note that the OpEx dollar savings shown in the chart above derive from only five representative sysadmin tasks. There are many other regular activities performed by administrators of virtualized datacenters, most of which will show similar efficiency advantages for vSphere over less mature and capable alternatives, so customers should expect even greater total OpEx savings from using vSphere.
Scenarios Delivering Big OpEx Wins for vSphere

Contributors to the biggest operational advantages for vSphere were:

  • Storage Distributed Resource Scheduler – When more storage is needed, the vSphere administrator can add volumes and let Storage DRS redistribute virtual disk files to the new volumes automatically with no VM downtime. The Hyper-V administrator must manually redistribute VM storage and make arrangements for VM downtime during the operation.
  • Concurrent vMotion – The vSphere administrator can complete physical host maintenance much sooner because vMotion maintenance mode evacuations of VMs can proceed concurrently and at a faster rate (see comparative live migration testing results here.) Hyper-V hosts can only handle one live migration at a time, so administrators are tied up with much longer maintenance windows.
  • Storage I/O Control – vSphere makes it easy to cap the storage IOPS consumed by each VM to prevent resource hogging by “noisy neighbors.” Hyper-V has no such feature, so administrators can only respond by dedicating storage volumes for misbehaving VMs – a tedious task requiring VM downtime.
  • vCenter Site Recovery Manager – SRM fully automates replication of mission-critical VMs to a remote site and failover in case of disaster. Real disasters may be rare, but full-scale DR tests should be regular events. That’s where the automated and non-disruptive DR failover test features in SRM deliver big operational savings. Setting up DR failovers with Hyper-V requires maintenance-intensive scripting to orchestrate VM replications and restarts and to modify VMs for network isolation.

After making their labor time measurements, Principled Technologies then estimated how many times each task would be repeated over the course of a two-year period in a datacenter operating 1,000 virtual machines. Multiplying the cumulative time taken performing each task by the U.S. national average system administrator compensation rate gave a dollar figure for the OpEx savings. As shown below, the final result was an impressive 91% reduction in operational expenses when using vSphere compared to Microsoft Hyper-V and System Center.

Operational Expenses Dominate Total Costs

The impact of the OpEx savings delivered by vSphere are even more significant when you consider that IT operational expenses are typically much larger than capital expenses. In fact, Gartner survey data shows cross-industry IT OpEx spending is almost three times CapEx spending – even more reason to choose a virtualization platform that will save you money with better operational efficiency long after the initial purchase.

The OpEx savings delivered by vSphere were enough to tip the two-year TCO advantage in favor of VMware in the 1,000-VM datacenter that was the baseline for Principled Technologies’ tests. When you can have the clearly superior features provided by vSphere 5 Enterprise Plus Edition together with vCenter Site Recovery Manager at a lower total cost than Microsoft’s best alternative, it’s easy to make the decision to go with VMware.

If you’re running your datacenter on vSphere now, an OpEx win by vSphere probably isn’t surprising. vSphere users benefit from over a decade of optimizations we’ve built into our platform that derive from experience in thousands of production datacenters. What did surprise us was just how large an operational advantage vSphere has over the Microsoft platform. The results are a clear example of why you need to look at more than just a feature checklist and initial price tag when choosing the virtualization platform for your most critical workloads.

Take a look for yourself at the full test report by Principled Technologies here (registration required.)

Leave a comment »

VM Report- PowerCLI Script

VM Report- PowerCLI Script

This is a pretty straight forward script written in PowerCLI..

This script will generate an Excel sheet with some VM information in it… For E.G. it will color the cell red if the Power State of a VM equals to NotRunning… or if the version of VMware Tools installed in it are old/ outdated..


NOTE: To run the script, simply copy the contents from the PDF and paste it in a new file with the extension as “.ps1

To run the script:

  1. You will require PowerCLI to be installed on your local machine
  2. Administrative rights to run the script as well as administrative rights to your vCenter Server

Steps to run the script:

  1. start your PowerCLI command line tool
  2. go the the directory where you have saved the script (In this case, i have saved it in D:/scripts folder)
  3. run the script
  4. when the script executes, it will ask you to enter your vCenter IP (In this case, its
  5. provide the IP and hit enter key.

  1. it will prompt you to enter your vCenter credentials. Provide your Administrative credentials.

  1. once you provide your correct credentials, the script will start execution.
  2. it will display a Excel sheet with a Header row and some data in the beginning. Eventually it will be populated as the script gathers more info from your vCenter. a Demo Output image is shown below:

Leave a comment »

PowerCLI and vCloud Director: How To Videos

PowerCLI and vCloud Director: How To Videos

VMware PowerCLI 5.0.1 vCloud Director Basic Usage

A video showing PowerCLI 5.0.1 and vCloud Director Basic Usage.

VMware PowerCLI 5.0.1 vCloud Director Cmdlets – Stopping and Starting vApps

A video showing how to retrieve and use some of the methods on the vCloud Director objects taking the 5.0.1 release of PowerCLI further and stopping and starting vApps.

VMware PowerCLI 5.0.1 vCloud Director Cmdlets – Creating New vCloud Organizations

This video was presented as part of the “vCloud Infrastructure Automation – powered by PowerCLI” presentation presented at Partner Exchange 2012 in Las Vegas. It shows how to use VMware PowerCLI to create new vCloud Organizations, Users and Org vDC’s.

Leave a comment »

Getting Started with VMware PowerCLI

Getting Started with VMware PowerCLI

With vSphere 5, the traditional ESX Server has gone away and the permanent replacement is ESXi Server. Of course, the big difference is that ESXi Server doesn’t have a service console. That service console was a special privileged virtual machine that was used for administration and scripting functions for an ESX host. ESXi Servers, with their tiny Busy-box Linux super-slim console isn’t going to work for scripting and isn’t efficient for mass administration & configuration of ESXi Servers.

VMware recommend one of two options with one being the vSphere Management Assistant (vMA). For information on vMA, see my video “Using the vSphere Management Assistant”. However, scripting in vMA will be done, very likely, using Perl. For most VMware Admins, Microsoft’s PowerShell is a more appealing option as it works for a wide range of Microsoft and third-party products. Thus, your knowledge of PowerShell would allow you to script Windows Server tasks, Exchange Server tasks, and more. Well, that “more” is also VMware vSphere server tasks. When you use PowerShell with VMware’s “cmdlets”, it’s called PowerCLI and that is the best option for mass vSphere administration and scripting.

What You Need to Use VMware PowerCLI

Minimally, to use VMware PowerCLI, all you have to do is to download and install the VMware PowerCLI application (free). You can download this from the VMware PowerCLI Community site.

Make sure that you download version 5.0 or later (5.0.1) because, at the time of writing this article, version 5.0.1 is the latest and is compatible with vSphere 5.

This community site offers a lot more than just the PowerCLI software. They also house:

  • The official VMware PowerCLI documentation
  • A free PowerCLI Workshop presentation and scripts
  • A link to the PowerCLI Blog (lots of good script examples there)
  • PowerCLI sample code
  • A discussion forum where you can post your PowerCLI questions

Downloading and Installing VMware vSphere PowerCLI

As I said, PowerCLI is actually just a simple Windows installation. Downloading it will require a free VMware account but will only take a few minutes. The 91MB download may take longer to download than it takes to actually install.

Once downloaded, here’s what the installation looks like:

During the installation, you may see a message that looks like this. If you do, you can click continue but you will have to resolve this later.

Once installed, you’ll have a group of programs under your VMware program group that looks like this:

To actually run PowerCLI, you would run the program described as VMware vSphere PowerCLI and here’s what you would see:

Initially, a black window with a command prompt is very intimidating for new PowerCLI admins so please don’t get scared off at this point. You don’t have to spend your whole PowerCLI life at this command prompt. There are easier ways to use PowerCLI (and I’ll show them to you later).

First, let’s fix that nasty-looking red error (the same error that popped up during installation).

Fixing PowerCLI Execution Policy Errors by Setting RemoteSigned

I’m not going to claim to be an expert on PowerCLI security nor am I even going to go into the different PowerCLI execution policy settings that are possible. Instead, I’m just going to show you how to resolve this error the quickest way possible so that you can run some PowerCLI scripts.

This annoying error seems to come up every time I go to run a PowerCLI script and I always have to Google what I need to do to resolve it. This is likely because I never fix the issue permanently and because I don’t get the opportunity to use PowerCLI as much as I would like (I don’t have a large production environment like many of you have). So, let’s not only fix this PowerCLI execution policy error but also do it “once and for all”.

As the GUI error message said when we were installing PowerCLI, to resolve this, you simply need to set the PowerCLI execution policy to remotesigned. To do it, use the same command prompt that you see in the Window in Figure 7 and type:

Set-ExecutionPolicy RemoteSigned

Here’s what it might look like:

NOTE: If it didn’t work.. Why is that? It can be because you didn’t have access to the registry, you couldn’t set this. To set this successfully, you have to open the PowerCLI prompt as Administrator (or equivalent).

PowerGUI, VMware Community PowerPack, & Project Onyx – Must Have Tools

Now that you have the required PowerCLI installed and the correct security policy, you need the single tool that is going to make using PowerCLI easier. Using PowerCLI from that unhelpful and boring old black command window reminds me of using MS-DOS. Trust me, that’s not how you want to use PowerCLI.

The single tool that you must have to use PowerCLI productively, luckily, is completely free and comes with a ton of pre-created scripts. That tool is PowerGUI and it includes the VMware Community PowerPack. You can download it from PowerGUI.org and the install is your quick and customary Windows install process.

Resources for Learning PowerCLI

Leave a comment »

vSphere 5 Lab Automation

vSphere 5 Lab Automation

Ever had trouble in setting up your own vSphere lab?? Don’t know where and how to get started??

Well Alastair Cooke and company have posted a nice automation tool that will enable you to build your lab in a snap.

In a nut shell this tool lets you deploy your lab setup in a single laptop/dekstop with just 8GB of memory.

Once deployed the tool will leave you with 2 ESXi hosts, 1 vCenter, 1 domian controler, 1 Freenas and 1 FreeSCO for you to test/learn etc. Keep in mind only free/open source software are distributed with the tool, you will need the installers and licenses for whats not considered free.

So, if you are new to vSphere and don’t know where to begin, this will certainly help, you can also be a veteran and simply use this for testing purposes. The rest of the details are here.

Leave a comment »

Creating a mini VMware Lab using VMware Workstation – Part 1

Creating a mini VMware Lab using VMware Workstation – Part 1

VMware vSphere 5.0 has finally arrived and includes several new unique features – such as Storage DRS and Autodeploy – that deliver unprecedented value to VMware customers. Unlike prior versions, vSphere 5 supports only the ESXi hypervisor architecture, the only thin purpose-built hypervisor that does not depend on a general purpose operating system.

Altogether, it’s an awesome server virtualization software from VMware. What we’ll do in this part of the blog series is set up the ESXi server as a VM on VMware Workstation 8. Later on, we’ll create a FreeNAS server too as a VM and connect the ESXi with it, creating a mini Lab!!

Steps to Install VMware vSphere 5 (ESXi 5) in VMware Workstation with Windows 7

VMware is one of the coolest virtualization software. It supports most of the operating systems as guest operating system. Microsoft Server operating systems such as windows 2008 and windows 2008 R2 also can be installed in VMware workstation. Here I’m going to show how you can install ESXi 5 server on VMware Workstation

1) Make sure your computer processor supports hardware Virtualization Technology (VT) and its enabled in BIOS. If not, enable it in BIOS and check whether the Operating System in sensing it.

Find out more information on how to enable VT-X.

It is enabled in my Intel processor computer which is running Windows 7 64bit.

Memory – vSphere 5 requires minimum 2GB memory for virtual machine, so make sure you have enough of physical memory to allocate for virtual machine and physical computer. I have 4GB physical memory in host.

2) Download the vSphere 5 (ESXi 5.0) and Client version 5 from official site HERE. Registration is required.

3) Create a new virtual machine in VMware workstation or player. Browse the ESXi 5.0 installable ISO file you downloaded. Unfortunately the OS type can’t be detected automatically in Workstation versions 7 and below, but it automatically detects the ESXi on Workstation 8. The one I am using.

4) Set the location of virtual machine and hard disk size also. Here is the summary of my ESXi 5 virtual machine. If you like to customize some settings, such as processor cores, network, sound and extra hard disks, then press ‘Customize Hardware’

NOTE: in order to utilize ESXi as a VM on VMware Workstation, the Virtualize Intel VT-x/EPT or AMD-V/RVI option has to be enabled in the VM Settings à Processors section. In order for this option to work, your physical machine MUST support Virtualization Technology. To know more how to check whether your Machine supports VT, CLICK HERE

5) Start the virtual machine and select ‘Standard Installer’ option.  Press ‘ENTER’ to continue the installation in next screen.

6) Press F11 for EULA.  Select the disk to install if you have multiple virtual disks here. I created and started the vSphere 5 virtual machine with single 40GB disk.

Next screen will be to select the keyboard layout and type the root password. Its better to assign root password (which should be with minimum 7 characters) now.

7) Press Enter to continue the installation if you are sure your physical computer is having hardware virtualization enabled processor.

8.) Once installation completed, remove the ISO from CD drive of virtual machine and restart the VM. It should boot properly and receive DHCP IP as a management IP.

9) Press F2 to customize the server management settings. Enter the root password which was given during the installation.

You need to make sure the virtual machine’s network setting is configured properly to communicate with other hosts or guests. In my case, I will be accessing this vSphere 5 virtual machine from my host computer Windows 7, so I set up the network ‘Host-only’ network type in VMware network settings which will enable the host and guest network communication.

Check the connectivity by pinging the vSphere ESXi 5 server. I could ping to from my physical windows 7 computer.

10) Access the server IP address in your internet browser. Ignore or continue the certificate error, you must be able to see the Getting start page which will redirect you to download vSphere 5 client.

Note- This will take you to VMware’s official site to download vSphere 5 client. If you already downloaded this client package (as shown in Step 2), then skip the download and install the client package.

11) After installing the latest Client version, enter the IP of server and root password. You can ignore certificate error here too.

12) Here is the working VMware vSphere 5 in VMware workstation with Windows 7. Performance is normal because I have only 4GB memory in host. No doubt, this is very helpful for learning and experiment purpose.

It’s always nice to have these type of server virtualization software in normal PCs and create virtual machines in it.

If you are interested in create and connect NAS (Network Access Storage) in same testing environment, you can install FreeNAS OS as a separate virtual machine and connect to vSphere 5. You can read more on a step by step to connect FreeNAS with VMware vSphere server HERE.

Leave a comment »

Desktop Virtualization

Desktop Virtualization

As the size of your enterprise increases, so does the scope of its technical and network needs. Something as seemingly simple as applying the latest OS hot fixes, or ensuring that virus definitions are up to date, can quickly turn into a tedious mess when the task must be performed on the hundreds or thousands of computers within your organization.

VDI Allows One to Manage Many

A virtual desktop infrastructure (VDI) environment allows your company’s information technology pros to centrally manage thin client machines, leading to a mutually beneficial experience for both end-users and IT admins.

What is VDI?

Sometimes referred to as desktop virtualization, virtual desktop infrastructure or VDI is a computing model that adds a layer of virtualization between the server and the desktop PCs. By installing this virtualization in place of a more traditional operating system, network administrators can provide end users with ‘access anywhere’ capabilities and a familiar desktop experience, while simultaneously heightening data security throughout the organization.

Some IT professionals associate the acronym VDI with VMware VDI, an integrated desktop virtualization solution. VMware VDI is considered the industry standard virtualization platform.

VDI Provides Greater Security, Seamless User Experience Superior data security: Because VDI hosts the desktop image in the data center, organizations keep sensitive data safe in the corporate data center—not on the end-user’s machine which can be lost, stolen, or even destroyed. VDI effectively reduces the risks inherent in every aspect of the user environment.

More productive end-users: With VDI, the end-user experience remains familiar. Their desktop looks just like their desktop and their thin client machine performs just like the desktop PC they’ve grown comfortable with and accustomed to. With virtual desktop infrastructure, there are no expensive training seminars to host and no increase in tech support issues or calls. End- user satisfaction is actually increased because they have greater control over the applications and settings that their work requires.

Other Benefits of VDI

  • Desktops can be set up in minutes, not hours
  • Client PCs are more energy efficient and longer lasting than traditional desktop computers
  • IT costs are reduced due to a fewer tech support issues
  • Compatibility issues, especially with single-user software, are lessened
  • Data security is increased

VDI Models

There are several different conceptual models of desktop virtualization, which can broadly be divided into two categories based on whether or not the operating system instance is executed locally or remotely. It is important to note that not all forms of desktop virtualization involve the use of virtual machines (VMs).

Host-based forms of desktop virtualization require that users view and interact with their desktops over a network by using a remote display protocol. Because processing takes place in a data center, client devices can be thin clients, zero clients, smartphones, and tablets. Included in this category are:

Host-based virtual machines:Each user connects to an individual virtual machine that is hosted in a data center. The user may connect to the same VM every time, allowing personalization, (known as a persistent desktop) or be given a random VM from a pool (a non-persistent desktop). See also: virtual desktop infrastructure (VDI)

Shared hosted: Users connect to either a shared desktop or simply individual applications that run on a server. Shared hosted is also known as remote desktop services or terminal services. See also: remote desktop services and terminal services.

Host-based physical machines or blades: The operating system runs directly on physical hardware located in a data center.

Client-based Virtual Machines: types of desktop virtualization require processing to occur on local hardware; the use of thin clients, zero clients, and mobile devices is not possible. These types of desktop virtualization include:

OS streaming: The operating system runs on local hardware, but boots to a remote disk image across the network. This is useful for groups of desktops that use the same disk image. OS streaming requires a constant network connection in order to function; local hardware consists of a fat-client with all of the features of a full desktop computer except for a hard drive.

Client-based virtual machines: A virtual machine runs on a fully-functional PC, with a hypervisor in place. Client-based virtual machines can be managed by regularly syncing the disk image with a server, but a constant network connection is not necessary in order for them to function.


%d bloggers like this: