VCP 6.5 Certified

I meant to post this sooner, like 2 months ago as this happened back in October, but I passed my VCP 6.5 Upgrade Exam.

Since then I have been working on the VCAP 6.5 – Data Center Design Exam. I am hoping to sit for it in the New Year!

How to install PowerCLI

Recently VMware has changed the way you install PowerCLI from being the standard MSI installer that we have all been used to for years, to downloading and installing it from the PowerShell Repository.

Here is the process for installing PowerCLI:

Open PowerShell by running it as an Administrator

Once PowerShell loads up you will want to change the Execution Policy to Remote Signed

Set-ExecutionPolicy RemoteSigned

Once that is done you can install PowerCLI by running this command:

Install-Module -Name VMware.PowerCLI -Scope CurrentUser

You will then be prompted at least twice to give your consent to download and install from an untrusted repository.

How to add Target Servers to vMA

I have had this one post sitting around for a while and I figured I should get it written before it gets lost.

Earlier I was working on getting vMA stood up in my lab environment and I figured that I should do a post about how to configure vMA to connect to a target. Adding a Target Server in vMA is a faster way for you to be able to issue commands. Rather than having to specify which server you want to run commands against (especially if you are running several commands on the same box) you should set the server as a target. In this instance I will run through the steps of setting a target for an AD Authenticated host or vCenter. 

From the vMA console you will type the following command out:

vifp addserver <vcenter server name.domain.local> –authpolicy adauth –username <AD DOMAINUserName>

and press Enter and you will be prompted for the Password of the AD account that you referenced.

To verify that the server is connected you can use the following command:
vifp listservers –long

This will tell you the server name as well as the method of authentication. Now anytime you want to run a command against that host you will be able to do so without having to re-authenticate every time.

To set your Target server you can use the following command prior to running your actual command or script.

vifptarget -s <servername>

VMWare Virtual Machine will not Start in vCenter

So I was asked by a client to do up “hardware upgrades” on one of their virtual machines. This VM is not production and is not running anything at the moment, but will soon become an SQL Server running an application. So I went and powered off the VM, logged into the C# vSphere client (they are running vSphere 6.0), and doubled the memory as requested by the client.

After making the change I went to power on the VM and I get presented with this pop up error message from VMWare

The message itself seems pretty generic but I have actually seen this one before. This error has to do with  an issue with the management agents on  your ESXi host.

I followed the instructions found on this KB article but it did not resolve my issue. I also found this KB article which might yield better results but as this whole environment is production, I will need to wait to test that.

WORK AROUND:

In order to get this VM powered back online, I needed to log directly into the virtual host and power on the machine.

The VM powered on with no issues.

I hope you find this helpful and I will update this when I have a solution.

VM not Powering on due to vmx.lck

To start, let me apologize for not taking screen shots to share this issue. If this issue occurs in the future I will be sure to take them then and fill in the blanks.

Today after coming into the office from a long weekend because of Memorial Day we discovered that our Lab had an issue on Friday at 7 PM. While I was working on getting everything backup and online I found that my precision Exchange 2013 Server that I built in a previous post was showing up as being grayed out.

Play ominous music

My knee jerk reaction here was to remove the VM from inventory and try to re-add the VM back into inventory by right clicking on the .vmx file and click add to inventory. Something I have done hundreds of times before without issue. However this time was different, the .VMX file would not allow me to add the VM to Inventory. I also noticed there were more than 1. VMX file.

Fortunetly I was already logged into the host as root and saw the the VM was still in inventory. Then I looked at the other host while logged in as root and saw the same thing. I then processed to look at the vCenter and I did not see the VM anywhere.  I thought to myself now how can this be? I am not 100 % of what exactly happened for sure but I have a theory that I intend to try and duplicate at a later date.

So here is goes:

The entire environment went offline during a network issue that caused the iSCSI to drop out. We have had this issue before and after checking the NAS we discovered that the NAS is okay we initiated a reboot of the virtual hosts. Once they came back online we found that the storage adapters could not see the NAS. So from here we rebooted the NAS and we were then able to do a rescan and the LUNs all came back without issue.

Now because we have HA and DRS enabled on our cluster the VMs all started on their own, causing a whole new headache that I do not want to go into at this point. However during this process the one host evacuated all it’s VMs and sent it to the other host.

I am thinking that this is the point where the VM mix up occurred. the 2 virtual hosts were fighting for the VM and that contention caused it to become orphaned. To resolve this issue I removed the VM from the inventory on both machines and then the vmx.lck file disappeared and I was able to re-add the VM back into inventory though vCenter.

I hope this helps someone with their issue, sorry for the lack of pictures but if/when it happens again I will be sure to add it back in.

How to create a new VM using VMware vSphere 5.x

Greetings all, this will be my very first technical blog post. I am pretty new to the game but I figured that starting with a how to guide may be beneficial to others as well as a great way to track all of the things I have worked on.

