background image

T E C H N I C A L   W H I T E   P A P E R   /   5 9

VMware vSphere 5.0 Evaluation Guide – 

Volume One

 

 

Figure 71.

 esxcli Command with –formatter Option from the ESXi Shell

Now we have a short list giving us just the information we need.

The localcli Command

The 

esxcli

 command talks to the ESXi hosts through the 

hostd

 service. In rare circumstances, when the 

hostd

 service might not be responding, the 

localcli

 command can be used. The 

localcli

 command is 

equivalent to 

esxcli

 with the exception that it bypasses 

hostd

. The 

localcli

 command is only intended for 

situations when 

hostd

 is unavailable and cannot be restarted. After you run the 

localcli

 command, you 

must restart 

hostd

. Run 

esxcli

 commands after the restart. 

NOTE: Use the 

localcli 

command only under the direction of VMware technical support, because improper 

use can result in an inconsistent system state and potential failure of the ESXi host. 

The following example shows the use of the localcli command to display all network adaptors on a host:

Figure 72.

 localcli Command Example 

Содержание VS4-STD-C - vSphere Standard - PC

Страница 1: ...VMware vSphere 5 0 Evaluation Guide Volume One T E C H N I C A L W H I T E P A P E R V 1 1 U P D AT E D A U G U S T 1 1 2 0 1 1...

Страница 2: ...Setup 10 Virtual Machine Setup 10 VMware vSphere 5 0 Evaluation Guide Volume One Worksheet 11 vSphere Evaluation Tasks 12 High Availability 12 Introduction 12 Prerequisites 12 Enabling HA 12 Connect...

Страница 3: ...to the ESXi Shell 51 Enabling SSH from the DCUI 51 Enabling the SSH from the vSphere Client 52 vSphere Client Notification When the ESXi Shell and SSH Are Enabled 53 Installing the vCLI 53 Installing...

Страница 4: ...ilder vSphere PowerCLI Session 92 Import the ESXi Offline Bundle 94 Display Software Depots 94 Display VIBs 95 Display Image Profiles 95 Create a New Image Profile 96 Create a New Image Profile by Man...

Страница 5: ...ile maintaining service levels System Requirements To ensure the best experience when using this guide the user will need to configure hardware and software as detailed in the following section Hardwa...

Страница 6: ...ting software infrastructure VMware vSphere This volume of the VMware vSphere 5 0 Evaluation Guide requires vSphere 5 0 and licensing for Essentials Plus If the user intends to also complete the exerc...

Страница 7: ...configured in the Technical Marketing test bed configuration to support other evaluation projects and are present in the diagrams The user can configure only what is called for in the following sectio...

Страница 8: ...gram summarizes the evaluation guide test bed configuration 3x 100GB FC LUNs volume shared across hosts in pod used in Evaluation Guide steps Linux vCenter Appliance VM can reside in cluster or on ext...

Страница 9: ...ide Volume One TM POD xx ESX xx vmnic0 vSwitch0 VMK0 Management network VLAN 2912 Production02 VLAN 3001 VM vMotion VLAN 3002 TBD Not used in Evaluation Guide vmnic1 vmnic2 vmnic3 Port groups Name VLA...

Страница 10: ...o each host enabling creation of three datastores Virtual Machine Setup The VMware vSphere 5 0 Evaluators Guide Volume One uses a total of six to seven virtual machines for testing These can be Linux...

Страница 11: ...s a network adaptor team Each server has the required HBA network adaptor to access shared storage SOFTWARE CHECKLIST VMware vSphere VMware ESXi installation media is available VMware vCenter Server a...

Страница 12: ...nistrator can also monitor the application running within the OS for proper operation In the event of a failure of the application HA can be triggered to restart the virtual machine hosting the applic...

Страница 13: ...I C A L W H I T E P A P E R 1 3 VMware vSphere 5 0 Evaluation Guide Volume One Connect to Virtual Server Figure 1 Connecting to Virtual Server Using the vSphere Client connect to your virtual server...

Страница 14: ...5 0 Evaluation Guide Volume One Go to Cluster Summary Figure 2 Cluster Summary Once connected to your virtual server instance select your cluster by clicking on its name on the left hand panel Select...

Страница 15: ...ng Cluster Settings In the cluster summary screen select the Edit Settings option This will bring up a wizard that you can use to modify the settings of the cluster Click the check box next to Turn On...

