Categories
PowerCLI Virtualization Vmware

Getting past Certificate issue in Power CLI

So I recently started working more with PowerCLI. After my time at VMWorld 2019 (which I will cover in another post) I realized how powerful that PowerCLI actually is (pun not intended). In starting to work with PowerCLI I came across the following message whil: trying to connect to my vCenter

Connect-vIServer : xx-x-xxxx xx:xx:xx Connect-VIServer Error: Invalid server certificate. Use Set-PowerCLIConfiguration to set the value for the InvalidCertificateAction option to Prompt if you’d like to connect once or to add a permanent exception for this server.

I did some googling and I found this article,so shout out to Ivo Beerens for his article.

https://www.ivobeerens.nl/2018/07/18/quick-tip-powercli-invalid-server-certificate-error/

In his article he goes on to share this command

Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false

After putting that into PowerShell and pressing enter you will no longer get the Invalid Certificate message.

I hope you found this post helpful, I will be posting about some of the scripts that I have been posting on my Github. Please share with your friends if you found this helpful. 
Categories
Virtualization Vmware

All vCenters not showing up after adding a new one to an SSO Domain

As I have mentioned before, the company I work for had a disaster event that took place almost a year ago and because of that we have had  some of our infrastructure duct taped together.

Today I am proud to say that I had the opportunity to rip off another piece of that duct tape and actually move our Virtual Infrastructure forward.

You see, Pre-Disaster we had a single vCenter appliance which managed 3 sites. (Yes I know… yuck)

But, because of the disaster we had to move all of our services from the 1 site to the other 2. In the middle of the DR event I had to create 2 VCSA appliances to be able to manage the 2 sites, and due to a lack of sufficient network connectivity at the time, they were just islands. I even set them up a separate SSO Domains.

Fast forward to today, and I have now consolidated these 2 SSO Domains down to 1 and I must say it is pretty slick.

I did however run into a bit of an anomaly, which is the purpose of my post today. You see on the VCSA appliance that was added to the existing SSO domain, I discovered that I could see the first VCSA Appliance in the vSphere Web Client as well as it’s inventory which was awesome!

However on the vSphere Web Client of the Original VCSA Appliance, I can only see the 1 VCSA Appliance.

I consulted Dr. Google but found nothing at first, until I came across this post on the IBM Cloud for VMware Solutions site.

It turns out that you need to restart the vSphere Web Client in order for the new vCenter server to appear.

Just encase the link dies I will post the resolution here:

This is a known VMware 6.5 issue.

To resolve the problem, you must restart the vSphere Web Client:

Using the root account, connect over ssh to the vCenter VM (virtual machine) of the previously ordered instance.
Type shell to enter the bash shell.
Enter service-control –stop vsphere-client to stop the client.
Enter service-control –start vsphere-client to restart the client.
After the vSphere Web Client of the previously ordered instance is restarted, confirm that the vCenter Server system for the newly added secondary instance is visible in the vSphere Web Client.

NOTE: Rebooting the VCSA Appliance will also resolve your issue.

I hope you found this helpful, and if so please let me know and share with your friends.

Categories
Tools Virtualization Vmware

Tools Discussion – VMWare Converter Standalone

Today I wanted to talk about VMware Converter Standalone which has been a constant in my bag of tricks for a long time. VMware Converter is a tool that allows you to convert a Physical Machine to a Virtual Machine which can run on a VMware ESXi host or VMware Workstation / Player. You can also use VMware Converter to resize Virtual machines or even convert them from Thick Provisioned virtual disks to thin.

Before VMware Converter was a free Standalone product, it was an add-on to vCenter (version 3-4.1 if my memory was correct) that was licensed by VMware. It enabled you (much like it does now) to convert a physical machine and turn it into a Virtual Machine. Pretty Sweet huh?!

Somewhere between vSphere 4 and 5 they decided to remove it from vCenter as an add on and make it a a separate product and best of all made it free!

During the installation process you are now asked to decide if you are doing a standalone installation or a Client Server install. I will probably do an install guide for this later so I can discuss further as both have their merits.

If you are interested in getting a copy of VMware Converter Standalone you can follow this link. It will also be available on the Tools page once this post goes live.

I hope you found this post helpful and please check back later for more articles.

Categories
Virtualization Vmware

How to Create a Virtual Machine using VMware Workstation Professional 15

Continuing on from my previous post, I wanted to go through the process of creating a Virtual Machine with VMware Workstation Professional 15. Mostly because the last time I did a how to create a VM post, it was a few years ago and it was vCenter 5.5, and because I will be building off of this for future posts.
So let’s get started.
Launch VMware Workstation Professional 15 Pro and you will be presented with the following screen. 
You will want to click on the Create a New Virtual Machine Button (Circled in Red below)

