Unable to Install .NET 3.5 on Server 2012R2

So upon trying to install .Net 3.5 on a new server today it would not allow me to, it kept telling me the source files were unavailable even after pointing to source directly to multiple ISO’s and copied the files locally.

dotneterror

Upon further research I stumbled across this microsoft KB article and used it to ultimately find my fix.  http://support.microsoft.com/kb/2734782

Here are the full steps I followed to get .NET installed.

1. Open gpedit.msc to modify your local group policy.

2. Navigate to Computer Configuration/Administrative Tools/System and there should be an option for “Specify Settings for optional component installation.” Enable this option and select “Contact Windows Update directly to download repair content.”dotnetstep2

3. Now open up an elevated cmd/powershell prompt and run a gpupdate /force to enforce the new policy

4. Run the following command to install .NET.
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All

.NET should now be installed!

Sysprep runs repeatedly on virtual machines deployed to ESXi 5.1 build 1743533

We had a strange issue that any time a VM was snapshotted it then forced a reboot and sysprep. Reviewing the customization logs(C:\windows\temp\vmware-imc\guestcust.log) I noticed the following error..Unable to set customization status in vmx.

Upon further research it seems this is a known issue and is resolved in ESXi 5.1 Express Patch 5 as referenced in this article. http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2078352

However the hotfix only fixes future occurences, you still need to fix all the VMs affected. See below for the powercli script I created to connect to all my vcenters, get VM’s that are affected and then fix them. Please note as this is not referenced in the KB that the VM will need to be POWERED OFF and then POWERED ON for the change to go into affect. A restart will not fix it.

connect-viserver vcenter1
connect-viserver vcenter2
$VMs = Get-VM | Get-AdvancedSetting -Name tools.deployPkg.fileName | Where-Object {$_.Value -ne “”}
$VMs | Select Entity, Value
$VMs | ForEach {Get-VM $_.Entity | Get-AdvancedSetting -Name tools.deployPkg.fileName | Set-AdvancedSetting -Value ” -Confirm:$false}

 

Configuring ESXi 5.5 Syslog Collector

Thank you to everyone who listened to me on the EMEA vBrownbag. Here are copies of documentation and scripts on how to configure ESXi to use the Syslog collector.

Check the ESXi Syslog Collector Configuration Example:
Foreach ($vmhost in (get-vmhost)){
$esxcli = Get-EsxCli -vmhost $vmhost
$esxcli.system.syslog.config.get()}

screenshot.37