Страница 16: ...ed status This should only take a minute At this point VMware HA is now providing protection for the virtual machines that are powered on Verifying VMware HA Enablement At this point WMware HA should...

Страница 17: ...ill notice three tabs There is one tab each for Hosts VMs and Heartbeat Datastores On the Hosts tab you will see the system that is acting as the Master node You will also see the number of hosts that...

Страница 18: ...Evaluation Guide Volume One Figure 8 Summary of Virtual Machine Protection States Under the VMs tab a summary of the virtual machine protection states is displayed The virtual machines that were powe...

Страница 19: ...information about the datastores that were selected as heartbeat datastores Heartbeat datastores allow a secondary means of communication between the hosts in case of a loss of the management network...

Страница 20: ...achines tab for a cluster Right clicking the title bar enables you to select the vSphere HA Protection field Once the field is selected you will see a column that displays the current VMware HA protec...

Страница 21: ...tate for the Host The VMware HA state can be identified for an individual host by selecting the desired host from the navigation tree and selecting the Summary tab Here you will see the VMware HA stat...

Страница 22: ...in a cluster select the cluster from the navigation tree and then click the Hosts tab Right click the title bar and ensure that the vSphere HA State column is enabled VMware HA Advanced Options VMware...

Страница 23: ...vSphere 5 0 Evaluation Guide Volume One Figure 15 Cluster Settings Wizard This brings up the wizard that allows you to edit the cluster settings Once VMware HA is enabled additional settings are displ...

Страница 24: ...heartbeats When this occurs you should unselect this option to prevent VMware HA from believing the hosts are isolated Admission control is used to ensure that adequate resources within the cluster ar...

Страница 25: ...to restart the protected VMs on these hosts before trying others Additionally vSphere HA prevents VMs from being moved to these hosts or powered on by the user or vSphere Distributed Resource Schedul...

Страница 26: ...ant virtual machines to be restarted first Notice that this can be set on a per virtual machine basis as well Figure 18 Host Isolation Response Host Isolation Response specifies the behavior that HA w...

Страница 27: ...oring Figure 19 Virtual Machine Monitoring Selecting VM Monitoring from the left hand navigation pane enables you to change settings related to the monitoring of the OS or application running within a...

Страница 28: ...re 5 0 Evaluation Guide Volume One Figure 20 Selecting Custom Option for VM Monitoring By selecting the Custom option you can exert a fine level of control over the various parameters involved You can...

Страница 29: ...d the type of storage This attempts to provide protection against array failures and allows for the highest number of hosts to utilize the heartbeat datastore The datastores utilized can be manually s...

Страница 30: ...machines on a functional host Figure 22 Checking Virtual Machines First use the vSphere Client to examine the virtual machines hosted within the cluster In this example we are going to cause the syst...

Страница 31: ...you will see messages similar to the ones demonstrated in the preceding figure validating that VMware HA has detected the failure Figure 25 Virtual Machine View of a Cluster After Restart Attempt Afte...

Страница 32: ...2 VMware vSphere 5 0 Evaluation Guide Volume One Figure 26 Viewing Log Messages After Restart Attempt You can also examine the events for a host to see the log messages denoting that VMware HA has at...

Страница 33: ...r the failed host you will notice that the issue is displayed in multiple places The first is located at the top of the screen and second location is the vSphere HA State At this point you will reappl...

Страница 34: ...n and induce the default actions that will be taken by VMware HA Figure 28 Identifying a Host to Be Isolated First you want to identify a host that will be isolated For this example host tm pod01 esx0...

Страница 35: ...tain console access to the target host This will allow you to continue to access the host after the fault has been inserted allowing you to recover gracefully afterwards It is important to note that t...

Страница 36: ...gure 31 Authenticating to the Host At the console hit F2 to access the console menu You will need to authenticate to the host first before it will allow access to the console menu Figure 32 Selecting...

Страница 37: ...Shell This shell will enable you to remove the network connections to the host Figure 34 vSphere Client Warning Message Once you do this you will notice that the vSphere Client displays a warning mess...

Страница 38: ...e present on the host In this example there are two vmnic0 and vmnic1 that can be identified on vSwitch0 Use the command esxcfg vswitch U uplink switch where uplink is an identified uplink and switch...

