Clearing out missing pool desktop

if a desktop goes missing after a recompose, newer verions of Horizon have a tool to help out so you don’t have to go into the ADAM database and manually edit things.

go into the horizon server and the following directory. and follow the steps

cd c:\Program Files\VMware\VMware View\Server\tools\bin
viewdbchk.cmd –scanMachines –limit 100

You will have to enter the view user password as well as the composer password.
this will ask to disable the pool, say yes (make sure you have a maintenance window) and then it will ask to re enable once done.

ntp powershell (semi)

w32tm.exe /config /manualpeerlist:”0.us.pool.ntp.org 1.us.pool.ntp.org 2.us.pool.ntp.org 3.us.pool.ntp.org” /syncfromflags:manual /reliable:YES /update
w32tm.exe /config /update
Restart-Service w32time
w32tm /query /configuration | Select-String ‘type’
w32tm /query /peers

RDM – find assisgned and make sure assigned as Perennially Reserved

<#
.SYNOPSIS
Alan Harrington, copy and excute sections at a time to make sure runs okay
.DESCRIPTION
collects all rdms that are ASSIGNED to a vm and makes them as Perenially Reserved, if the rdm is not configured on the vm then it won’t set it.
.PARAMETER <paramName>
<Description of script parameter>
.EXAMPLE
<An example of using the script>
#>
$cluster = “vnesxcomp099_rdms”

#Get-cluster $cluster | get-vm | sort name | Get-HardDisk -DiskType “RawPhysical”,”RawVirtual” | Select Parent,ScsiCanonicalName
$rdmsattachedinclu = Get-cluster $cluster | get-vm | sort name | Get-HardDisk -DiskType “RawPhysical”,”RawVirtual” | Select Parent,ScsiCanonicalName
$rdmsscsinaa = $rdmsattachedinclu | select ScsiCanonicalName

#full list, sorted, unique
[array]$temp = $null
foreach ($rdmsscsi in $rdmsscsinaa){
$temp2 = $rdmsscsi.ScsiCanonicalName
$temp = $temp + $temp2}
foreach ($i in $temp) {
[string]$i = $i
$temp[$temp.IndexOf($i)] = $i.SubString(4)}
$rdmlist = $temp | sort | select -Unique
$rdmlist = $rdmlist | ForEach-Object {“naa.$_”}
#now that list is converted back to naa. time to set it

$vmhs = get-cluster $cluster | get-vmhost | sort name
$vmhsesxcli = $vmhs | get-esxcli
foreach($esxcli in $vmhsesxcli) {
# And for each RDM Disk
foreach($RDM in $rdmlist) {
# Set the configuration to “PereniallyReserved”.
# setconfig method: void setconfig(boolean detached, string device, boolean perenniallyreserved)
$esxcli.storage.core.device.setconfig($false,$RDM,$true)
$esxcli.storage.core.device.list($rdm)
}
}

checking a cluster to see about MM (scsi bus sharing)

$clname = “HOSA-P-FARM06-ProSuites”
$clustertocheck = Get-Cluster $clname
Write-Host “Checking $clname” -ForegroundColor cyan
$vmhs = $clustertocheck | Get-VMHost | sort name
foreach ($vmh in $vmhs){
$scsishared = $null
$vms = $vmh | Get-VM | sort name
#$hostver = $vmh | get-View -Property Name,Config.Product | Format-Table Name, @{L=’Version’;E={$_.Config.Product.FullName}}
$scsishared = $vms |Get-ScsiController | Where-Object {$_.BusSharingMode -eq ‘Physical’ -or $_.BusSharingMode -eq ‘Virtual’}
if (!$scsishared){
if ($vmh.ConnectionState -eq “Maintenance”){write-host “$vmh is in MM already, host is $vmh.Version”}
if ($vmh.ConnectionState -ne “Maintenance”){Write-host “$vmh is okay, no shared SCSIBUS vms” -foregroundcolor yellow}
}
if ($scsishared) { Write-Host “$vmh is NOT okay, SCSIBUS SHARED vms” -foregroundcolor red }
}

Migrating VDS port group vms to vss port groups

$face = Get-VirtualPortGroup  | sort name

$face | where {$_.vlanid -eq “344”}

 

 

$vdpg = “dvsportgroup”

Get-VDPortgroup  $vdpg | get-vm

$vmnics = Get-VDPortgroup  $vdpg | get-vm | Get-NetworkAdapter | where {$_.NetworkName -eq $vdpg}

$vmnics | Set-NetworkAdapter -NetworkName “vssporrtgroup” -WhatIf

vRA 6.2 to vRA 6.2.1 Upgrade How to.

There isn’t any documentation that I can find for the upgrade notes for 6.2.1 vRA yet, however that didn’t stop me from upgrading our dev environment to check it out!

UPDATE: 3/17/2015, our VMRC proxy wasn’t working, there is a tiny mention of port 8444 here . don’t forget to add a virtual pool and members for port 8444 behind the load balancer! (we are using F5)

Suppose to follow the documentation for 6.2, but there are a few things that need to noted.

you finally don’t have to upgrade .NET, which is amazing.

snapshot everything!!! and don’t forget to back up your database!
Get-ResourcePool vcac03* | Get-VM | New-Snapshot -Name “pre-6.2.1” -Memory:$false -Quiesce:$false

got to love me some powercli 🙂

First, make sure your dim status is showing up as excuting zero work loads, other wise database upgrade issues will happen.

if it’s not zero wait a few mins and check again, it will be!

after that stop the vcac services on the following boxes in this order:
Proxy
DEMs
MGR – orchestrators
MGR – service
next attach the update repo iso (VMware-vCAC-Appliance-6.2.1.0-2553372-updaterepo.iso) it to the cd-rom drive, log into the first app box and go under update – settings – choose cd -rom, then go back to status and check for updates.

after that click install and wait 15 mins or so, stay on that page and DON’T do anything. it will display below

after that reboot and wait for 15 mins and you’ll have 29 services. (note the console proxy is not registered yet in this picture)

download the dbupgrade script and run it against the sql database, shouldn’t take long at all… (few seconds) you can see the schema has in fact been updated so make sure this is done!

when that is done hop onto the iaas box and download the iaas installer from the 6.2.1 web app box

(note: run the installer on the iaas box…. thanks Jonathon…)

up next go down the line in order below

mgr service
mgr orchestrators
DEM workers
Proxies

after that you are done!! congratulations!

move on the vco boxes and call it a day.
power them off and snap them then power them back on!

Get-ResourcePool vcac03* | Get-VM | New-Snapshot -Name “6.2.1-done” -Memory:$false -Quiesce:$false

curious thing I noticed that was the build on the webpage is Build 6.2.1-2543390, however for the app it is Appliance Version: 6.2.1.0 Build 2553372

quick way to upgrade hosts

quick way to upgrade a host with no vCenter (or when it’s down, like a home lab all in one)

esxcli network firewall ruleset set -e true -r httpClient
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-20141204001-standard