Using PowerCLi with vCloud

I’ve been looking at using PowerCLi with vCloud. I use it extensively with vSphere, so how much different can it be? The answer is subtly different. The methods of connecting are similar, but the commands used are reassuringly familiar!

First of all you need to connect to a vCloud Director Server;

Run Connect-CIServer with the server name and valid credentials.

Connect-CIServer -Server cloud.example.com -User ‘MyAdministratorUser’ -Password ‘MyPassword’

 

To create a vApp from a template

Retrieve the organization vDC to which you want to add the new vApp.

$myOrgVdc = Get-OrgVdc -Name ‘MyOrgVdc’

Retrieve the source vApp template for your new vApp.

$myVAppTemplate = Get-CIVAppTemplate -Name ‘MyVAppTemplate’

Create your new vApp.

$myVApp = New-CIVApp -Name ‘MyVApp’ -VAppTemplate $myVAppTemplate -OrgVdc $myOrgVDC

By default, the vApp is powered off.

Renew the runtime lease for the new vApp and set it to 12 hours.

Set-CIVApp -VApp $myVApp -RuntimeLease “12:0:0″ –RenewLease

To set leases, you can use the days.hours:minutes:seconds syntax.

Start the new vApp.

Start-VApp -VApp $myVApp

 

Power on all virtual machines in all vApps with names starting with MyVApp.

Get-CIVApp -Name ‘MyVApp*’ | Start-CIVApp

Suspend all virtual machines in all vApps with names starting with YourVApp.

Get-CIVapp -Name ‘YourVApp*’ | Suspend-CIVApp

Power off all virtual machines in the vApp named MyVApp1.

Get-CIVapp -Name ‘MyVApp1′ | Stop-CIVApp

Shut down the guest operating systems of all virtual machines in the vApp named MyVApp2.

Get-CIVapp -Name ‘MyVApp2′ | Stop-CIVAppGuest

Restart the guest operating systems of all virtual machines in the vApp named MyVApp3.

Get-CIVapp -Name ‘MyVApp3′ | Restart-CIVAppGuest

Reset all virtual machines in the vApp.

Get-CIVapp -Name ‘MyVApp4′ | Restart-CIVApp

 

Retrieve all virtual machines with names starting with MyVM and power them on.

Get-CIVM -Name ‘MyVM*’ | Start-CIVM

Suspend all virtual machines with names starting with YourVM.

Get-CIVM -Name ‘YourVM*’ | Suspend-CIVM

Power off the virtual machine named MyVM1.

Get-CIVM -Name ‘MyVM1′ | Stop-CIVM

Shut down the guest operating system of the virtual machine named MyVM2.

Get-CIVM -Name ‘MyVM2′ | Stop-CIVMGuest

Restart the guest operating system of the virtual machine named MyVM3.

Get-CIVM -Name ‘MyVM3′ | Restart-CIVMGuest

Reset the nonresponsive virtual machine named MyVM4.

Get-CIVM -Name ‘MyVM4′ | Restart-CIVM

 

Playing around with the PowerCLi vCloud commands make administration of vCloud infrastructure a lot easier and quicker then via the standard GUI, especially if you already utilise PowerCLi for the administration of vSphere.

 

Be Sociable, Share!

{ 0 comments }

AT&T Synaptic Compute as a Service

A while ago I was asked by a client to evaluate AT&T’s cloud computing service, marketed as ‘AT&T Synaptic’. They utilise VMware’s vCloud Director, with their own customised interface, utilising the vCloud API programmable interface.

They offer the following;

  • Cloud Storage
  • Content Delivery Network
  • Deploy Servers
  • DNS Management
  • File Storage
  • Firewalls
  • Load Balancing
  • VPN Access

They offer two types of OS:

  • Windows
  • Linux

AT&T Synaptic Cloud

You also have the ability to create virtual data centres based in different geographical physical data centres, which given AT&T’s global reach, is a good thing for data centre resilience!

However there are some negative aspects to the actual implementation of this VMware vCloud Director platform. First of all, it’s version 1.5, which is just about obsolete, also, it’s installed onto a single SQL server instance, so it has a single point of failure in the entire infrastructure. Ideally, I’d be looking for multiple instances of the infrastructure elements, having the main database residing on a single node, with no actual clustering at the back end, makes me question the strategies of the cloud provider. In this case AT&T seem to have fallen short.