Страница 39: ...uide Volume One Figure 37 Identifying Host Isolation Using the vSphere Client select the host from the left hand navigation pane and select the Summary tab The host will be identified as being isolate...

Страница 40: ...f the Virtual Machines tab of the cluster Observe that the virtual machines on the isolated host are now shown in gray You ll also observe that the virtual machines did not get restarted on another ho...

Страница 41: ...red setting and perform this test again Figure 40 Restoring Uplinks for the Host with the esxcfg vswitch l Command To restore normal operation utilize the ESXi Shell to execute the esxcfg vswitch l co...

Страница 42: ...st This will show you that communication with the other hosts in the cluster has been re established Even after you have re established the network connections you ll notice that the host still displa...

Страница 43: ...the previously isolated host is now operating normally and has reconnected to the cluster Disabling VMware HA As with the enabling of HA disabling HA is a simple straightforward process This section...

Страница 44: ...Evaluation Guide Volume One Go to the Cluster Summary Figure 45 Cluster Summary Screen Once connected to your virtual server instance select your cluster by clicking its name on the left hand panel S...

Страница 45: ...up a wizard that you can use to modify the settings of the cluster Click the check box next to Turn On vSphere HA to deselect it and select OK This will close the wizard and the system will unconfigur...

Страница 46: ...ments the esxcli commands to manage aspects not yet covered by esxcli Other commands vmware cmd vifs Minor changes in vSphere 5 0 Available from the vCLI only Used for remote administration only Addit...

Страница 47: ...et of command capabilities Continue to use the esxcli command in conjunction with the vicfg and other vCLI commands that is vmware cmd vmkfstools and vifs The esxcli command in vSphere 5 0 is not back...

Страница 48: ...is used to get more information about the available namespaces and commands under the network namespace Figure 51 Using the help Parameter to Get Information About Namespaces and Commands Every esxcli...

Страница 49: ...g esxcli commands remotely you must specify a target ESXi host or vCenter server and provide the user credentials for the command The following are methods available to perform user authentication Usi...

Страница 50: ...to the DCUI Log in to the ESXi host DCUI Select Troubleshooting Mode Options Select Enable ESXi Shell and press return Press Alt F1 to access the ESXi Shell Figure 55 Enable ESXi Shell from DCUI Enabl...

Страница 51: ...irectly from the ESXi console you can also enable SSH services to allow remote access to the ESXi Shell The following section shows how to enable SSH access to the ESXi Shell Enabling SSH from the DCU...

Страница 52: ...Sphere Client Perform the following steps to enable the ESXi Shell from the vSphere Client Log in to the vSphere Client Select the ESXi host and choose Configuration Security Profile From the Services...

Страница 53: ...the vCLI installer package for Windows on a supported Windows server and launch the installer Refer to Chapter 2 of the Getting Started with vSphere Command Line Interfaces guide for information on ho...

Страница 54: ...cli system hostname set host tm pod01 esx01 domain tmsb local command to set the host name and domain name of the ESXi host Then use the esxcli system hostname get command to display the host name and...

Страница 55: ...0 Evaluation Guide Volume One Figure 62 Display Storage Devices from the ESXi Shell Use the esxcli network ip interface ipv4 get command to list all the configured IPv4 addresses on the ESXi host as f...

Страница 56: ...Here we provide the server option but let it prompt for the user name and password as follows Figure 64 esxcli hardware memory get Command from vMA Use the esxcli server tm pod01 esx01 user root stora...

Страница 57: ...the esxcli system coredump partition list command to show the configured core dump partition Figure 67 Display core dump partition list from vMA In the following example we will connect to the vCenter...

Страница 58: ...in the output In the following example we need to generate a report showing all the configured interfaces on a host along with the vSwitch and port group to which they are assigned We start by runnin...

Страница 59: ...d The localcli command is equivalent to esxcli with the exception that it bypasses hostd The localcli command is only intended for situations when hostd is unavailable and cannot be restarted After yo...

Страница 60: ...e esxcli storage help command as follows Figure 73 esxcli Namespaces Under Storage from ESXi Shell We see here that there is a filesystem name space Next we look to see what namespaces and commands ar...

Страница 61: ...ard to extrapolate the VMFS version information needed for our report We can use the formatter option with the format param filter to show only the information we need as follows Figure 76 esxcli stor...