That will launch the New Virtual Machine Wizard.

From here you will want to select either Typical or Custom for your installation configuration. For the purposes my installation I am going to go with a Custom installation. 

After selecting Custom click Next. You will be presented with the option to choose your Virtual Machine Hardware Compatibility. 

As as you can see from the drop down menu below there are many options to choose from. Each option has different compatibility requirements which also brings different limitations. Also remember that Newer Hardware Versions will not be compatible with older versions of VMware Workstation, so if you have to move between versions please keep that in mind. 

For our purposes I will be Selecting ESXi 6.5, which should allow me to import this VM into an ESXi environment without needing to use VMware Converter. I will probably cover this in a later post. 

After making your selection, click Next to specify the OS for your Virtual Machine. You can either select and Installer disk, and Installer Image File (.iso), or I will install the Operating system later. For the purpose of this post I will be installing from a Image File (.iso). 

Click on browse to be prompted to select your Image file.

Select your installer Image File and click Open to continue. 

Depending on the .ISO you are using as the installer, VMware Workstation will attempt to determine what Operating System (OS) you are trying to install. This will also provide recommended settings based on your OS.

Click Next to continue on to name your Virtual Machines and specify where I want the Virtual Machine files to be located.

Click Next to move on to set Processor Configuration. The Processors are capped at the total number of Virtual CPUs available on your machine. If you try to over provision your processor you will get a Error message. 

Click Next to continue on to set the Memory for the Virtual Machine.

As you can see there is a “Recommended Memory” setting when you get to this screen. This is gathered from the .ISO check a few slides back. Click Next to continue on.

For Network Type you have 4 Options as seen above. The default is to use network address translation. This setting is all dependent on how much access you want to give to your VM. Do you want it to be accessible to or from your network? Perhaps you are setting up a VM to test some dangerous program? All these things you need to consider before clicking Next to continue. 

On this screen you will need to select your I/O Controller. I went with the recommended setting and clicked Next to continue.

 On the next screen you will be presented with options for Virtual Disk Type. Depending on what you will pick will determine compatibility with other Hypervisors in the future and can cause a real headache for someone else down the line if you don’t consider your options. I will cover that in a different post. For my purpose I will be sticking with SCSI which is recommended and is also the default selection.  

Next you will be asked to Select a disk from the following option.

As this is a new Virtual Machine I will be selecting Create a new Virtual Disk and Clicking Next.
You will then be presented with the following screen where you can specify the size of your Virtual Disk, if you want to Thick Provision it, and how you would like the file stored. 

Make you selection and Click Next to Continue. Next you will be able to Name the Virtual Hard disk and Specify what storage it will be installed on. 

 

Click Next to continue. Review your settings and Click Finish to continue. 

Categories
Virtualization Vmware

VMware Home Lab 1.0

GREAT DAY IN THE MORNING!!!!!

Alright I had to find a different way to start this post, so I decided to borrow Pierre Roberts Catch phrase. I don’t think it worked so he can have it back. 
I wanted to take the time to talk about my home lab that I am currently using. As I mentioned in a previous post I have a Razer Blade 2018 which I will be using to run my lab for now. 
Stock the laptop comes with:
  • 8th Gen Intel Core i7 – 8750H Processor 6 Cores/12 threads up to 4.1 GHz
  • 1 TB M.2 SSD
  • 16 GB of RAM. 
I have been wanting to upgrade it to 32 GB of RAM since I purchased it, however $400 for 32 GB of RAM was just too much for me to swallow at the time. 
I had been watching the price of RAM (particularly for this laptop) for the last few months and saw that it was steadily declining. I finally decided to pull the trigger when it was down to 49% off on Amazon. 
The RAM Arrived a few days ago, and I installed it in the laptop, and I have to say it is awesome. I have never seen a laptop run this good. 
I installed VMWare Workstation Professional 15 (Thank you VMUG Advantage) and I will have a install guide out for that soon. 
I am also beginning to Spec out my VMware Home Lab 2.0 which will also be a Nested Solution. I will probably leverage my Kit.com account to show my parts list once I get it running. 
I hope you find this post helpful and stay tuned for updates.
Categories
Virtualization Vmware

How to add a VM to inventory

So like I mentioned in a previous post, I have been trying to help people out on VMNT or VMware Community forums. One of the posts that I helped out on involved someone who needed  help adding a VM to inventory after it was restored.

Here is how you can add a VM into inventory if it has been removed for some reason

