background image

T E C H N I C A L   W H I T E   P A P E R   /   3 8

VMware vSphere 5.0 Evaluation Guide – 

Volume One

 

Figure 36.

 Using the esxcfg-vswitch Command

In order to disrupt the network connection to the host, you can use the esxcfg-vswitch command. Using esxcfg-
vswitch –l, obtain a list of the uplinks that are 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 is the 
name of the switch the uplink is connected to, in order to remove the uplinks from the virtual switch. Ensure that 
you do this for all of the uplinks previously identified. Once completed, verify that all of the uplinks have been 
removed by using the esxcfg-vswitch –l command again.

Summary of Contents for VS4-STD-C - vSphere Standard - PC

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Page 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...

Reviews: