new1234.jpg

Archive

Posts Tagged ‘vCenter Server 4.1’

VMware: List VMFS version and blocksize of all datastores with PowerCLI

June 14th, 2011 1 comment

For a SAN to SAN migration I need to list all our datastores and blocksizes, It couldn’t be easier to do this with a script. LucD has written a great script to list VMFS Name, VMFS Version and VMFS Blocksize

New-VIProperty -Name VMFSVersion -ObjectType Datastore `      -Value {           param($ds)           $ds.ExtensionData.Info.Vmfs.Version      } `      -BasedONextensionProperty ‘Info’ `      -Force

New-VIProperty -Name VMFSBlockSizeMB -ObjectType Datastore `      -Value {           param($ds)           $ds.ExtensionData.Info.Vmfs.BlockSizeMB      } `      -BasedONextensionProperty ‘Info’ `      -Force

Get-Datastore | Select Name,VMFSVersion,VMFSBlockSizeMB

Output:

image

Credits goto: Luc Dekens

sanderdaems

Sander Daems is founder and author of this blog and working as a Lead (Sr.) Consultant by UNICA ICT Solutions. Sander has over 15 years experience in IT, primary focus: virtualization and modern worksplace.

More Posts - Website

Follow Me:
TwitterLinkedIn

VMware: Compliance Checker for vSphere (freeware)

May 30th, 2011 No comments

Compliance Checker for vSphere downloads to a Windows desktop and the intuitive web-based interface requires little or no learning curve. Administrators simply point the product to the ESX and ESXi hosts they want to test compliance against to perform the test immediately. The resultant compliance report provides a detailed rule by rule indication of pass or failure. Where compliance problems are found, users are directed to a detailed knowledge base for an explanation of the rule violated and advice on remediation. Compliance Checker for vSphere should be downloaded by all VMware customers to assess and report on the security and compliance of deployed VMware servers against the VMware vSphere Hardening Guidelines.

Download free VMware Compliance Checker for vSphere.

image

sanderdaems

Sander Daems is founder and author of this blog and working as a Lead (Sr.) Consultant by UNICA ICT Solutions. Sander has over 15 years experience in IT, primary focus: virtualization and modern worksplace.

More Posts - Website

Follow Me:
TwitterLinkedIn

VMware: Configure Multipath Policy via PowerCLI

May 25th, 2011 14 comments

Tonight I need to configure the Multipath Policy from “Most Recently Used” to “Round Robin (VMware) on our vSphere 4.1 and HP EVA6400 environment. After reading “Configuration best practices for HP StorageWorks Enterprise Virtual Array (EVA) family and VMware vSphere 4” I decided to change the path status

To check the status of the Multipath Policy you can run the following PowerCLI script:

Per host:

Get-VMhost ESXHOST | Get-ScsiLun -LunType disk

image

Per Cluster:

Get-Cluster CLUSTERNAME| Get-VMHost | Get-ScsiLun -LunType disk

 

To change the Multipath Policy you can run the following command:

Per Host:

Get-VMHost ESXHOST | Get-ScsiLun -CanonicalName "naa.6005*" | Set-ScsiLun -MultipathPolicy "roundrobin"

image

Result in vCenter:

image

sanderdaems

Sander Daems is founder and author of this blog and working as a Lead (Sr.) Consultant by UNICA ICT Solutions. Sander has over 15 years experience in IT, primary focus: virtualization and modern worksplace.

More Posts - Website

Follow Me:
TwitterLinkedIn

VMware: VMware Data Recovery – Could not connect to Data Recovery on the appliance

May 24th, 2011 1 comment

A colleague got some trouble connecting with the VMware Data Recovery appliance, received this warning:

Error: Could not connect to the Data Recovery on the appliance

Please make sure the Data Recovery appliance is powered on. If the problem persists, please restart the Data Recovery appliance

 

image

Time for some troubleshooting:

– Ping test was successful;
– Could resolve DNS names;
– Rebooted the appliance;
– No weird error in the event log;

 

Resolution:

After checking the appliance version (VMware Data Recovery 2.0.1131) and the Plugin-Version (VMware Data Recovery Plugin 1.1.37) I thought.. maybe I need to update the plugin

image

 