Single points of failure aside, there is a bigger issue at hand. The hand crafted interface is badly designed, hard to use and has obscure navigation. I had a meeting with the AT&T sales representatives about this lack of usability, getting one of their network techs, who hadn’t used their Synaptic Cloud before, to navigate their customised interface. After 15 minutes of him trying and failing to locate any virtual machines, they admitted that it needed further work…

Using VMware vCloud Director is a good strategy for offing tenanted cloud infrastructure. Implementing version 1.5 and creating their troublesome interface is not.

Be Sociable, Share!

{ 0 comments }

LiveDrive Cloud Based Backup

LiveDrive markets itself as ‘Cloud Storage for everyone’. It’s been going for 6 years now and I’ve been using them myself for around 5 years. From a small startup, it’s built up over 1 million customers and the growth of this cloud storage company is gathering pace all the time.

They offer online file editing and streaming of both music and movies. You can also directly stream movies and music through the web browser. If you have the data allowance, you can also use the mobile app to stream directly from LiveDrive onto your smart phone.

LiveDrive Cloud based backup

LiveDrive Cloud based backup

 

LiveDrive offers a briefcase facility, which allows you to place files into the briefcase and have those same files shared amongst multiple computers. A similar type of service to Dropbox, you can also share out files and folders, emailing the link to your intended recipients.

 

LiveDriveApps

 

If you’ve ever wanted to start your own cloud based backup service, you can sign up for a reseller account and be able to create an unlimited number of accounts, all for £39.95 per month. You can have your own brand, or utilise the LiveDrive brand or both.

I’ve been a user of LiveDrive for a long time and I’ve got nothing but praise for the quality service and the unlimited amount of storage I can have. My current usage stands at just over 3.5 TB and as I use this as my secondary, offsite backup method, as a compliment to my USB hard drive backups, it gives me peace of mind to know I’m safe with LiveDrive.

Be Sociable, Share!

{ 0 comments }

PowerCLi – Getting Virtual Machine Information

This is the fifth in a series of blog posts about getting information out of the vSphere environment in timely fashion. There are times when you need to get information from your vSphere infrastructure and put it into a spreadsheet. This customised script allows you to get further information that you need for the operations team to continue building out their Configuration Management Database (CMDB).

This script is really useful for getting detailed information about all of the virtual machines in your vSphere environment.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
 
<#
.SYNOPSIS
Retrieves info on Virtual Machines 
 
NB.
This script can be run against each vCenter Server on an individual basis or across multiple vCenter Servers.
 
.DESCRIPTION
Retrieves information on VMs'
 
.PARAMETER  None
 
.EXAMPLE
 
.EXAMPLE
Usage - .\CI-VMInventory.ps1 | Export-Csv c:\CI-VM-Inventory.csv –NoTypeInformation
 
