Evaluator Guide
Page 3
VMware vSphere 5.0 Evaluation Guide - Volume One Host Isolation 34 Disabling VMware HA 43 Connect to a Virtual Server 43 Go to the Cluster Summary 44 Edit Cluster Settings 45 Wait for Task to ...56 Formatting esxcli Output 58 The localcli Command 59 Bringing It All Together 60 vSphere PowerCLI by Example 62 Introduction 62 Prerequisites 62 Install vSphere PowerCLI 62 Getting Started with vSphere PowerCLI 69 Connecting to a vSphere Host or vCenter 69 Using vSphere PowerCLI 71 vSphere PowerCLI Summary 81 Evaluating the ESXi Firewall 81 Introduction 81 TECHNICAL WHITE PAPER / 3
VMware vSphere 5.0 Evaluation Guide - Volume One Host Isolation 34 Disabling VMware HA 43 Connect to a Virtual Server 43 Go to the Cluster Summary 44 Edit Cluster Settings 45 Wait for Task to ...56 Formatting esxcli Output 58 The localcli Command 59 Bringing It All Together 60 vSphere PowerCLI by Example 62 Introduction 62 Prerequisites 62 Install vSphere PowerCLI 62 Getting Started with vSphere PowerCLI 69 Connecting to a vSphere Host or vCenter 69 Using vSphere PowerCLI 71 vSphere PowerCLI Summary 81 Evaluating the ESXi Firewall 81 Introduction 81 TECHNICAL WHITE PAPER / 3
Evaluator Guide
Page 4
...VMware vSphere 5.0 Evaluation Guide - Volume One Evaluation Overview 81 Prerequisites 81 Stopping SSH Service to Prevent Access 81 Testing Access with SSH Service Stopped 85 Creating Firewall Rules to Block SSH Access 86 Testing SSH Firewall Rules 89 Image Builder 91 Introduction 91 Image Builder Prerequisites 92 Preparation Tasks 92 Install vSphere PowerCLI... 92 Download the ESXi Offline Bundle 92 Extract the ESXi Offline Bundle 92 Start an Image Builder vSphere PowerCLI Session 92 Import the ESXi Offline ...
...VMware vSphere 5.0 Evaluation Guide - Volume One Evaluation Overview 81 Prerequisites 81 Stopping SSH Service to Prevent Access 81 Testing Access with SSH Service Stopped 85 Creating Firewall Rules to Block SSH Access 86 Testing SSH Firewall Rules 89 Image Builder 91 Introduction 91 Image Builder Prerequisites 92 Preparation Tasks 92 Install vSphere PowerCLI... 92 Download the ESXi Offline Bundle 92 Extract the ESXi Offline Bundle 92 Start an Image Builder vSphere PowerCLI Session 92 Import the ESXi Offline ...
Evaluator Guide
Page 46
... managing your needs. Volume One Figure 48. Getting Familiar with esxcli or vicfg- • vSphere PowerCLI • Used for Task to Complete VMware vSphere 5.0 Evaluation Guide - commands Other commands (vmware-cmd, vifs) vSphere PowerCLI New in vSphere 5.0 Minor changes in vSphere 5.0 Minor changes in vSphere 5.0 Minor changes and updates in the shell can run esxcli commands remotely from the vCLI...
... managing your needs. Volume One Figure 48. Getting Familiar with esxcli or vicfg- • vSphere PowerCLI • Used for Task to Complete VMware vSphere 5.0 Evaluation Guide - commands Other commands (vmware-cmd, vifs) vSphere PowerCLI New in vSphere 5.0 Minor changes in vSphere 5.0 Minor changes in vSphere 5.0 Minor changes and updates in the shell can run esxcli commands remotely from the vCLI...
Evaluator Guide
Page 62
... it to native PowerShell commands, enabling the management of the vSphere environment. Volume One vSphere PowerCLI by Example Introduction vSphere PowerCLI is typically installed on ) to -learn management and automation capabilities. VMware vSphere 5.0 Evaluation Guide - Prerequisites vSphere PowerCLI is a snap-in secure mode, which will disable the running of vSphere PowerCLI to a desktop system, the following Web site: http://support.microsoft...
... it to native PowerShell commands, enabling the management of the vSphere environment. Volume One vSphere PowerCLI by Example Introduction vSphere PowerCLI is typically installed on ) to -learn management and automation capabilities. VMware vSphere 5.0 Evaluation Guide - Prerequisites vSphere PowerCLI is a snap-in secure mode, which will disable the running of vSphere PowerCLI to a desktop system, the following Web site: http://support.microsoft...
Evaluator Guide
Page 63
... policy to the correct setting for your action before changing the execution policy. Type Exit and press Enter to install vSphere PowerCLI. Enter get-help about_Execution_Policies at the prompt and press Enter. You will change being completed. TECHNICAL WHITE PAPER / 63 In... this to RemoteSigned. VMware vSphere 5.0 Evaluation Guide - Once the PowerShell program is recommended that you read more about PowerShell's different execution policies to find out...
... policy to the correct setting for your action before changing the execution policy. Type Exit and press Enter to install vSphere PowerCLI. Enter get-help about_Execution_Policies at the prompt and press Enter. You will change being completed. TECHNICAL WHITE PAPER / 63 In... this to RemoteSigned. VMware vSphere 5.0 Evaluation Guide - Once the PowerShell program is recommended that you read more about PowerShell's different execution policies to find out...
Evaluator Guide
Page 64
Click OK. Volume One Figure 80. vSphere PowerCLI Download Screen Download the vSphere PowerCLI software to your workstation from the following URL: http://vmware.com/go/ PowerCLI Once the software has been downloaded, start the installation by double-clicking the vSphere PowerCLI .exe file. TECHNICAL WHITE PAPER / 64 Notification of VMware VIX Installation The installer will first notify you that an additional component, VMware VIX, will be installed as part of the vSphere PowerCLI installation. Figure 81. VMware vSphere 5.0 Evaluation Guide -
Click OK. Volume One Figure 80. vSphere PowerCLI Download Screen Download the vSphere PowerCLI software to your workstation from the following URL: http://vmware.com/go/ PowerCLI Once the software has been downloaded, start the installation by double-clicking the vSphere PowerCLI .exe file. TECHNICAL WHITE PAPER / 64 Notification of VMware VIX Installation The installer will first notify you that an additional component, VMware VIX, will be installed as part of the vSphere PowerCLI installation. Figure 81. VMware vSphere 5.0 Evaluation Guide -
Evaluator Guide
Page 65
Volume One Figure 82. Recommendation to Set Execution Policy Correctly If you have not yet set to RemoteSigned before vSphere PowerCLI will bring you to the following VMware Patents screen: TECHNICAL WHITE PAPER / 65 If the execution policy is set correctly this will need to be shown, ...welcoming you to the install wizard for vSphere PowerCLI. Welcome Screen The welcome screen will bring you that this box will not appear...
Volume One Figure 82. Recommendation to Set Execution Policy Correctly If you have not yet set to RemoteSigned before vSphere PowerCLI will bring you to the following VMware Patents screen: TECHNICAL WHITE PAPER / 65 If the execution policy is set correctly this will need to be shown, ...welcoming you to the install wizard for vSphere PowerCLI. Welcome Screen The welcome screen will bring you that this box will not appear...
Evaluator Guide
Page 67
VMware vSphere 5.0 Evaluation Guide - This will bring you would like to the Installing VMware vSphere PowerCLI screen. Volume One Figure 86. This will bring you to install vSphere PowerCLI onto and the folder name, or leave this set as the recommended path and click Next. Destination Folder Screen Select the drive you to the following Ready to begin the Installation of PowerCLI. Ready to Install Screen Click Install to Install screen: Figure 87. TECHNICAL WHITE PAPER / 67
VMware vSphere 5.0 Evaluation Guide - This will bring you would like to the Installing VMware vSphere PowerCLI screen. Volume One Figure 86. This will bring you to install vSphere PowerCLI onto and the folder name, or leave this set as the recommended path and click Next. Destination Folder Screen Select the drive you to the following Ready to begin the Installation of PowerCLI. Ready to Install Screen Click Install to Install screen: Figure 87. TECHNICAL WHITE PAPER / 67
Evaluator Guide
Page 68
VMware vSphere 5.0 Evaluation Guide - To complete the installation, click Finish. Installation Finish Screen When the installation is completed. TECHNICAL WHITE PAPER / 68 Volume One Figure 88. The vSphere PowerCLI installation will now be displayed. Installing vSphere PowerCLI Wait while the installation is successful, the finish screen will now have two icons, which allow you will be completed, and on your desktop you to launch vSphere PowerCLI, a 64-bit version and a 32-bit version. Figure 89.
VMware vSphere 5.0 Evaluation Guide - To complete the installation, click Finish. Installation Finish Screen When the installation is completed. TECHNICAL WHITE PAPER / 68 Volume One Figure 88. The vSphere PowerCLI installation will now be displayed. Installing vSphere PowerCLI Wait while the installation is successful, the finish screen will now have two icons, which allow you will be completed, and on your desktop you to launch vSphere PowerCLI, a 64-bit version and a 32-bit version. Figure 89.
Evaluator Guide
Page 69
... following items: • vSphere PowerCLI (32-Bit) • vSphere PowerCLI • vSphere PowerCLI Administration Guide • vSphere PowerCLI Cmdlets Reference • vSphere SDK for .NET API Reference • vSphere SDK for .NET Dev Guide It is highly recommended that you have access to manage a single vSphere host. Volume One Getting Started with vSphere PowerCLI On your start menu in the VMware -> VMware vSphere PowerCLI folder, you will...
... following items: • vSphere PowerCLI (32-Bit) • vSphere PowerCLI • vSphere PowerCLI Administration Guide • vSphere PowerCLI Cmdlets Reference • vSphere SDK for .NET API Reference • vSphere SDK for .NET Dev Guide It is highly recommended that you have access to manage a single vSphere host. Volume One Getting Started with vSphere PowerCLI On your start menu in the VMware -> VMware vSphere PowerCLI folder, you will...
Evaluator Guide
Page 70
... If a connection cannot be made from the current credentials, you will launch a new PowerShell session and automatically import the VMware snap-in with this cmdlet to specify the connection credentials. This will be used to your current logged-on Windows credentials.... Connecting to vCenter Server Use the Connect-VIServer cmdlet to connect to manage the VMware environment, as follows: Figure 91. TECHNICAL WHITE PAPER / 70 Volume One From the start menu, select VMware -> VMware vSphere PowerCLI -> VMware vSphere PowerCLI. VMware vSphere 5.0 Evaluation Guide -
... If a connection cannot be made from the current credentials, you will launch a new PowerShell session and automatically import the VMware snap-in with this cmdlet to specify the connection credentials. This will be used to your current logged-on Windows credentials.... Connecting to vCenter Server Use the Connect-VIServer cmdlet to connect to manage the VMware environment, as follows: Figure 91. TECHNICAL WHITE PAPER / 70 Volume One From the start menu, select VMware -> VMware vSphere PowerCLI -> VMware vSphere PowerCLI. VMware vSphere 5.0 Evaluation Guide -
Evaluator Guide
Page 71
Volume One Once connected, you are then ready for your next cmdlet to be returned to show a successful connection. Using vSphere PowerCLI Figure 93. TECHNICAL WHITE PAPER / 71 VMware vSphere 5.0 Evaluation Guide - You are connected, the Name, Port and User properties used to make the connection will be executed, as follows: Figure 92. Once you will be ignored. Certificate Warning During this "vSphere PowerCLI by Example" section, the certificate warning can be returned to the vSphere PowerCLI prompt.
Volume One Once connected, you are then ready for your next cmdlet to be returned to show a successful connection. Using vSphere PowerCLI Figure 93. TECHNICAL WHITE PAPER / 71 VMware vSphere 5.0 Evaluation Guide - You are connected, the Name, Port and User properties used to make the connection will be executed, as follows: Figure 92. Once you will be ignored. Certificate Warning During this "vSphere PowerCLI by Example" section, the certificate warning can be returned to the vSphere PowerCLI prompt.
Evaluator Guide
Page 72
This will take the Get-VM cmdlet and "pipe" it through the Get-Member cmdlet. VMware vSphere 5.0 Evaluation Guide - This will take the results of all called properties of virtual machines attached to retrieve a list of the Get-VM cmdlet and ... Name, PowerState, Num CPUs and Memory (MB). TECHNICAL WHITE PAPER / 72 Volume One To retrieve a list of the virtual machine. vSphere PowerCLI returns more information about the object being returned by vSphere PowerCLI, use the Get-Member cmdlet to the connected vCenter server, type Get-VM. It actually returns an object to this...
This will take the Get-VM cmdlet and "pipe" it through the Get-Member cmdlet. VMware vSphere 5.0 Evaluation Guide - This will take the results of all called properties of virtual machines attached to retrieve a list of the Get-VM cmdlet and ... Name, PowerState, Num CPUs and Memory (MB). TECHNICAL WHITE PAPER / 72 Volume One To retrieve a list of the virtual machine. vSphere PowerCLI returns more information about the object being returned by vSphere PowerCLI, use the Get-Member cmdlet to the connected vCenter server, type Get-VM. It actually returns an object to this...
Evaluator Guide
Page 73
Type: Get-VM | Select Name, PowerState, VMHost, NumCPU, MemoryMB | Format-Table This will retrieve the selected properties and show them in a table view in our console. Figure 96. TECHNICAL WHITE PAPER / 73 To select properties that we would like to see, we can easily be exported from vSphere PowerCLI into many formats using some of the virtual machine we would like returned. Volume One Figure 95. VMware vSphere 5.0 Evaluation Guide - This information can use the Select-Object cmdlet to choose the properties of the cmdlets built into the default PowerShell console.
Type: Get-VM | Select Name, PowerState, VMHost, NumCPU, MemoryMB | Format-Table This will retrieve the selected properties and show them in a table view in our console. Figure 96. TECHNICAL WHITE PAPER / 73 To select properties that we would like to see, we can easily be exported from vSphere PowerCLI into many formats using some of the virtual machine we would like returned. Volume One Figure 95. VMware vSphere 5.0 Evaluation Guide - This information can use the Select-Object cmdlet to choose the properties of the cmdlets built into the default PowerShell console.
Evaluator Guide
Page 76
To see the cmdlets that can be used with vSphere PowerCLI. TECHNICAL WHITE PAPER / 76 To list all virtual machines attached to the current connection, type Get-VMHost Figure 101. VMware vSphere 5.0 Evaluation Guide - To list all hosts attached to a certain host, type Get-VMHost tm-pod01-esx02* | Get-VM The preceding example will take...
To see the cmdlets that can be used with vSphere PowerCLI. TECHNICAL WHITE PAPER / 76 To list all virtual machines attached to the current connection, type Get-VMHost Figure 101. VMware vSphere 5.0 Evaluation Guide - To list all hosts attached to a certain host, type Get-VMHost tm-pod01-esx02* | Get-VM The preceding example will take...
Evaluator Guide
Page 77
...been created and how much space they are using, when they were created, and by whom they can quickly cause issues within the virtual infrastructure. VMware vSphere 5.0 Evaluation Guide - You would need to go to the host and clusters view, select a host, click the configuration tab and select the...repeat this in conjunction with snapshots. The Get-VMHost cmdlet can be managed correctly or they were created. Snapshots need to view. vSphere PowerCLI includes multiple cmdlets to allow you would need to retrieve and set information for that host. To do this for each host in the...
...been created and how much space they are using, when they were created, and by whom they can quickly cause issues within the virtual infrastructure. VMware vSphere 5.0 Evaluation Guide - You would need to go to the host and clusters view, select a host, click the configuration tab and select the...repeat this in conjunction with snapshots. The Get-VMHost cmdlet can be managed correctly or they were created. Snapshots need to view. vSphere PowerCLI includes multiple cmdlets to allow you would need to retrieve and set information for that host. To do this for each host in the...
Evaluator Guide
Page 78
...and attributed to the user who is connected to this vSphere PowerCLI session. TECHNICAL WHITE PAPER / 78 Figure 104. Figure 105. VMware vSphere 5.0 Evaluation Guide - The following example shows how to reporting, PowerCLIvSphere PowerCLI also provides cmdlets for your virtual machines and use the..." You will also see from the preceding screen shot that any task produced by vSphere PowerCLI will be created one at a time. Snapshots in the vSphere Client must be recorded in vSphere PowerCLI. With vSphere PowerCLI, you can specify the criteria for the management of snapshots.
...and attributed to the user who is connected to this vSphere PowerCLI session. TECHNICAL WHITE PAPER / 78 Figure 104. Figure 105. VMware vSphere 5.0 Evaluation Guide - The following example shows how to reporting, PowerCLIvSphere PowerCLI also provides cmdlets for your virtual machines and use the..." You will also see from the preceding screen shot that any task produced by vSphere PowerCLI will be created one at a time. Snapshots in the vSphere Client must be recorded in vSphere PowerCLI. With vSphere PowerCLI, you can specify the criteria for the management of snapshots.
Evaluator Guide
Page 79
... their information, type Get-VMHost | Get-VirtualSwitch | Select VMHost, Name, Nic, NumPortsAvailable TECHNICAL WHITE PAPER / 79 To list all aspects of your virtual infrastructure. VMware vSphere 5.0 Evaluation Guide - vSphere PowerCLI has the ability to remove them in large numbers with the creation of snapshots, it is also a key area of "Patch Tuesday": Get-Snapshot...
... their information, type Get-VMHost | Get-VirtualSwitch | Select VMHost, Name, Nic, NumPortsAvailable TECHNICAL WHITE PAPER / 79 To list all aspects of your virtual infrastructure. VMware vSphere 5.0 Evaluation Guide - vSphere PowerCLI has the ability to remove them in large numbers with the creation of snapshots, it is also a key area of "Patch Tuesday": Get-Snapshot...
Evaluator Guide
Page 80
... the configuration of each host in large numbers using vSphere PowerCLI. VMware vSphere 5.0 Evaluation Guide - vSphere PowerCLI reporting can be used to add port groups in a specific cluster to ensure the DRS and HA compatibility of the host. This can cause fundamental issues with clusters and the vSphere Distributed Resource Scheduler (DRS). The following : Get-VMHost | Get...
... the configuration of each host in large numbers using vSphere PowerCLI. VMware vSphere 5.0 Evaluation Guide - vSphere PowerCLI reporting can be used to add port groups in a specific cluster to ensure the DRS and HA compatibility of the host. This can cause fundamental issues with clusters and the vSphere Distributed Resource Scheduler (DRS). The following : Get-VMHost | Get...
Evaluator Guide
Page 81
...Get-VirtualSwitch -Name vSwitch0 | New-VirtualPortGroup "Company X" -VLanId 200 vSphere PowerCLI Summary In conclusion, you can be done through the vSphere Client interface and through vSphere Client UI. SSH is a service that vSphere PowerCLI is protected by Microsoft or third-party companies to learn than many ... software section. Evaluation Overview In this example environment, you will stop this scripting language easier to integrate VMware technologies easily into other PowerShell snap-ins provided by a service-oriented and stateless firewall, which you can see that...
...Get-VirtualSwitch -Name vSwitch0 | New-VirtualPortGroup "Company X" -VLanId 200 vSphere PowerCLI Summary In conclusion, you can be done through the vSphere Client interface and through vSphere Client UI. SSH is a service that vSphere PowerCLI is protected by Microsoft or third-party companies to learn than many ... software section. Evaluation Overview In this example environment, you will stop this scripting language easier to integrate VMware technologies easily into other PowerShell snap-ins provided by a service-oriented and stateless firewall, which you can see that...