In this post I will go over the process of creating a new Virtual Machine (VM) in with VMware vSphere 5.5 in my lab environment. I will be doing this in a series with the end goal of having Microsoft Exchange 2013 SP1 installed and running in my Lab environment.

Things to consider before proceeding is that this is a preexisting lab environment that has a lot of things going on. Now what we are working on here should not be disruptive to the rest of the ecosystem but you never know. the moral of the story here is to make sure that you are mindful of what you are working on and do not touch what is not yours.

Now with that out of the way, lets get started:

Requirements
Build 1 VM with the following specs:
CPU: 1 Socket 2Cores
RAM: 8 GB
HDD: OS 60 GB and Data 80GB

Note – I know that these spec’s are not recommended by Microsoft to run a production Exchange server. Remember that this is a Lab, If you are using this as a guide for Production then I recommend that you check the system requirements from Microsoft

https://technet.microsoft.com/en-us/library/aa996719%28v=exchg.150%29.aspx

Step 1 – Log into vCenter using the vSphere client

Fill in the IP/Name of your vCenter Server/ESXi host,username (in my case DomainUsername), and password

Once logged in click on the Virtual Host that you want to create the VM on and click create VM on the Getting Started Tab under the Basic Tasks section.

This will launch the create a New Virtual Machine Wizard.

Click Next to continue to the Configuration Screen
From here you have the option to select Typical or Custom configuration. For the purpose of this guide we are going to click Custom to give us the options that we need that are not available under typical.
Once you click Custom you will see the menu tree on the left hand side expand out. Click next to continue.
On the Name and Location is where you can name your VM. You can name it whatever you would like, it does not have to be the name of the computer but believe me when I say that is does help. 
Click Next to proceed

After the Computer is named you may be asked to specify the resource pool you would like to have the VM in. We will talk about resource pools at a later date. Unless you know what you are doing, just leave the defaults and click Next.

You will now be able to select what Storage you would like to use for your VM. My suggestion is to pick some kind of shared storage solution (NAS/SAN) but if that is not available then Local storage will work. Just make sure that you have sufficient space for your VM.

Click Next to Continue.

 On the Virtual Machine Version Window you will be able to select what hardware version you would like the VM to be. This will be important if you are running different version of ESXi in your environment and you plan to use vMotion to migrate machines. For the purpose of this exercise and because all of my ESXi hosts are at least version 5.5 I will select Virtual Machine Version 8.

Click Next to continue.

Guest Operating System allows you to select what OS you are going to install on your VM. This comes in handy as VMware has pre-configured options based on the OS you are installing on the VM.

Since we are installing Exchange 2013 I thought it would be nice to install Server 2012 as the base OS.

Click Next to continue.

On the CPUs section allows you to select the number of Sockets and Cores that you would like to use and because we are installing Exchange we would need to allow more cores to be available to this VM. The default is 1 Socket and 1 Core but for my purposes I set the cores value to 2 for this case.

Click Next to continue.

Memory Configuration is exactly what it sounds like. You are able to specify the amount of memory for this VM, the Default is 4 GB and I have changed it to 8 GB for now.

Network not only allows you to define the number of network adapters your VM will have but what network you are putting it on and what adapter you would like to use.

The default is to have 1 NIC and I am going to leave it the same for this, and the default adapter is the Intel E1000. I have changed it to VMXNET3, however if you use this NIC you will need to install VMware tools for it to work. For more information for your network choices you can read the KB Article here

Click Next to continue onto SCSI Controller.

The next option that you get to set is the SCSI Controller, By default LSI Logic SAS is selected. Depending on the OS and other factors you may wish to change this however I will leave the default.

Click Next

 You are given a few option for creating a new disk for your VM. 99% of the time I would say that “Create a new virtual disk” will be the only option you will use. However there are a few time where you may want to map your new VM to a preexisting disk (VMDK) or a Raw Device Mapping (RDM).

Click Next to continue.

Now that you have selected a disk it is now time to create it (Format) how you would like it.
For our purposed I have made the disk Size 60 GB and I plan on using this for the OS only. I have also chosen to “Thin Provision” this VM, this will allow for faster creation time, however there may be a performance impact during disk operation as the disk will be provisioned as the data is being written. This is perfect for my lab environment. You will need to figure out what will work best for you and you needs.

Click Next to to continue.

Since we are using a SCSI controller we have the option of changing the address of the disk and even specifying what mode we would prefer.

Virtual Device Node can be left a default as vCenter does a decent job of handling this for us.

Mode – if you are intending on using vCenter to Snapshot your vm you can just click Next as I have to move past this.

Click Next

Right before you VM is created you have the Option to Review all of your choices before you click Finish.

 As you will notice there is a check box that will allow you to edit the virtual machine before it is created. This is great to use if you need to add an additional Disk or you would like to mount an ISO of your preferred OS before making you VM.

Click Finish and your task will be submitted.

Once the Task is completed the VM should be created and be ready to start.

Well that is all for now, I hope to see you all on my next post for Installing Windows 2012 R2.