.NOTES
Author: Graham F French
Date: 28/11/2013
Email: 
Twitter: @NakedCloudGuy
#>
 
 function Get-VMinventory {  
 function Get-RDMDisk {  
   [CmdletBinding()]  
   param (  
     [Parameter(Mandatory=$True)]  
     [string[]]$VMName  
     )  
         $RDMInfo = Get-VM -Name $VMName | Get-HardDisk -DiskType RawPhysical, RawVirtual  
         $Result = foreach ($RDM in $RDMInfo) {  
          "{0}/{1}/{2}/{3}"-f ($RDM.Name), ($RDM.DiskType),($RDM.Filename), ($RDM.ScsiCanonicalName)     
         }  
         $Result -join (", ")  
 }  
 function Get-vNicInfo {  
   [CmdletBinding()]  
   param (  
     [Parameter(Mandatory=$True)]  
     [string[]]$VMName  
     )  
         $vNicInfo = Get-VM -Name $VMName | Get-NetworkAdapter  
         $Result = foreach ($vNic in $VnicInfo) {  
           "{0}={1}"-f ($vnic.Name.split("")[2]), ($vNic.Type)  
         }  
         $Result -join (", ")  
 }  
 function Get-InternalHDD {  
   [CmdletBinding()]  
   param (  
     [Parameter(Mandatory=$True)]  
     [string[]]$VMName  
     )  
         $VMInfo = Get-VMGuest -VM $VMName # (get-vm $VMName).extensiondata  
         $InternalHDD = $VMInfo.ExtensionData.disk   
         $result = foreach ($vdisk in $InternalHDD) {  
           "{0}={1}GB/{2}GB"-f ($vdisk.DiskPath), ($vdisk.FreeSpace /1GB -as [int]),($vdisk.Capacity /1GB -as [int])  
         }  
         $result -join (", ")  
 }  
 foreach ($vm in (get-vm)) {  
     $props = @{'Name'=$vm.Name;  
           'IP Address'= $vm.Guest.IPAddress[0]; #$VM.ExtensionData.Summary.Guest.IpAddress  
           'PowerState'= $vm.PowerState;  
           'DNS Domain'= ($vm.ExtensionData.Guest.Hostname -split '\.')[1,2] -join '.';     
		   'Comments' = ($vm | Select-Object -ExpandProperty Notes); 
           'CPUs'= $vm.NumCpu;  
           'Memory (MB)'= ($vm.MemoryGB * 1024);  
           'Disks size (GB)'= $vm.ProvisionedSpaceGB -as [int];  
           'HDDs(GB)'= ($vm | get-harddisk | select-object -ExpandProperty CapacityGB) -join " + "            
           'Datastore'= (Get-Datastore -vm $vm) -split ", " -join ", ";  
           'Partition/Size' = Get-InternalHDD -VMName $vm.Name  
           'Real-OS'= $vm.guest.OSFullName;  
           'Attributes' = $VM.ExtensionData.summary.config.guestfullname;  
           'EsxiHost'= $vm.VMHost;  
           'vCenter Reference' = ($vm).ExtensionData.Client.ServiceUrl.Split('/')[2].trimend(":443")  
           'Hardware Version'= $vm.Version;  
           'Folder'= $vm.folder;  
           'MAC Address' = ($vm | Get-NetworkAdapter).MacAddress -join ", ";  
           'VMX' = $vm.ExtensionData.config.files.VMpathname;  
           'VMDK' = ($vm | Get-HardDisk).filename -join ", ";  
           'VMTools Status' = $vm.ExtensionData.Guest.ToolsStatus;  
           'VMTools Version' = $vm.ExtensionData.Guest.ToolsVersion;  
           'VMTools Version Status' = $vm.ExtensionData.Guest.ToolsVersionStatus;  
           'VMTools Running Status' = $vm.ExtensionData.Guest.ToolsRunningStatus;  
           'SnapShots' = ($vm | get-snapshot).count;  
           'Location' = $vm | Get-Datacenter;  
		   'Subcategory' = $VM | Get-Cluster;
           'vNic' = Get-VNICinfo -VMName $vm.name;  
           'PortGroup' = ($vm | Get-NetworkAdapter).NetworkName -join ", ";  
           'RDMs' = Get-RDMDisk -VMName $VM.name   
           }  
 
     $obj = New-Object -TypeName PSObject -Property $Props  
	  Write-Output $obj | select-object -Property 'Name', 'CPUs', 'Memory (MB)', 'Disks size (GB)', 'Attributes', 'DNS Domain', 'MAC Address', 'Subcategory', 'vCenter Reference', 'IP Address', 'Location', 'Comments'
 
   }  
 }  
 Get-VMinventory   
 
#

Here is the code in a text file format, rename it .ps1 instead of .txt in order to be able to run it.

CI-VMInventory.txt

In the example, you will notice that I use “–NoTypeInformation” at the end of the syntax, this removes the unnecessary type information being added into the CSV file.

Be Sociable, Share!

{ 0 comments }

PowerCLi – Getting Basic Datastore Info

This is the fourth in a series of blog posts about getting information out of the vSphere environment in timely fashion. There are times when you need to get information from your vSphere infrastructure and put it into a spreadsheet. This customised script allows you to get further information that you need for the operations team to continue building out their Configuration Management Database (CMDB).

This is a very small script that gets some quick information about the datastores, their sizes and how much capacity is left.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 
<#
.SYNOPSIS
Retrieves info on DataStores.
 