After upgrading the plugin to version 1.2.1.3 I was able to connect the appliance again:

image

 

Result:

image

 

More information: Troubleshooting VMware Data Recovery plug-in connection issues

sanderdaems

Sander Daems is founder and author of this blog and working as a Lead (Sr.) Consultant by UNICA ICT Solutions. Sander has over 15 years experience in IT, primary focus: virtualization and modern worksplace.

More Posts - Website

Follow Me:
TwitterLinkedIn

VMware: My favorite Windows 2008R2 template configuration

January 17th, 2011 26 comments

image

Virtual Hardware (VMX) template configuration:

Hardware: Value:
Memory 2 GB
CPU’s 1
Video card Auto-detect video settings
VMCI device None
SCSI Controller 0 LSI Logic SAS, bus sharing: none
Hard disk 1 40 GB, Thin (after deploy always Thick)
CD/DVD Drive 1 Client Device
Floppy Drive 1 Removed
Network Adapter 1 VMXNET3, network: VM Network with DHCP (for joining domain)
General Options OS: Microsoft Windows Server 2008 R2 (64-bit)
VMware Tools Advanced: Check and upgrade Tools during power cycling
Virtual Machine Version 7

 

Microsoft Windows Server 2008 R2 template configuration:

– Install always the latest VMware Tools (in my case: ESXi 4.1 build 260247)

image

 

– Change the CD/DVD Drive 1 from drive letter D:\ to X:\

image

– Install VMware display driver: VMware SVGA 3D (Microsoft Corporation – WDDM)

image

Driver located: C:\Program Files\Common Files\VMware\Drivers\wddm_video\

Read more…

sanderdaems

Sander Daems is founder and author of this blog and working as a Lead (Sr.) Consultant by UNICA ICT Solutions. Sander has over 15 years experience in IT, primary focus: virtualization and modern worksplace.

More Posts - Website

Follow Me:
TwitterLinkedIn

VMware: Deploy multiple VM’s from template with PowerCLI

January 16th, 2011 30 comments

Last week I was working on a new project, they asked me to install 5 new fileservers based on Windows 2008R2, I installed a new VM and converted it to a template, next I configured a template in “Customization Specifications Manager” with the following details:

Customization template:

Registration information: name company

Computer name: Use the virtual machine name (important)

Product key: Didn’t need it because I’ve configured KMS

Password: Company default local administrator password, selected: Automatically login as the Administrator: 2

Timezone: GMT+0100 (Amsterdam)

Runonce: none

Network: Typical settings

Workgroup or Domain: selected to auto join the domain with domain administrator credentials + domain name (important)

Operation System Options: Selected: Generate New Security ID (SID)

VM template settings:

Hard disk: 40 GB with only OS configured with company standard policy

VMware tools: Latest, this must be installed for Specification Template and NIC

Network: VMXNET3 (needed VMware Tools for driver)

Script: (saved as: FileserverDeploy.ps1)

-vmhost = Target host;

-Name = Name of new VM;

-Template: From wich template you want to deploy the new VM;

-Datastore: Target datastore to place the new VM;

-OSCustomizationspec = Wich “prep” template you want to deploy the new VM;

New-vm -vmhost esx04.vmpros.local -Name FS-SVR01 -Template WIN2008R2_Template -Datastore datastore2 -OSCustomizationspec WIN2008R2_Template
New-vm -vmhost esx04.vmpros.local -Name FS-SVR02 -Template WIN2008R2_Template -Datastore datastore2 -OSCustomizationspec WIN2008R2_Template
New-vm -vmhost esx04.vmpros.local -Name FS-SVR03 -Template WIN2008R2_Template -Datastore datastore2 -OSCustomizationspec WIN2008R2_Template
New-vm -vmhost esx04.vmpros.local -Name FS-SVR04 -Template WIN2008R2_Template -Datastore datastore2 -OSCustomizationspec WIN2008R2_Template
New-vm -vmhost esx04.vmpros.local -Name FS-SVR05 -Template WIN2008R2_Template -Datastore datastore2 -OSCustomizationspec WIN2008R2_Template

PowerCLI:

Running the script:

image

image

image

Final result:

image

The 5 fileservers deployed from template and joined the domain.. great!

