2010-01-31

New Releases from VMware

Workstation 7.0.1 - Release Notes

What's New

Workstation 7.0.1 is a maintenance release that resolves some known issues. This release of VMware Workstation adds the following new support:

New Support for 32-Bit and 64-Bit Operating Systems

This release provides support for the following host and guest operating systems:

    Operating System
    Host and Guest Support
    Windows 2008 R2 Host and guest
    Windows Vista SP2 Host and guest
    Ubuntu 9.10 Host and guest
    RHEL 5.4 Host and guest
    CentOS 5.4 Guest
    Oracle Enterprise Linux 5.4 Guest

     

vCenter Server 2.5 Update 6 - Release Notes

What's New

Guest Operating Systems Customization Improvements

Customization support for the following guest operating systems has been added in this release:
For more complete information about supported guests included in this release, see the VMware Compatibility Guide.

  • Windows 7 Enterprise (32-bit and 64-bit)
  • Windows 7 Ultimate (32-bit and 64-bit)
  • Windows 7 Professional (32-bit and 64-bit)
  • Windows 7 Home Premium (32-bit and 64-bit)
  • Windows Server 2008 R2 Standard Edition (64-bit)
  • Windows Server 2008 R2 Enterprise Edition (64-bit)
  • Windows Server 2008 R2 Datacenter Edition (64-bit)
  • Windows Server 2008 R2 Web Server (64-bit)

Support for Firefox 3.x Browsers with VirtualCenter Web  Access

This release adds support for Firefox 3.x browsers with VirtualCenter Web Access. Firefox 3.x is not a supported browser for ESX Server 3.5 Update 5 Web Access with this release.

LifeCycle Manager 1.1 - Release Notes

What's New

VMware vCenter Lifecycle Manager (LCM) 1.1 release enhances the performance, robustness, and scalability of LCM and resolves a number of known issues.

The LCM 1.1 release runs on VMware vCenter Orchestrator 4.0.1. To run LCM 1.1, you must install the version of Orchestrator (4.0.1 Build 4502) that accompanies the LCM 1.1 download. See the vCenter Lifecycle Manager 1.1 Installation and Configuration Guide for installation instructions.

2010-01-29

Disabling Web Services in ESXi

Duncan posted this one this evening.

So to add to his post there is a way to "hide" the web service at least front page

in ESXi the configuration file that is responsible for all this is /etc/vmware/hostd/proxy.xml

<ConfigRoot>
  <EndpointList>
    <_length>10</_length>
    <_type>vim.ProxyService.EndpointSpec[]</_type>
    <e id="0">
      <_type>vim.ProxyService.LocalServiceSpec</_type>
      <accessMode>httpsWithRedirect</accessMode>
      <port>8309</port>
      <serverNamespace>/</serverNamespace>
    </e>
    <e id="1">
      <_type>vim.ProxyService.LocalServiceSpec</_type>
      <accessMode>httpsWithRedirect</accessMode>
      <port>8307</port>
      <serverNamespace>/sdk</serverNamespace>
    </e>
    <e id="2">
      <_type>vim.ProxyService.LocalServiceSpec</_type>
      <accessMode>httpsWithRedirect</accessMode>
      <port>8308</port>
      <serverNamespace>/ui</serverNamespace>
    </e>
    <e id="3">
      <_type>vim.ProxyService.NamedPipeServiceSpec</_type>
      <accessMode>httpsOnly</accessMode>
      <pipeName>/var/run/vmware/proxy-vpxa</pipeName>
      <serverNamespace>/vpxa</serverNamespace>
    </e>
    <e id="4">
      <_type>vim.ProxyService.NamedPipeServiceSpec</_type>
      <accessMode>httpsWithRedirect</accessMode>
      <pipeName>/var/run/vmware/proxy-mob</pipeName>
      <serverNamespace>/mob</serverNamespace>
    </e>
    <e id="5">
      <_type>vim.ProxyService.LocalServiceSpec</_type>
      <!-- Use this mode for "secure" deployment -->
      <accessMode>httpsWithRedirect</accessMode>
      <!-- Use this mode for "insecure" deployment -->
      <!-- <accessMode>httpAndHttps</accessMode> -->
      <port>8889</port>
      <serverNamespace>/wsman</serverNamespace>
    </e>
    <!-- Needed because old versions of the VI client access
         the clients.xml file over Http for upgrade -->
    <e id="6">
      <_type>vim.ProxyService.LocalServiceSpec</_type>
      <accessMode>httpAndHttps</accessMode>
      <port>8309</port>
      <serverNamespace>/client/clients.xml</serverNamespace>
    </e>
     <e id="7">
      <_type>vim.ProxyService.NamedPipeTunnelSpec</_type>
      <serverNamespace>/sdkTunnel</serverNamespace>
      <accessMode>httpOnly</accessMode>
      <pipeName>/var/run/vmware/proxy-sdk-tunnel</pipeName>
     </e>
    <e id="8">
      <_type>vim.ProxyService.LocalServiceSpec</_type>
      <accessMode>httpAndHttps</accessMode>
      <port>12001</port>
      <serverNamespace>/ha-nfc</serverNamespace>
    </e>
    <e id="9">
      <_type>vim.ProxyService.LocalServiceSpec</_type>
      <accessMode>httpAndHttps</accessMode>
      <port>12000</port>
      <serverNamespace>/nfc</serverNamespace>
    </e>
  </EndpointList>