NB.
This script can be run against each vCenter Server on an individual basis or across multiple vCenter Servers
 
.DESCRIPTION
Retrieves information on Datastores
 
.PARAMETER  None
 
.EXAMPLE
 
 
.EXAMPLE
Usage - .\CI-DataStore.ps1 | Export-Csv c:\CI-Datastore.csv –NoTypeInformation
 
.NOTES
Author: Graham F French
Date: 04/11/2013
Email: 
Twitter: @NakedCloudGuy
#>
 
ForEach ($DataStore in Get-Datastore) {
$DataStoreName = $DataStore.name
$DataStoreCapacity = [math]::round($DataStore.CapacityGB,2)
$DataStoreFreeSpace = [math]::round($DataStore.FreeSpaceGB,2)
 
 
#Write-Host "DataStore Name:" + $DataStoreName
 
New-Object PSObject |
Add-Member -Pass NoteProperty "DataStoreName"  $DataStoreName |
Add-Member -Pass NoteProperty "DataStoreCapacity(GB)"  $DataStoreCapacity  |
Add-Member -Pass NoteProperty "DataStoreFreeSpace(GB)"  $DataStoreFreeSpace
}
 
#

Here is the code in a text file format, rename it .ps1 instead of .txt in order to be able to run it.

CI-DataStore.txt

In the example, you will notice that I use “–NoTypeInformation” at the end of the syntax, this removes the unnecessary type information being added into the CSV file.

Be Sociable, Share!

{ 0 comments }

PowerCLi – Getting Basic Cluster Info

This is the third in a series of blog posts about getting information out of the vSphere environment in timely fashion. There are times when you need to get information from your vSphere infrastructure and put it into a spreadsheet. This customised script allows you to get further information that you need for the operations team to continue building out their Configuration Management Database (CMDB).

This is a relatively small script, but the information can be very valuable.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
<#
.SYNOPSIS
Retrieves Host info for VMware clusters. 
 
NB.
This script can be run against each vCenter Server on an individual basis or across multiple vCenter Servers.
 
.DESCRIPTION
Retrieves basic capacity info for VMware clusters, looks up all Clusters, then loops through each one in turn
 
.PARAMETER  None
 
.EXAMPLE
 
 
.EXAMPLE
PS C:\> CI-ClusterInfo.ps1 | Export-Csv C:\CI-ClusterInfo.csv –NoTypeInformation
 
.NOTES
Author: Graham F French
Date: 12/10/2013
Email: 
Twitter: @NakedCloudGuy
#>
$myCol = @()
ForEach ($Cluster in Get-Cluster)
    {
        ForEach ($vmhost in ($cluster | Get-VMHost))
        {
            $VMView = $VMhost | Get-View
                        $VMSummary = “” | Select HostName, ClusterName, MemorySizeGB, CPUSockets, CPUCores
                        $VMSummary.HostName = $VMhost.Name
                        $VMSummary.ClusterName = $Cluster.Name
                        $VMSummary.MemorySizeGB = [int]($VMview.hardware.memorysize / 1024Mb)
                        $VMSummary.CPUSockets = $VMview.hardware.cpuinfo.numCpuPackages
                        $VMSummary.CPUCores = $VMview.hardware.cpuinfo.numCpuCores
                        $myCol += $VMSummary
                    }
            }
$myCol 
 
#

Here is the code in a text file format, rename it .ps1 instead of .txt in order to be able to run it.

CI-ClusterInfo.txt

In the example, you will notice that I use “–NoTypeInformation” at the end of the syntax, this removes the unnecessary type information being added into the CSV file.

Be Sociable, Share!

{ 0 comments }

PowerCli – Getting Cluster Usage Information

This is the second in a series of blog posts about getting information out of the vSphere environment in timely fashion. There are times when you need to get information from your vSphere infrastructure and put it into a spreadsheet. This customised script allows you to get further information that you need for the operations team to continue building out their Configuration Management Database (CMDB).

This script will gather the information on the size of your clusters and gives a rough rule of thumb on the scalablility. Useful if you don’t use a capacity analysis tool like vCops.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
 
<#
.SYNOPSIS
Retrieves basic capacity info for VMware clusters. 
 
NB.
This script must be run against each vCenter Server on an individual basis, 
where there are multiple VMware Clusters that have the same name in different data centres.
 
.DESCRIPTION
Retrieves basic capacity info for VMware clusters, looks up all Clusters, then loops through each one in turn
 
.PARAMETER  None.
 
.EXAMPLE
 
 
.EXAMPLE
PS C:\> CI-ClusterStats.ps1 | Export-Csv c:\temp\ClusterStatsOutput.csv –NoTypeInformation
 
.NOTES
Author: Graham F French
Date: 29/09/2013
Email: 
Twitter: @NakedCloudGuy
#>
#ForEach ($DataCentre in Get-Datacenter){
#	ForEach ($Cluster in ($DataCentre | Get-Cluster))
	Foreach ($cluster in (Get-Cluster | Sort Name)){
		$clustername = Get-cluster $cluster
		$Clusters = Get-cluster $cluster | Get-View 
		IF ($cluster | Get-VMHost | Select-Object Count) {
			$Clusters | % {
			$VMHostsView = $null
			$VMHostsView = Get-View $_.Host -Property Name, Hardware, Config
			$VMss         = $clustername | Get-VM
			$HostCount        = ($VMHostsView | Measure-Object).Count
 
				IF ($HostCount -gt 0){
					$VMCount          = 0 + ($VMss | Measure-Object).Count
					IF ($VMCount){
						$VMsPerHost       = [math]::round(($VMCount/$HostCount), 1)
						$vCPU             = 0 + ($VMss | measure-object -sum -property NumCPU).Sum
						$allocatedram      = 0 + ($VMss | measure-object -sum -property memorygb).Sum
						$avgrampervm      = [math]::round(($allocatedram/$VMCount), 1)
						$pCPUSocket       = ($VMHostsView | % { $_.Hardware.CPUInfo.NumCpuPackages } | Measure-Object -sum).Sum
						$TpCPUSocket      = $pCPUSocket
						$pCPUCore         = ($VMHostsView | % { $_.Hardware.CPUInfo.NumCpuCores } | Measure-Object -sum).Sum
						$CPUSpeed = ($VMHostsView |% {[math]::round($_.Hardware.CpuInfo.Hz / 1000000, 0)}| Measure-Object -sum).Sum
						$OverallCPUSpeed = ($CPUSpeed / $HostCount)
						$TotalCPU = (($VMHostsView |% {[math]::round($_.Hardware.CpuInfo.Hz / 1000000, 0)}| Measure-Object -sum).Sum * $pCPUCore) 
						$vCPUPerpCPUCore  = [math]::round(($vCPU/$pCPUCore), 1)
						$TotalClusterRAMGB =[math]::round((Get-cluster $cluster | get-vmhost | % { $_ } | measure-object -property memorytotalGB -sum).sum)
						$TotalClusterRAMusageGB =[math]::round((Get-cluster $cluster | get-vmhost | % { $_ } | measure-object -property memoryusageGB -sum).sum)
						$TotalClusterRAMUsagePercent = [math]::round(($TotalClusterRAMusageGB/$TotalClusterRAMGB)*100)
						$TotalClusterRAMFreeGB = [math]::round(($TotalClusterRAMGB-$TotalClusterRAMUsageGB))
						$TotalClusterRAMReservedGB = [math]::round(($TotalClusterRAMGB/100)*15)
						$TotalClusterRAMAvailable = [math]::round(($TotalClusterRAMFreeGB-$TotalClusterRAMReservedGB))
						$newvmcount = [math]::round(($TotalClusterRAMAvailable/$avgrampervm))
 
						New-Object PSObject |
						Add-Member -pass NoteProperty "ClusterName"          $clustername.name    |
						Add-Member -pass NoteProperty "TotalClusterHostCount"          $HostCount    |
						Add-Member -pass NoteProperty "TotalClusterVMCount"          $VMCount    |
						Add-Member -pass NoteProperty "TotalClusterVM/Host"          $VMsPerHost    |
						Add-Member -pass NoteProperty "TotalClusterpCPUSocket"          $TpCPUSocket   |
						Add-Member -pass NoteProperty "TotalClusterpCPUCore"          $pCPUCore   |
						Add-Member -pass NoteProperty "TotalClustervCPUCount"          $VCPU    |
						Add-Member -pass NoteProperty "TotalClustervCPU/pCPUCore"          $vcpuperpcpucore  |
						Add-Member -pass NoteProperty "TotalClusterRAMGB"          $TotalClusterRAMGB    |
						Add-Member -pass NoteProperty "TotalClusterRAMUSAGEPercent"          $TotalClusterRAMUsagePercent    |
						Add-Member -pass NoteProperty "TotalClusterRAMUsageGB"     $TotalClusterRAMusageGB    |
						Add-Member -pass NoteProperty "TotalClusterRAMFreeGB"      $TotalClusterRAMfreeGB    |
						Add-Member -pass NoteProperty "TotalClusterRAMReservedGB(15%)"          $TotalClusterRAMReservedGB    |
						Add-Member -pass NoteProperty "RAM Available for NEW VMs in GB"          $TotalClusterRAMAvailable    |
						Add-Member -pass NoteProperty "Allocated RAM per VM on an average"                          $avgrampervm    |
						Add-Member -pass NoteProperty "NEW VM's that can be provisioned based on Average RAM per VM"    $newvmcount	|
						Add-Member -pass NoteProperty "Total CPU MHz" $TotalCPU |
						Add-Member -pass NoteProperty "CPU Speed MHz" $OverallCPUSpeed 
					}
				}
			}
		}
 	}  