Страница 62: ...m In order to support the installation of vSphere PowerCLI to a desktop system the following prerequisite software packages must be present Windows NET Framework 3 5 Windows PowerShell V2 recommended...

Страница 63: ...hat you change this to the correct setting for your organization Enter get help about_Execution_Policies at the PowerShell prompt In this guide we will change the execution policy to RemoteSigned From...

Страница 64: ...our 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 Figure 81 Notification...

Страница 65: ...you that this will need to be set to RemoteSigned before vSphere PowerCLI will execute correctly Click the Continue button If the execution policy is set correctly this box will not appear This will...

Страница 66: ...VMware Patents Screen Click Next to continue This will bring you to the following License Agreement screen Figure 85 License Agreement Screen Select the option I accept the terms in the license agreem...

Страница 67: ...you would like to install vSphere PowerCLI onto and the folder name or leave this set as the recommended path and click Next This will bring you to the following Ready to Install screen Figure 87 Rea...

Страница 68: ...on is completed Figure 89 Installation Finish Screen When the installation is successful the finish screen will be displayed To complete the installation click Finish The vSphere PowerCLI installation...

Страница 69: ...tals of both vSphere PowerCLI and PowerShell and will aid in the learning process when starting out with vSphere PowerCLI This guide will show examples of vSphere PowerCLI and PowerShell code but will...

Страница 70: ...ge the VMware environment as follows Figure 91 Connecting to vCenter Server Use the Connect VIServer cmdlet to connect to your vCenter Server A user and password parameter can be used with this cmdlet...

Страница 71: ...pt You are then ready for your next cmdlet to be executed as follows Figure 92 Certificate Warning During this vSphere PowerCLI by Example section the certificate warning can be ignored Once you are c...

Страница 72: ...session containing more information about the virtual machine Figure 94 To find out more information about the object being returned by vSphere PowerCLI use the Get Member cmdlet to retrieve a list of...

Страница 73: ...choose the properties of the virtual machine we would like returned Type Get VM Select Name PowerState VMHost NumCPU MemoryMB Format Table This will retrieve the selected properties and show them in a...

Страница 74: ...the information into a plain text file type Get VM Out File C Export AllVMs txt Figure 97 To create a new virtual machine the New VM cmdlet can be used This has many parameters that can be used to spe...

Страница 75: ...M cmdlet can also be used to create any number of virtual machines with the same configuration The following example shows how to create 10 new virtual machines with the same configuration In the foll...

Страница 76: ...To find more information on one of these cmdlets type Get Help Move VM Full Figure 100 To list all hosts attached to the current connection type Get VMHost Figure 101 To list all virtual machines att...

Страница 77: ...epeat this for each host To do this in vSphere PowerCLI type Get VMHost Get VMHostNTPServer Figure 103 Snapshot information gathering is a time consuming part of any virtual administrator s job Snapsh...

Страница 78: ...st be created one at a time With vSphere PowerCLI you can specify the criteria for your virtual machines and use the New Snapshot cmdlet to create a snapshot on each virtual machine The following exam...

Страница 79: ...Patch Tuesday Get Snapshot Name Patch Tuesday Remove Snapshot Figure 106 To list the available cmdlets for working with snapshots type Get ViCommand Snapshot Figure 107 Networking is also a key area...

Страница 80: ...e Distributed Resource Scheduler DRS The preceding example shows how the configuration of each host vSwitch and port group can be checked To perform this type the following Get VMHost Get VirtualSwitc...

Страница 81: ...ables and rule sets define port rules for each service For remote hosts you can specify the IP addresses or range of IP addresses that are allowed to access each service Evaluation Overview In this ex...

Страница 82: ...rning sign on the host tm pod01 esx01 tmsb local is regarding the SSH service Figure 111 shows the summary screen with the warning displayed Enabling SSH service could be a security risk so the platfo...

Страница 83: ...E C H N I C A L W H I T E P A P E R 8 3 VMware vSphere 5 0 Evaluation Guide Volume One Figure 111 5 To stop the service you have to click the Services Properties link as shown in Figure 112 Figure 11...

Страница 84: ...6 This will bring up the panel shown in Figure 113 Select SSH and click Options You can start or stop any services that are listed in this panel Figure 113 Figure 114 7 Because this service was alread...