sanderdaems

Sander Daems is founder and author of this blog and working as a Lead (Sr.) Consultant by UNICA ICT Solutions. Sander has over 15 years experience in IT, primary focus: virtualization and modern worksplace.

More Posts - Website

Follow Me:
TwitterLinkedIn

VMware: Call “PropertyCollector.RetrieveContents” for object “propertyCollector” on vCenter Server “VC” failed

January 14th, 2011 8 comments

I wanted to update my templates with the latest VMware Tools and VMXNET3 adapter. After converting a template to a VM I tried to edit the settings. I received the following error:

Call “PropertyCollector.RetrieveContents” for object “propertyCollector” on vCenter Server “VC” failed

 

Warning message:

image

The only way I could fix this issue was deleting the VM (already converted it to a VM) from the Inventory and re-add it to the Inventory. Now I was able to edit the VM hardware:

image

sanderdaems

Sander Daems is founder and author of this blog and working as a Lead (Sr.) Consultant by UNICA ICT Solutions. Sander has over 15 years experience in IT, primary focus: virtualization and modern worksplace.

More Posts - Website

Follow Me:
TwitterLinkedIn

VMware: Streaming VMware vSphere Client 4.1 over my W2008 R2 TS RDWEB portal

October 2nd, 2010 1 comment

I got my test environment (DL 585G1) placed in the server rack at my work. I was busy with a Terminal Server tweak blogpost on VMware.. but also playing with the RDweb portal and decided to publish the vSphere Client for the “vCenter Admin” AD security group. I must say.. this application is big.. but.. streaming is not a problem! Here some facts:

ISP connection:

Work ISP: 10/10 MBit (server located)

Home ISP: 35/35 MBit

image[3]

^ My personal portal with Office 2010, TweetDeck and the vSphere Client

image[6]

^ Pruttel.. Pruttel..

Read more…

sanderdaems

Sander Daems is founder and author of this blog and working as a Lead (Sr.) Consultant by UNICA ICT Solutions. Sander has over 15 years experience in IT, primary focus: virtualization and modern worksplace.

More Posts - Website

Follow Me:
TwitterLinkedIn

VMware: Disconnect idling vCenter sessions with PowerCLI

October 2nd, 2010 5 comments

Today I was browsing my vCenter server and saw multiple vCenter idle sessions connected to the vCenter server. I was thinking.. there must be a PowerCLI script made by a CLI freak that will disconnect my old sessions.. and there is 🙂

 image

With this Powershell script you get an outputh of the connected vCenter users:

$svcRef = new-object VMware.Vim.ManagedObjectReference
$svcRef.Type = "ServiceInstance"
$svcRef.Value = "ServiceInstance"
$serviceInstance = get-view $svcRef
$sessMgr = get-view $serviceInstance.Content.sessionManager
foreach ($sess in $sessMgr.SessionList){if (($sess.LastActiveTime).addminutes(60) -lt (Get-Date)){write "$($sess.UserName)"}
}

 

image

^ Credits and thanks for this script goto Anders Mikkelsen

To disconnect the idling sessions (12h +) you can run the following script:

  

$VCServerName = “YourVCServerName”
$HoursOld = 12        # Modify value at your pleasure
$VC = Connect-VIServer $VCServerName
$ServiceInstance = Get-View ServiceInstance
$SessionManager = Get-View $ServiceInstance.Content.SessionManager
$SessionManager.SessionList |
   Where {$_.LastActiveTime -lt (Get-Date).AddHours(-$HoursOld)} |
   % {$SessionManager.TerminateSession($_.Key)}
Disconnect-VIServer -Confirm:$False

$VCServerName = FQDN

$HoursOld = Max hours to kill the idling sessions ( I prefer 12 hours)

image

^ Credits and thanks for this script goto Hugo Peeters

 

Now my connected sessions are:

image

Time to schedule the disconnect script every day and slap some colleagues to close their sessions 🙂

sanderdaems

Sander Daems is founder and author of this blog and working as a Lead (Sr.) Consultant by UNICA ICT Solutions. Sander has over 15 years experience in IT, primary focus: virtualization and modern worksplace.

More Posts - Website

Follow Me:
TwitterLinkedIn