</ConfigRoot>

The part we are interested in is this

    <e id="0">
      <_type>vim.ProxyService.LocalServiceSpec</_type>
      <accessMode>httpsWithRedirect</accessMode>
      <port>8309</port>
      <serverNamespace>/</serverNamespace>
    </e>

In order to mask the web page all that you need to do is change the port number in the config file and this will lead you to blank page

    <e id="0">
      <_type>vim.ProxyService.LocalServiceSpec</_type>
      <accessMode>httpsWithRedirect</accessMode>
      <port>8499</port>
      <serverNamespace>/</serverNamespace>
    </e>

<!--e id="4">
      <_type>vim.ProxyService.NamedPipeServiceSpec</_type>
      <accessMode>httpsWithRedirect</accessMode>
      <pipeName>/var/run/vmware/proxy-mob</pipeName>
      <serverNamespace>/mob</serverNamespace>
    </e-->

<e id="6">
      <_type>vim.ProxyService.LocalServiceSpec</_type>
      <accessMode>httpAndHttps</accessMode>
      <port>8399</port>
      <serverNamespace>/client/clients.xml</serverNamespace>
    </e>



The same way you could mask any of the other services you would like (mob etc..)

Restart the services on the Host with

/sbin/services.sh restart

Before

Main Page xml

client mob

And after

Main Page xml VI client mob

Update: William Lam also posted a 3rd method that did not need going into the unsupported Dropbear console. Well worth a read!!

2010-01-28

VMFS or NFS

We are outgrowing our current storage capabilities, and virtualization is one of main "customers" that is causing this.

So we are now looking for a 2nd storage that will enable us to continue on our journey forward.

I am a great fan of NFS for usage as a datastore for ESX. There are numerous reasons:

  • Backups can be done on the storage level with little or no impact on the Host.
  • In our specific environment, the backup speed we are getting with NDMP are excellent.
  • The ability to mount the file systems elsewhere is extremely beneficial

This is just to name a few.

But NFS has its downsides. ESX does support NFS as your storage platform, but I do not think that VMware are completely "gung-ho" about using NFS as storage.

I do think that the future will be be more in VMFS - it is a proprietary File System that is VMware's. they know it inside out, and have been tweaking it more and more over the years, to provide better performance, to be more stable and so on… NFS on the other hand is not something that VMware will have any much of a say in how to tweak or improve the protocol or its performance.

A small example. Disk metrics. How many of us know how to measure disk metrics for NFS datastores, in the vSphere client? Metrics Per host? Metrics per VM? Same question I can ask about the metrics in ESXTOP. They are not there. Disk metrics are for VMFS volumes only, which means iSCSI / SAN.

True you can get the metrics out of vscsistats but it is not an intuitive tool, and not the easiest to figure out. What you will get from the GUI is network throughput for the whole VMkernel but you will not be able to tell which VM is using the disk throughput.

From performance papers that VMware have published, performance of FC is always the best on all counts, NFS and iSCSI are almost the same.

So which to go for? The answer for that one I think would be go for tiers.

Not all your dev and test machines will not need the speed and redundancy that your will get from multiple HBA's, on your array that has a gazillion SAS 15,000 RPM drives. They most probably will be able to get by with a lot less than that.

I have learned a lot of the past few weeks regarding the storage planning and what has to be taken into account. The more I learn, the more I come to realization (and I am trying to teach others)

SIZE IS NOT EVERYTHING!

Ok maybe a bit sneaky of me, let me rephrase - the amount of TB is not the most important thing, the important thing - is can your storage design provide the amount of IO that your Virtual Machines will need.

Seeing that we will be going for more critical Apps on our Virtual Infrastructure - the more we will be needing faster disks, and ways to get to them, it looks like SAN for me.

Now to solve the small problem of how to backup all of these VM's properly :)

2010-01-21

Adding ESXi as a standard Operating System

Lately I have been asked more and more to install an ESXi system on a whitebox. Why you may ask - because users (we are a R&D company) are asking to have a box with multiple operating systems with all kinds of configurations for testing purposes.

Now of course the ideal would be to say, "Sure, no problem! Let me deploy a VM for you!" But seeing that the infrastructure that our ESX farm resides on (Servers, Network, Storage) is a hell of a lot more expensive than $700 PC. And in that PC you can stuff a 500GB disk, 8gb RAM, and a Dual (sometimes Quad) Core Processor. That is more than enough to run 4-5 VM's on it without any issue.

Not every OS, needs to run on the Central infrastructure! I mean the cost involved regarding maintenance, licensing backup etc. etc. do not justify having every single OS on the main vSphere Farm. I know some of you will disagree, but that is my opinion. Each company has its policies regarding what is backed up, how often, and under what SLA things need to be maintained.

Now seeing that more and more of my users using VMware products in their daily tasks, be it VMware Player, Workstation, Server, and as of late the vSphere infrastructure client - they are familiar with the environment, they have a decent foundation of what virtualization does, and how it works.

So why add ESXi? Today deployed images that we use are including almost every version of Windows and multiple flavors of Linux (RH, Centos etc.)

We already have VMware images for all of the above OS's - way long ago. We saw this coming so we prepared the VM's of all the OS's.

Most of the Brand-Name PC's (IBM/Dell/HP) will run ESX4i out of the box without too much customization, and if the customization was needed, the hours invested were well worth it

Taking all of the above into account we found that building a custom CD of ESXi with some of our own additions, would provide a good solution to the growing need for a multiple OS computer.

The points that were covered:

  • The License is free!
  • Installation of ESXi takes less than 7 minutes
  • These VM Operating Systems did not need peripheral devices (sound/USB)
  • Images were optimized (size/performance)
  • We added a Administrative user to each ESXi installation (customized in the image) for support
  • All ESXi deployments were added to a monitoring system (Veeam Monitor Free Edition)

True there are limitations to the solution, and it will need to evolve. One of the things that I am actively looking at is the PXE deployment of ESXi.

In past to give a user a multiple OS machine - would take more than 4 hours, including deploying Main OS, installing VMware software (player/workstation/server) and then adding the VM image.

Today, deployment of ESXi and multiple images - is done in less than half of that time.

I would like to hear your thoughts and ideas on this one…

2010-01-20

Bug in SNMP traps sent from vCenter

I encountered this today.

I was trying to configure the alarm for datastore usage.

Relatively simple operation - there is even a built in alarm for this in vCenter

image

So I configured the alarm to fire to test and to send me a notification email and an SNMP trap

image

I received the email

Target: ESX2_NFS
Previous Status: Gray
New Status: Red
Alarm Definition:
([Yellow metric Is above 75%; Red metric Is above 85%])
Current values for metric/state:
Metric Storage Space Actually Used = 86%
Description:
Alarm 'Datastore usage on disk' on ESX2_NFS changed from Gray to Red

and the SNMP trap as well

SNMPv2-MIB::snmpTrapOID.0 SNMPv2-SMI::enterprises.6876.4.3.0.201
SNMPv2-SMI::enterprises.6876.4.3.301 "host"
SNMPv2-SMI::enterprises.6876.4.3.302 ""
SNMPv2-SMI::enterprises.6876.4.3.303 ""
SNMPv2-SMI::enterprises.6876.4.3.304 "Gray"
SNMPv2-SMI::enterprises.6876.4.3.305 "Red"
SNMPv2-SMI::enterprises.6876.4.3.306 "Datastore usage on disk - Metric Storage Space Actually Used = 86%"
SNMP-COMMUNITY-MIB::snmpTrapAddress.0 10.xx.xx.63
SNMP-COMMUNITY-MIB::snmpTrapCommunity.0 "public"

The trap gave all the data except one small but important detail - THE NAME OF THE DATASTORE!

After opening a call with VMware today the response I received:

The symptom you are explaining is a know issue and has been resolved by engineering.

This fix will be issued in VC4.0 update 2. There is no release date for this update as of yet, so I would suggest keeping update to date with the VMware website product downloads as it will be released there.

So if you are not getting the correct data from your SNMP traps - this could be the reason.

vCenter PowerCLI Migration Script

As I promised in a previous post I wanted to migrate from a vCenter to whole new machine

Process was:

  • Export folders
  • Export VM locations in Folders
  • Export Permissions
  • Export Custom Attributes
  • Create Folders on the new vCenter
  • Disable DRS/HA
  • Remove ESX hosts from Source vCenter and add to Destination vCenter
  • Enable DRS/HA again
  • Move all vm’s to correct folders
  • Apply the permissions back
  • Apply custom attributes and notes

