</p> <p>A third approach might be to synchronize the ESX Server hosts and the PDC Emulator operations master with the same external time server and then to enable the VMware Tools option for synchronization. In this case both the native W32Time service and the VMware Tools should be adjusting the time to the same value. </p> <cite> <div class="title">Configuring NTP on ESX Server </div> <p>By tweaking the Service Console firewall and editing a few files, you can configure an ESX Server to consistently synchronize with an external time server. Perform the following steps to synchronize an ESX host with a set of external time servers:</p> <p>1. From a console with root permission, enter the following command to open the required ports</p> <p>for allowing the NTP daemon to communicate with an external time server:</p> <p> <code># esxcfg-firewall --enableService ntpClient</code> </p> <p>or</p> <p> <code># esxcfg-firewall -e ntpClient</code> </p> <p>where -e is shorthand for -enableService).</p> <p>2. Once the firewall port has been opened, you must edit the /etc/ntp.conf file to include</p> <p>the address or addresses of the external time server(s). Edit ntp.conf to include the following</p> <p>uncommented lines:</p> <p> <code>Restrict 127.0.0.1</code> </p> <p> <code>Restrict default kod nomodify notrap</code> </p> <p> <code>server <em>name.of.time.server.1</em> </code> </p> <p> <code>server <em>name.of.time.server.2</em> </code> </p> <p> <code>driftfile /var/lib/ntp/drift</code> </p> <p>3. Edit the /etc/ntp/step-kickers file to include all of the names of the time servers that were configured in the ntp.conf file.</p> <p>4. Edit the /etc/hosts file to define name to IP addresses for the time servers. If an existing DNS server is capable of providing the name resolution, the last step does not have to be performed.</p> </cite> <p>Use the following steps to install the VMware Tools on a Linux host: </p> <p>1. Use the VI Client to connect to a VirtualCenter or an individual ESX Server host.</p> <p>2. Right-click the virtual machine in the inventory tree and select the Install VMware Tools option.</p> <p>3. If a warning message is displayed, click OK.</p> <p>4. Open a terminal window and change directories to the location of the VMware Tools mount point using the following commands:</p> <p> <code>[root@rhel5-1 /]# cd /media/"VMware Tools"</code> </p> <p>5. Copy the gzip tar file to a temporary directory and then change to the temporary directory using the following commands:</p> <p> <code>[root@rhel5-1 VMware Tools]# cp VMwareTools-3.0.x-nnnn.tar.gz /tmp</code> </p> <p> <code>[root@silo104 VMware Tools]# cd /tmp</code> </p> <p>6. Extract the contents of the tar file. By default, the file will extract to a directory named vmware-tools-distrib.</p> <p>7. Change to the vmware-tools-distrib directory and run the vmware-install.pl Perl script using the following commands:</p> <p> <code>[root@rhel5-1 tmp]#cd vmware-tools-distrib</code> </p> <p> <code>[root@rhel5-1 vmware-tools-distrib]# ./vmware-install.pl</code> </p> <p>Figure 6.20 shows the commands for steps 4 through 7.</p> <img src=#i_224.png" > <p> <strong>Figure 6.20</strong>Installing the VMware Tools for Linux from the command line involves extracting the tools and running the install file.</p> <empty-line > <p>8. After the Perl script completes, restart the X session using startx.</p> <p>9. Start the VMware Tools running in the background of an X server session using the following command:</p> <p> <code>[root@silo104~]# /usr/bin/vmware-toolbox &</code> </p> <p>10. Remove the tar file copy and the extracted directory using these commands:</p> <p> <code>[root@silo104~]# rm /tmp/VMwareTools-3.0.x-nnnn.tar.gz</code> </p> <p> <code>[root@silo104~]# rm -rf /tmp/vmware-tools-distrib</code> </p> <cite> <div class="title">VMware Tools for Linux </div> <p>When installing the VMware Tools to a Linux guest operating system, the path to the tar file and the numbers in the tar filename will vary.</p> </cite> <p>You can determine the existence of VMware Tools by checking for the icon displayed on the notification bar inside the guest operating system or by using the VI client. As shown in Figure 6.21, the Summary tab of a virtual machine object identifies the status of the VMware Tools as well as other information such as operating system, CPU, memory, DNS (host) name, IP address, and current host.</p> <img src=#i_225.png" > <p> <strong>Figure 6.21</strong>You can view details about VMware Tools, DNS name, IP address, and so forth from the Summary tab of a virtual machine object.</p> <div class="title"> <p>Managing and Modifying Virtual Machines</p> </div> <p>Just as physical machines require upgrading of hardware, a virtual machine may require scaling up on hardware due to performance demands. Perhaps a new memory-intensive client-server application requires an increase in memory, or a new data-mining application requires a second processor or additional network adapters for a bandwidth-heavy FTP site. In each of these cases, the virtual machine requires a modification of the virtual hardware configured for the guest operating system to use.</p> <p>Modifying a virtual machine requires that the virtual machine exist in a powered-off state for all hardware — except when adding a new hard drive. You can add a new hard drive to a virtual machine with the machine turned off or on. This is a “hot add” process only because a hard disk cannot be removed while the virtual machine continues to run. CD and DVD-ROMs can be mounted and unmounted while a virtual machine is turned on, but new CD/DVD-ROM devices cannot be added. Floppy disk images can be mounted or unmounted while a virtual machine is turned on, but new floppy devices cannot be added. You can assign and reassign adapters to virtual networks while a virtual machine is running, but new adapters cannot be added. Figure 6.22 shows the CD/DVD mapping and the Add Hardware Wizard for a virtual machine. Note how the CD/DVD-ROM can be associated with a new ISO on a datastore; however, adding hardware to a running virtual machine is limited to adding virtual hard drives.</p> <p>As administrators, we are consistently working with virtual machines, but on occasion we have to work directly with the files that make up the virtual machine. By browsing a datastore, as shown in Figure 6.23, or using an SSH session, you'll find there are many files that relate to a working virtual machine.</p> <p>Most often, when dealing directly with virtual machine files, we deal with either the VMX configuration file or the VMDK virtual hard disk file. The VMX file identifies the configuration of the virtual machine with respect to the virtual hardware allocated to the virtual machine. Figure 6.24 shows a sample VMX file for a virtual machine named vdcSQL. Reading through the vdcSQL.vmx file, you will notice that the virtual machine uses the following configuration:</p> <p>♦ A virtual machine named vdcSQL that runs Windows Server 2003 Standard Edition</p> <p>♦ RAM: 1564 MB</p> <p>♦ A single hard drive located at vdcSQL-000001.
Читать дальше
Конец ознакомительного отрывка
Купить книгу