#}
 
#

Here is the code in a text file format, rename it .ps1 instead of .txt in order to be able to run it.

CI-ClusterStats.txt

In the example, you will notice that I use “–NoTypeInformation” at the end of the syntax, this removes the unnecessary type information being added into the CSV file.

I’ve also included an additional loop, which is commented out, which will loop around each data centre, if you decide to run this on an environment where you are using more than one data centre in vSphere.

Be Sociable, Share!

{ 0 comments }

PowerCli – Getting Hypervisor Information

Sometimes you need to get information from your vSphere infrastructure and put it into a spreadsheet. This customised script allows you to get the typical information that you need for the operations team to start building out their Configuration Management Database (CMDB). This is the first in a series of blog posts about getting information out of the vSphere environment in timely fashion.

This script will get the basic host information to get your CMDB records started.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
<# .SYNOPSIS Retrieves Host info for VMware clusters or data centres.  
NB. This script can be run against each vCenter Server on an individual basis 
or across multiple vCenter Servers.   
.DESCRIPTION Retrieves basic capacity info for VMware clusters, looks up all Clusters, then loops through each one in turn   
.PARAMETER  None      
.EXAMPLE PS C:\CI-ESXi-Data.ps1 | Export-Csv c:\temp\CI-ESXi-Data.csv –NoTypeInformation
 
.NOTES
Author: Graham F French
Date: 22/05/2014
Email: 
Twitter: @NakedCloudGuy
#>
 
Get-VMHost |Sort Name |Get-View |
Select Name,
@{N=“Serial number“;E={($_.Hardware.SystemInfo.OtherIdentifyingInfo | where {$_.IdentifierType.Key -eq “ServiceTag”}).IdentifierValue}},
@{N=“Manufacturer“;E={$_.Config.Product.Vendor}},
@{N=“Operating System“;E={$_.Config.Product.Name}},
@{N=“OS Version“;E={$_.Config.Product.Version +- Build “ + $_.Config.Product.Build}},
@{N=Type“;E={$_.Hardware.SystemInfo.Vendor + “ “ + $_.Hardware.SystemInfo.Model}},
@{N=“CPU core count“;E={$_.Hardware.CpuInfo.NumCpuCores}},
@{N=“CPU count“;E={$_.Hardware.CpuInfo.NumCpuPackages}},
@{N=“CPU speed (MHz)“;E={[math]::round($_.Hardware.CpuInfo.Hz / 1000000, 0)}},
@{N=“CPU type“;E={$_.Hardware.CpuPkg[0].Description}},
@{N=“IP Address“;E={($_.Config.Network.Vnic | ? {$_.Device -eq "vmk0"}).Spec.Ip.IpAddress}},
@{N=“RAM (MB)“;E={“” + (([math]::round($_.Hardware.MemorySize / 1GB, 0))* 1024)}} 
 
#

Here is the code in a text file format, rename it .ps1 instead of .txt in order to be able to run it.

CI-ESXi-Data.txt

In the example, you will notice that I use “–NoTypeInformation” at the end of the syntax, this removes the unnecessary type information being added into the CSV file.

Be Sociable, Share!

{ 0 comments }

If you’ve ever looked around the VMware vSphere client and looked at the ‘Edit Settings’ properties of a Virtual Machine, you may have come across the vCPU Settings.

You’ll see that there is a couple of settings that, at first, may seem either counter intuitive or plainly confusing. In the vCPU settings, you will notice that there is an option to set the number of virtual sockets and another option to set the number of cores. This option came with vSphere 4.1 in the advanced parameters section and the more upfront and central with the vCPU ‘Edit Settings’ GUI in vSphere 5.0 and hardware version 8.

But why, you may ask, is the point? I mean, after all a virtual CPU is a virtual CPU and they are all created equal?

Well yes… And no…

First of all, remember that regardless of sockets or cores, you cannot assign more virtual CPU’s than you have physical CPU’s in your host. It’s against the law… Of physics, unless you’re using hyper threading, but even if you add up all of those, you still cannot have more then that!  :-)

But back to the point of the post, why sockets and cores, instead of just vCPU’s?

VMware included this in order to allow their customers to save money on either Operating System or software licensing costs. Some, but not all, software is charged for by the socket, both for purchasing and support. This can very quickly get expensive. vSphere gives you the opportunity to gain an advantage with the vCPU setup and be within the legal licensing requirements for your OS or software vendor of choice!

Of course, if you have to pay for the license on a per core basis, then sorry, but you’re out of luck! :-(

 

 

 

Be Sociable, Share!

{ 0 comments }

Virtual versus Physical versus Virtual

Anyone who regularly designs IT infrastructures will tell you that gathering the requirements for the project is of utmost importance. How much compute power, what quantity of RAM is needed and what about the capacity and performance of the Storage Area Network?

You can find lots of publications, books, blogs and white papers on what to measure, how to investigate and methods of calculation about all parts of the virtualisation stack. This is all extremely useful and goes a long way to get the correctly sized and designed virtual infrastructure for your client.

One thing that I don’t see a lot of is the strategy on what to virtualise and what to ‘physicalise’ (keep or return to physical) when addressing the requirements of the client. Very often, there is little or no technical reason why something or indeed pretty much anything cannot be virtualised.

Today, it’s not just the compute, RAM or storage that can be virtualised. You can now virtualise almost anything, such as;

  • Firewalls (including application aware firewalls)
  • Load Balancers
  • NAS Devices
  • Backup Devices
  • Web Gateway
  • Email Gateway
  • Nested Virtualisation (Virtual Servers within Virtual Servers)

There are over 1,200 virtual appliances available for download from the VMware here.

But, just because you can virtualise a server or network device, doesn’t necessarily mean that you should. I’m a big fan of virtualisation and I’m quite happy to virtualise as much as possible, as long as it suits the requirements. However, not all clients share the same sentiment and it’s rarely for technical reasons. For instance, I had a client who was 100% physical and wanted to create an agile, 100% virtual infrastructure. His business needed to modernise in order to keep ahead of his competition, who had already started their journey onto the path towards virtualisation.

His intention was to leapfrog over them and get to a virtualised solution as quick as he comfortably could. One issue though, he was happy with the idea of a virtual server, running on vSphere 5.1, although he knew that firewalls, load balancers and web gateways could also be virtualised, he didn’t like that idea. He wanted to see physical appliances in his data centre and really wanted to see those flashing lights. Something you cannot get with a virtual appliance.

This isn’t an issue from a technical perspective, but it’s something that you need to be aware of when gathering requirements. The comfort level of the client may not be at the same advanced dizzy heights that you, as a virtualisation specialist, would happily live with.

It’s not virtual versus physical versus virtual. Sometimes it virtual, sometimes it’s physical. As long as we are delivering what the client wants, then we’ve done our job!

Be Sociable, Share!

{ 0 comments }