From vCenter, you will need to click on a ESXi hosts
Then click on the Configure tab

Then click on Datastores and select the Datastore that the VM is stored on. 
Right Click the Datastore and select Browse Files

Locate the VM folder, and select the .VMX file

Right Click on the .VMX file ans select Register VM

This will open the Register Virtual Machine wizard. You will need to set the name (which should be pre-populated and select the Data center and click Next.

Select the Cluster and click Next

Select the Application Pool and Click Next

Click Finish to exit the Wizard

 
After you exit the Wizard you will see the Virtual Machine added to Inventory. 
As always I hope that this is helpful for someone. 

I didn’t know this was even possible…. SSL Certificate weirdness

 So I was working on the post about how to resolve the SSL Certificate error message that you get if you do not have the Root certificate for the ESXi host installed on your machine. Well in the process of taking screen shots for that post I discovered something that I have never seen before.  Rather than starting from the beginning, lets pick up at the end of the last post.

So right after you finish installing the Root CA on your machine, you have closed out of your web browser and reopened it and go to the URL and you get this message.

On first glance it looks like the certificate install failed, but it didn’t, Upon closer inspection of the message you will see that there is an issue with the CN is invalid. 
For those who do not know CN means Common Name which is usually the FQDN or Host name of the server. So I went back to check the CN of the Certificate of the ESXi host and I found what you see below.  This is where things get crazy….

So according to the image above, the SAN or Subject Alternate Name (AKA a list of CN’s, usually up to 5 on one Certificate) is an IP Address!!! How the heck is it an IP address? 
So what I tried next was typing in https://172.26.96.44 in my web browser and I was immediately presented with the image below. 


So wait, it worked like it should using the IP address instead of the name. How did that certificate get issues at all.

WELL….. It would appear that one of my co-workers added this host to vCenter with the IP address instead of the name.

Needless to say I am very disappointed in my Co-Worker for not following our naming convention.  But if I had to guess it looks like VMCA (VMWare Certificate Authority) which is included in the PSC (Platform Services Controller) and issues Certificate to hosts when they are added to vCenter must have issues the certificate to the IP address because he added it using the IP. Having dealt with several different Certificate Authorities in my time, this is crazy to see. 
Anyway this is just a heads up just encase you run into something like this in your travels. 

How to get rid of Certificate Errors on ESXi hosts

Recently I have been spending a lot of time on the VMware Community forums just reading posts and helping out where I can. One of the threads that I helped out with had to do with how you can get rid of the pesky SSL Certificate error message you get every time connect to an ESXi host. 
To resolve this issue you will need to add the Root Certificate for the ESXi host (the Certificate of the server who issued the certificate for the ESXi host) into the Trusted Certificate Authority Folder on your machine. 
To start you need to go to the web page for the ESXi host 
You will notice a few thing, first of all, I used an ESXi 6.0 host that I had in my lab and secondly you will see the RED background color in the address bar. You will need to click on the Certificate Error message as seen in the next picture.
From there you will get this pop up message
Click on View certificates to see the Client Certificate which is assigned to the host. You will then this the Certificate popup.

You will need to click on Certificate Path to see the CA

From here you will see all the Certificates in the Chain, in this case there are only 2

Click on the root certificate ( the one on the top of the chain) and click the View Certificates button to be able to see the certificate attributes. 

A new Certificate window will open and you can click the Install Certificate Button to install it on your machine

This will open the Certificate Import Wizard.

You will need to click the Local Machine radio button and click next.

Select the Place all certificates in the following store

 Click the Browse button to select where the certificate should be saved.

Select Trusted Root Certification Authorities and click OK

Click Next to Continue

Click Finish to exit the Wizard

You will then get this pop-up message, click OK to continue.

Click OK again

and click OK one more time

 Then close out your Web Browser, reopen it and go back to the web page and you will no longer have red bar going across the screen.

 I hope you find this helpful, I have a few more articles in the pipeline and I am working on getting out soon.

Free VMware Training is available

Last night while searching the twitter-verse I saw this twitter post from VMware:

Got some free time? Advance your career with some free #VMware self-paced eLearning (40+ courses): https://t.co/J89cSiwIFR pic.twitter.com/n0pHvYV7yI

— VMware (@VMware) January 27, 2019

You can obtain this free training here or by following the link in the tweet above.

I hope you find post helpful, please check back for more content in the coming days.

How to Change VM from BIOS to UEFI

I just had a question on the VMWare Community about how to change a VM from BIOS to UEFI.

I found that if you go into Edit Settings > Click on the VM Options Tab and you should see this

I hope this is helpful for anyone who needs this information in the future.