Here is the script

   1: #load Vmware Module
   2: Add-PSSnapin VMware.VimAutomation.Core
   3:  
   4: #Change to multi-mode vcenter management
   5: Set-PowerCLIConfiguration -DefaultVIServerMode Multiple -Confirm:$false
   6:  
   7: #Get vCenter Server Names
   8: $sourceVI = Read-Host "Please enter the name of the source Server"; 
   9: $destVI = Read-Host "Please enter the name of the destination Server"
  10:  
  11: $creds = get-credential
  12:  
  13: $datacenter = Read-Host "Please give the name of the datacenter you would like to run against"
  14:  
  15:  
  16: #Connect to Source vCenter
  17: connect-viserver -server $sourceVI -credential $creds
  18: connect-viserver -server $destVI -credential $creds -NotDefault:$false
  19:  
  20:  
  21: filter Get-FolderPath {
  22:     $_ | Get-View | % {
  23:         $row = "" | select Name, Path
  24:         $row.Name = $_.Name
  25:  
  26:         $current = Get-View $_.Parent
  27:         $path = $_.Name
  28:         do {
  29:             $parent = $current
  30:             if($parent.Name -ne "vm"){$path = $parent.Name + "\" + $path}
  31:             $current = Get-View $current.Parent
  32:         } while ($current.Parent -ne $null)
  33:         $row.Path = $path
  34:         $row
  35:     }
  36: }
  37:  
  38: ## Export all folders
  39: $report = @()
  40: $report = get-datacenter $datacenter -Server $sourceVI| Get-folder vm | get-folder | Get-Folderpath
  41:         ##Replace the top level with vm
  42:         foreach ($line in $report) {
  43:         $line.Path = ($line.Path).Replace($datacenter + "\","vm\")
  44:         }
  45: $report | Export-Csv "c:\Folders-with-FolderPath-$($datacenter).csv" -NoTypeInformation
  46:  
  47: ##Export all VM locations
  48: $report = @()
  49: $report = get-datacenter $datacenter -Server $sourceVI| get-vm | Get-Folderpath
  50:  
  51: $report | Export-Csv "c:\vms-with-FolderPath-$($datacenter).csv" -NoTypeInformation
  52:  
  53:  
  54: #Get the Permissions  
  55:  
  56: $folderperms = get-datacenter $datacenter -Server $sourceVI | Get-Folder | Get-VIPermission
  57: $vmperms = Get-Datacenter $datacenter -Server $sourceVI | get-vm | Get-VIPermission
  58:  
  59: $permissions = get-datacenter $datacenter -Server $sourceVI | Get-VIpermission
  60:         
  61:         $report = @()
  62:               foreach($perm in $permissions){
  63:                 $row = "" | select EntityId, FolderName, Role, Principal, IsGroup, Propagate
  64:                 $row.EntityId = $perm.EntityId
  65:                 $Foldername = (Get-View -id $perm.EntityId).Name
  66:                 $row.FolderName = $foldername
  67:                 $row.Principal = $perm.Principal
  68:                 $row.Role = $perm.Role
  69:                 $row.IsGroup = $perm.IsGroup
  70:                 $row.Propagate = $perm.Propagate
  71:                 $report += $row
  72:             }
  73:     
  74:             foreach($perm in $folderperms){
  75:                 $row = "" | select EntityId, FolderName, Role, Principal, IsGroup, Propagate
  76:                 $row.EntityId = $perm.EntityId
  77:                 $Foldername = (Get-View -id $perm.EntityId).Name
  78:                 $row.FolderName = $foldername
  79:                 $row.Principal = $perm.Principal
  80:                 $row.Role = $perm.Role
  81:                 $row.IsGroup = $perm.IsGroup
  82:                 $row.Propagate = $perm.Propagate
  83:                 $report += $row
  84:             }
  85:  
  86:             foreach($perm in $vmperms){
  87:                 $row = "" | select EntityId, FolderName, Role, Principal, IsGroup, Propagate
  88:                 $row.EntityId = $perm.EntityId
  89:                 $Foldername = (Get-View -id $perm.EntityId).Name
  90:                 $row.FolderName = $foldername
  91:                 $row.Principal = $perm.Principal
  92:                 $row.Role = $perm.Role
  93:                 $row.IsGroup = $perm.IsGroup
  94:                 $row.Propagate = $perm.Propagate
  95:                 $report += $row
  96:             }
  97:  
  98:         $report | export-csv "c:\perms-$($datacenter).csv" -NoTypeInformation
  99:  
 100: ##Export VM Custom Attributes and notes
 101:  
 102: $vmlist = get-datacenter $datacenter -Server $sourceVI| get-vm 
 103: $Report =@()
 104:     foreach ($vm in $vmlist) {
 105:         $row = "" | Select Name, Notes, Key, Value, Key1, Value1
 106:         $row.name = $vm.Name
 107:         $row.Notes = $vm | select -ExpandProperty Notes
 108:         $customattribs = $vm | select -ExpandProperty CustomFields
 109:         $row.Key = $customattribs[0].Key
 110:         $row.Value = $customattribs[0].value
 111:         $row.Key1 = $customattribs[1].Key
 112:         $row.Value1 = $customattribs[1].value    
 113:         $Report += $row
 114:     }
 115:  
 116: $report | Export-Csv "c:\vms-with-notes-and-attributes-$($datacenter).csv" -NoTypeInformation
 117:    
 118:     
 119: ##Disconnect-VIServer -Server $sourceVI -force -confirm:$false
 120:  
 121:  
 122: #connect to Destination Server
 123: ##connect-viserver -server $destVI -credential $creds -confirm:$false
 124:  
 125:  
 126: ##IMPORT FOLDERS
 127: $vmfolder = Import-Csv "c:\Folders-with-FolderPath-$($datacenter).csv" | Sort-Object -Property Path
 128:  
 129: foreach($folder in $VMfolder){
 130:     $key = @()
 131:     $key =  ($folder.Path -split "\\")[-2]
 132:     if ($key -eq "vm") {
 133:         get-datacenter $datacenter -Server $destVI | get-folder vm | New-Folder -Name $folder.Name
 134:         } else {
 135:         get-datacenter $datacenter -Server $destVI | get-folder vm | get-folder $key | New-Folder -Name $folder.Name 
 136:         }
 137: }
 138:  
 139: ##ESX host migration
 140:  
 141: #Switch off HA
 142: Get-Cluster $datacenter -Server $sourceVI  | Set-Cluster -HAEnabled:$false -DrsEnabled:$false -Confirm:$false
 143:  
 144: #Remove ESX hosts from old vcenter
 145: $Myvmhosts = get-datacenter $datacenter -Server $sourceVI | Get-VMHost 
 146: foreach ($line in $Myvmhosts) {
 147: Get-vmhost -Server $sourceVI -Name $line.Name | Set-VMHost -State "Disconnected" -Confirm:$false
 148: Get-VMHost -server $sourceVI -Name $line.Name | Remove-VMHost -Confirm:$false
 149: }
 150: #add ESX hosts into new vcenter
 151: foreach ($line in $Myvmhosts) {
 152:     Add-VMHost -Name $line.name  -Location (Get-Datacenter $datacenter -server $destVI) -user root -Password trunk@1 -Force
 153: }
 154:  
 155: #Turn on HA and DRS on 
 156: Set-Cluster -Server $destVI Cluster1 -DrsEnabled:$true -HAEnabled:$true -Confirm:$false
 157:  
 158: Disconnect-VIServer $sourceVI -Confirm:$false
 159:  
 160: ##workaround for non working new-vipermissions
 161:            
 162: function New-VIAccount($principal) {
 163:     $flags = [System.Reflection.BindingFlags]::NonPublic -bor [System.Reflection.BindingFlags]::Public -bor [System.Reflection.BindingFlags]::DeclaredOnly -bor [System.Reflection.BindingFlags]::Instance
 164:     
 165:     $method = $defaultviserver.GetType().GetMethods($flags) | where { $_.Name -eq "VMware.VimAutomation.Types.VIObjectCore.get_Client" }
 166:     $client = $method.Invoke($global:DefaultVIServer, $null)
 167:     Write-Output (New-Object VMware.VimAutomation.Client20.PermissionManagement.VCUserAccountImpl -ArgumentList $principal, "", $client)
 168: }
 169:  
 170: ##move the vm's to correct location
 171: $VMfolder = @()
 172: $VMfolder = import-csv "c:\VMs-with-FolderPath-$($datacenter).csv" | Sort-Object -Property Path
 173: foreach($guest in $VMfolder){
 174:     $key = @()
 175:     $key =  Split-Path $guest.Path | split-path -leaf
 176:     Move-VM (get-datacenter $datacenter -Server $destVI  | Get-VM $guest.Name) -Destination (get-datacenter $datacenter -Server $destVI | Get-folder $key) 
 177: }
 178:  
 179:  
 180: ##Import VM Custom Attributes and Notes
 181: $NewAttribs = Import-Csv "C:\vms-with-notes-and-attributes-$($datacenter).csv"
 182:  
 183:     foreach ($line in $NewAttribs) {
 184:         set-vm -vm $line.Name -Description $line.Notes -Confirm:$false
 185:         Set-CustomField -Entity (get-vm $line.Name) -Name $line.Key -Value $line.Value -confirm:$false
 186:         Set-CustomField -Entity (get-vm $line.Name) -Name $line.Key1 -Value $line.Value1 -confirm:$false
 187:     
 188:     }
 189:     
 190:  
 191: ##Import Permissions
 192: $permissions = @()
 193: $permissions = Import-Csv "c:\perms-$($datacenter).csv"
 194:  
 195: foreach ($perm in $permissions) {
 196:     $entity = ""
 197:     $entity = New-Object VMware.Vim.ManagedObjectReference
 198:     
 199:     switch -wildcard ($perm.EntityId)
 200:         {
 201:              Folder* { 
 202:              $entity.type = "Folder"
 203:              $entity.value = ((get-datacenter $datacenter | get-folder $perm.Foldername).ID).Trimstart("Folder-")
 204:              }
 205:              VirtualMachine* { 
 206:              $entity.Type = "VirtualMachine"
 207:              $entity.value = ((get-datacenter $datacenter | Get-vm $perm.Foldername).Id).Trimstart("VirtualMachine-")             
 208:             }
 209:         }
 210:     $setperm = New-Object VMware.Vim.Permission
 211:     $setperm.principal = $perm.Principal
 212:         if ($perm.isgroup -eq "True") {
 213:             $setperm.group = $true
 214:             } else {
 215:             $setperm.group = $false
 216:             }
 217:     $setperm.roleId = (Get-virole $perm.Role).id
 218:     if ($perm.propagate -eq "True") {
 219:             $setperm.propagate = $true
 220:             } else {
 221:             $setperm.propagate = $false
 222:             }
 223:                 
 224:     $doactual = Get-View -Id 'AuthorizationManager-AuthorizationManager'
 225:     $doactual.SetEntityPermissions($entity, $setperm)
 226: }
 227:     
 228: ##Error Checking
 229: ################
 230:  
 231: ##Gather all info for New Vcenter        
 232: ##Export all folders
 233: $report = @()
 234: $report = Get-folder vm -server $destVI | get-folder | Get-Folderpath
 235:         ##Replace the top level with vm
 236:         foreach ($line in $report) {
 237:         $line.Path = ($line.Path).Replace("DC1\","vm\")
 238:         }
 239: $report | Export-Csv "c:\Folders-with-FolderPath_dest.csv" -NoTypeInformation
 240:  
 241: ##Export all VM locations
 242: $report = @()
 243: $report = get-vm -server $destVI | Get-Folderpath
 244:  
 245: $report | Export-Csv "c:\vms-with-FolderPath_dest.csv" -NoTypeInformation
 246:  
 247:  
 248: #Get the Permissions    
 249: $permissions = Get-VIpermission -Server $destVI
 250:         
 251:         $report = @()
 252:               foreach($perm in $permissions){
 253:                 $row = "" | select EntityId, FolderName, Role, Principal, IsGroup, Propopgate
 254:                 $row.EntityId = $perm.EntityId
 255:                 $Foldername = (Get-View -id $perm.EntityId).Name
 256:                 $row.FolderName = $foldername
 257:                 $row.Principal = $perm.Principal
 258:                 $row.Role = $perm.Role
 259:                 $report += $row
 260:             }
 261:         $report | export-csv "c:\perms_dest.csv" -NoTypeInformation
 262:  
 263: ##Export VM Custom Attributes and notes
 264:  
 265: $vmlist = get-vm -Server $destVI
 266: $Report =@()
 267:     foreach ($vm in $vmlist) {
 268:         $row = "" | Select Name, Notes, Key, Value, Key1, Value1
 269:         $row.name = $vm.Name
 270:         $row.Notes = $vm | select -ExpandProperty Notes
 271:         $customattribs = $vm | select -ExpandProperty CustomFields
 272:         $row.Key = $customattribs[0].Key
 273:         $row.Value = $customattribs[0].value
 274:         $row.Key1 = $customattribs[1].Key
 275:         $row.Value1 = $customattribs[1].value    
 276:         $Report += $row
 277:     }
 278:  
 279: $report | Export-Csv "c:\vms-with-notes-and attributes_dest.csv" -NoTypeInformation
 280:  
 281: ##compare the source and destination - this part is not yet finished
 282: write-output "Folder-paths"
 283: Compare-Object -ReferenceObject (import-csv C:\vms-with-FolderPath.csv) (import-csv C:\vms-with-FolderPath_dest.csv) -IncludeEqual
 284:  
 285:  
 286: write-output "Notes & Attributes"
 287: Compare-Object -ReferenceObject (import-csv "C:\vms-with-notes-and attributes.csv") (import-csv "C:\vms-with-notes-and attributes_dest.csv") -IncludeEqual
 288:  
 289: write-output "Permissions"
 290: Compare-Object -ReferenceObject (import-csv C:\perms.csv | select * -ExcludeProperty EntityId) (import-csv C:\perms_dest.csv | select * -ExcludeProperty EntityId) -IncludeEqual
 291: Disconnect-VIServer -Server $destVI -Force -confirm:$false
 292:     

The script is commented pretty well throughout the script, I will update with more and a walkthrough of the script later.

Give me a shout if you have any questions with the script

The script can also be downloaded below

Save