Setting the ESXi Syslog Collector Example:
Foreach ($vmhost in (get-vmhost)){
$esxcli = Get-EsxCli -vmhost $vmhost
$esxcli.system.syslog.config.set($null, $null, $null, $null,”udp://IPtoSyslogServer:514″)
$esxcli.system.syslog.reload()}

screenshot.38

Post-Installation Changes
If you wish to change the default port or maxsize of the syslog rotation, these can be changed by modifying the vmconfig-syslog.xml file. See below link with instructions on how to make the changes and restart the Syslog Collector Service.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2021652

PowerCLI Scripts courtesy of Mike Laverick

Configuring ESXi 5.5 Dump Collector

Thank you to everyone who listened to me on the EMEA vBrownbag. Here are copies of documentation and scripts on how to configure ESXi to use the remote dump collector.

Check the ESXi Dump Collector Configuration Example:
Foreach ($vmhost in (get-vmhost)){
$esxcli = Get-EsxCli -vmhost $vmhost
$esxcli.system.coredump.network.get()}

screenshot.36

Setting the ESXi Dump Collector Example:
Foreach ($vmhost in (get-vmhost)) {
$esxcli = Get-EsxCli -vmhost $vmhost
$esxcli.system.coredump.network.set($null, “vmk0″, “IPtoDumpCollector″, “6500″)
$esxcli.system.coredump.network.set($true)}

screenshot.35

Test Host by Causing PSOD
Run the following command via SSH or Direct Shell. We can see that the server is now doing a network coredump.
vsish -e set /reliability/crashMe/Panic 1

screenshot.39

Post-Installation Changes
If you wish to change the default port or maxsize of the dump, these can be changed by modifying the vmconfig-netdump.xml file. See below link with instructions on how to make the changes and restart the Dump Collector Service.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2002954

PowerCLI Scripts courtesy of Mike Laverick

Deploying vCloud Connector 2.6 and Configuring For vCHS (Part 3)

In Part 1 we showed you how to deploy vCloud Connector 2.6, and in Part 2 we showed you how to configure it.

Here in Part 3 we will show you how to migrate a workload from your private cloud to your public cloud.

Lets go back to our vCenter and select our vCloud Connector Plugin

screenshot.39

Expand your vCenter and select the folder that contains the VM you wish to copy to vCHS. (The source VM must be powered off)

Select your VM and select the Copy Icon

screenshot.1

Here we will select our vCHS Cloud Node. Enter in a name for our VM and select which catalog in  vCHS we wish to assign it to.

screenshot.2

Select your vDC you wish you deploy the VM to.

screenshot.3

From here we have two options. If we already have a vApp in vCHS we we to use we will leave all the boxes unchecked.

screenshot.4

However if you do not have an existing vApp we will need to Deploy a vApp after copy. Here we will select the network mode (direct or fenced) and which network we wish to use. Make sure to UNCHECK guest customization as you will not want your VM to be re-sysprepped. You can then automatically choose to power on your vApp and remove the temporary one if needed.

screenshot.5

Next we will review our copy settings and choose validate.

screenshot.6

You may receive an error about the staging space. This means you need to increase the disk space on the vCloud Connector Node to be equal to the size of the VM you are trying to migrate. In my case my VM was thin provisioned so there was no issue with this warning.

Select Finish and you will see your VM Copy begin.

screenshot.8

Once the copy completes we can now navigate to our vCHS console and view our VM.

screenshot.10

Lets navigate to https://vchs.vmware.com and logon. Lets select our VDC and select our Virtual Machines and now see our new workload.

screenshot.12

If we wanted to modify the virtual machine/vAPP under related links we can “Manage Catalogs in vCloud Director”

screenshot.11

 

If we select My Cloud, and then VM’s we can see our VM’s and shutdown and edit any settings we need and then power back on.

screenshot.13

Now we have migrated a workload from our private cloud to our public cloud! Hope this has helped you with any testing you need!

Deploying vCloud Connector 2.6 and Configuring For vCHS (Part 2)

Here is Part 2  a continuation of Deploying vCloud Connector 2.6 and Configuring For vCHS (Part 1) where we will configure vCloud connector to your Private(vCenter) and Public(vCHS) clouds.

Lets start with getting the vCloud Connector Server ready. Just in case you forgot what IP you assigned we can open the appliance and view the management information.

screenshot.19

As we can see here the URL to configure the appliace is https://192.168.0.13:5480 and the default username is admin and default password is vmware.

Once logged in it is best to update the timezone. Select your timezone and make sure to Save Settings.

screenshot.21

It is also best to make sure you change the default passwords, so select the Server tab and enter in your new information.

screenshot.22

The next thing we want to do is make sure we register the vCloud Connector Server with vCenter so we get the plugin to manage the solution. Select the vSphere Tab underneath server and enter in your vCenter information and make sure to select register.screenshot.23

 

screenshot.24

Now that we have vCloud Connector registered with vCenter and the vSphere client we can go away and add in our nodes.

Navigate to the nodes tab and select Register Node.

screenshot.25

In order to register vCHS as a node we first need to logon and gather some information. So navigate to https://vchs.vmware.com and select your VDC. On the right hand side expand vCloud Director API URL underneath Related Links. We will need to copy the first aprt of the URL. In our case https://p1v17-vcd.vchs.vmware.com

screenshot.27

Here we will need to enter in the vCHS tenant information. Our Display Name(This will be the cloud name within vCloud Connector) the Node URL(This is the link to your vCHS Instance, append 8443 as vCHS uses a different port), If it is a public cloud(vCHS), Cloud Type will be vCloud Director, vCD-Org Name will be your vCD name within vCHS and then username and password will be your vCHS Information.

screenshot.28

Once you are done select register and you will see your vCHS instance successfully registered. You will also note it appended the full url to the organization.

screenshot.29

Now we need to go ahead and configure our vCloud Connector Node to be able to add our vCenter(Private Cloud). Navigate to the management IP port 5480 and use the default username admin and password vmware as we did with the server. Make sure to update the timezone and password appropriately as we did above.

Now we will navigate to the node tab and select Cloud Registration. This is where we will enter in our vCenter server. Enter in your vCenter IP and make sure to select Ignore SSL Cert if you are using the default certificate or future steps will fail. Select Update configuration and we are all done configuring the node.

screenshot.35

We will now go back to the vCloud Connector Server to register our additional node. Enter in the Display Name in which it will show up in the management console, the node URL, will be the IP of the vCloud Connector Node, Cloud Type will be vSphere and the credentials will be an account with administrator rights into vCenter.

screenshot.37Select Register and you should now see your private and public clouds registered.

screenshot.38

Now that the vCloud Connector Server is all ready we can now add the Clouds we registered as nodes. Lets navigate to our vSphere client and look at a new plugin that has been added.

screenshot.39

Once selected we can now add objects to our cloud, select Clouds and select the green + sign to add our private and public clouds to manage.

screenshot.40

Lets add our Public Cloud (vCHS) First. From the Drop down for name select the display name you set above. All we need to enter here is your vCHS username and password and select Add.

screenshot.41

Now we can add our vCenter (Private Cloud)

Select the + sign again and choose your vCenter node you registered previously. Enter in the same username and password you used to register the node.

screenshot.42

Now if we go back to our Clouds tab we can now see both our public and private clouds registered.

screenshot.43

You can now migrate your private cloud workloads to the public cloud!

 

Deploying vCloud Connector 2.6 and Configuring For vCHS (Part 3)

Deploying vCloud Connector 2.6 and Configuring For vCHS (Part 1)

So luckily i was selected for the June 2014 wave of vCloud Hybrid Service  access as a vExpert. I have been looking forwarding to using vCHS since it went GA and am glad to finally have the opportunity to use it hands on.

Once I got access I knew I wanted to copy some of my existing workloads to vCHS instead of having to start from scratch. I begin to look for some good guides on implementing vCloud Connector 2.6 but couldn’t find anything as it was just released and majorly overhauled.

So here is my first howto blog post, I hope it helps you get your POC configured nice and smooth.

First you will need to download the vCloud Connector Server and vCloud Connector Node from https://my.vmware.com. vCloud Connector 2.6 is now free and no longer needs a license.

Once you have the two OVF bundles downloaded you will need to deploy them through vCenter.

Select File, Deploy OVF.

screenshot.7

Now browse and select the vCloud Connector Server OVF File

screenshot.8

Next you will be prompted with the OVF Information and requirements, select Next.

screenshot.9

Accept the EULA.

screenshot.10

Leave Default VM Name

screenshot.11

Choose the host/cluster you wish to deploy to.

screenshot.12

Choose a resource pool (if utilized)

screenshot.13

Choose your datastore.

screenshot.14

Choose your Disk Format, in most cases you may want to use Thin.

screenshot.15

Select your network port group.

screenshot.16

Fill in Static IP information, if you want to use DHCP leave all fields blank.

screenshot.17

Review your settings and then hit Finish to deploy your vCloud Connector Server.

Repeat all steps above for your vCloud Connector Node. This will be utilized to add your Private Cloud (vCenter) to vCloud Connector to move virtual machines to vCHS.

Deploying vCloud Connector 2.6 and Configuring For vCHS (Part 2)

Create VMFS Datastore Using PowerCLI

For upcoming testing there was a need to create 140 datastores on a cluster for testing. Who wants to do that much clicking and typing? Not me!

You can use the below PowerCLI commands to get the SCSI ID’s,  Create the Datastore and then Rescan all hosts in the cluster.

How do i get the CanonicalName for allocated disks?
Get-SCSILun -VMhost 192.168.1.103 -LunType Disk | Select CanonicalName,Capacity

How do I create a VMFS datastore for the CanonicalName I identified above?
New-Datastore -VMHost hostname -Name datastorename -Path canonicalname -Vmfs

How do i rescan all the hosts in the cluster to see the new datastore?
Get-Cluster -name “Cluster” | Get-VMhost | Get-VMHostStorage -RescanAllHBA

vSphere 5.x Storage vMotion Does Not Rename Virtual Machine Files.

After upgrading vCenter this functionality is no longer enabled by default. Please perform the following steps to enable rename of files upon successful Storage vMotion.

  1. Log into the vSphere Client as an Administrator.
  2. Click Administration > vCenter Server Settings.
  3. Click Advanced Settings.
  4. Add this advanced parameter Key:
    provisioning.relocate.enableRename
  5. Set the value to: true
  6. Click Add.
  7. Click OK.
  8. Restart the VMware VirtualCenter Server service for the changes to take effect.

HA Error: Datastore Heartbeat is less than 2

If you are configuring a cluster with less than 2 datastores, you will receive an HA warning “The number of heartbeat datastores for host is 1, which is less than required: 2″ You can add an option to the HA Advanced Options to supress this warning.
  1. Log in to vCenter Server.
  2. Right-click the cluster and click Edit Settings.
  3. Click vSphere HA > Advanced Options.
  4. Under Option, add an entry for das.ignoreInsufficientHbDatastore.
  5. Under Value, type true.
  6. Click Cluster Features.
  7. De-select Turn on vSphere HA and click OK.
  8. Wait for all the hosts in the cluster to deconfigure HA, then right-click the cluster and click Edit Settings.
  9. Click Cluster Features.
  10. Click Turn on vSphere HA.
  11. Click OK.