Страница 85: ...st if any client can connect to Host1 tm pod01 esx01 tmsb local on TCP port 22 In this example environment you can use virtual machine VM_02 running on Host3 tm pod01 esx03 tmsb local to establish a S...

Страница 86: ...SXi firewall In the following section you will enable the SSH service and then use firewall settings to provide selective remote access Creating Firewall Rules to Block SSH Access Before creating the...

Страница 87: ...ne Figure 117 Figure 118 3 Click Start in the SSH Options panel as shown in Figure 118 This will start the SSH service again You can now configure the firewall rules for this service 4 Click firewall...

Страница 88: ...T E C H N I C A L W H I T E P A P E R 8 8 VMware vSphere 5 0 Evaluation Guide Volume One Figure 119 Figure 120...

Страница 89: ...llow connections field shown in Figure 121 Figure 121 After configuring the firewall rule to allow remote access for only virtual machine VM_02 you can test this firewall setting by establishing PuTTY...

Страница 90: ...E C H N I C A L W H I T E P A P E R 9 0 VMware vSphere 5 0 Evaluation Guide Volume One Figure 122 Figure 123 shows the login screen of Host1 You can log in to the host with root credentials Figure 12...

Страница 91: ...e 5 0 environment A past challenge with ESXi has been the static nature of the vSphere installation image As customers adopt new hardware and as vendors release updates to CIM providers and software d...

Страница 92: ...PowerCLI by Example section of this guide for more information on installing vSphere PowerCLI Download the ESXi Offline Bundle Download the ESXi Offline Bundle ZIP file from www vmware com The offlin...

Страница 93: ...redentials you might be prompted to enter the vCenter user name and password as follows Figure 127 Connect VIServer Login Prompt vSphere PowerCLI will show the vCenter Server name IP and the port and...

Страница 94: ...a collection of vSphere packages used to create and maintain ESXi images The following steps show how to view information about the software depots added to your vSphere PowerCLI session Display Soft...

Страница 95: ...ge Figure 131 Get EsxSoftwarePackage Display Image Profiles An image profile is a compilation of VIBs that make up an ESXi image that can be used to install an ESXi host At a minimum an image profile...

Страница 96: ...The image profile must have a unique name The image profile must contain at least one base ESXi VIB and one bootable kernel module The acceptance level for each VIB must match the acceptance level de...

Страница 97: ...net e1000e to MyNewProfile as follows PowerCLI C Add EsxSoftwarePackage ImageProfile MyNewProfile SoftwarePackage net e1000e Figure 136 Add EsxSoftwarePackage net e1000e Next display the available im...

Страница 98: ...ClonedProfile Figure 139 New EsxImageProfile CloneProfile Display the list of available image profiles confirming that the new profile was created PowerCLI C Get EsxImageProfile Figure 140 Get EsxImag...

Страница 99: ...ceProfile but does exist in the comparison profile Comparison Profile Export Image Profile The following steps show how to export image profiles as an offline bundle or as a bootable ISO image Export...

Страница 100: ...option PowerCLI C Export EsxImageProfile ImageProfile MyNewProfile ExportToIso FilePath C ImageBuilder MyNewProfile iso Figure 144 Export EsxImageProfile ExportToIso Use Windows Explorer to view the Z...

Страница 101: ...quick overview of the current health of your datastores There are two different types of views performance and space This next section will display how easy datastore monitoring is with vSphere 5 0 T...

Страница 102: ...This will show you the current Space Utilization statistics for this particular datastore by default Figure 148 4 Click on Time Range to change the range from 1 Day to 1 Week This will show if virtua...

Страница 103: ...statistics available on the Datastores and Datastore Clusters view These views are showing the most relevant and important metrics to monitor like Average Device Latency 8Average Write Latency per Vi...

Страница 104: ...T E C H N I C A L W H I T E P A P E R 1 0 4 VMware vSphere 5 0 Evaluation Guide Volume One Figure 152 4 You have now successfully completed the Using Storage Performance Statistics exercise...

Страница 105: ...unity http communities vmware com community developer windows_toolkit or type Get VIToolkitCommunity within PowerCLI PowerCLI Blogs http blogs vmware com vipowershell VMware Contact Information For ad...

Страница 106: ...national copyright and intellectual property laws VMware products are covered by one or more patents listed at http www vmware com go patents VMware is a registered trademark or trademark of VMware In...

Отзывы: