ADVANCED SERVER VIRTUALIZATION VMware and Microsoft Platforms in the Virtual Data center phần 8 ppt

73 430 0
ADVANCED SERVER VIRTUALIZATION VMware and Microsoft Platforms in the Virtual Data center phần 8 ppt

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

516  Advanced Server Virtualization be executed from a command line, where parameters, switches, and arguments are passed. It can also be leveraged and called from within a script. It provides a number of features and multiple ways of automating management of virtual disks that were not possible in earlier versions of GSX Server.  e virtual disk manager can be used to:  Create a stand-alone virtual disk fi le without creating a new virtual ma- chine.  Convert a virtual disk type from fi xed to dynamic or vice versa. Or convert a virtual disk from a single fi le to a 2GB split fi le or vice versa.  Expand the size of a virtual disk so that it is larger than the size it was originally created with.  Defragment a dynamically expanding virtual disk.  Prepare and shrink a dynamically expanding disk on a Windows host serv- er while the virtual machine is powered off .  Rename and/or relocate a virtual disk.  e VMware Virtual Disk Manager tool is executed from either a command prompt or a terminal on the GSX Server host. On a Windows host server, the program is located in the following directory by default: C:\Program Files\VM- ware\VMware GSX Server. To run the program, execute the following com- mand: vmware-vdiskmanager.  ere are a number of parameters and switches than can be passed. A list of these options and examples can be displayed by executing the tool without passing in any parameters. Some of the key features are described in detail below. Enlarge a Virtual Disk One key feature is the ability to enlarge a virtual disk so its maximum capacity is larger than when it was originally created. All too often, a virtual disk is cre- ated without any size planning involved or found to be improperly sized after the fact. Once the operating system and applications are installed, the disk size starts to quickly fi ll up and may approach its maximum size.  e virtual disk manager tool provides a way to expand the disk fi le to a more appropriate size. It is important to note that the size specifi ed is the new size of the disk, not how much it should increase.  e following example illustrates how to expand an existing disk, origDisk, to a new maximum capacity of 25GB. vmware-vdiskmanager -x 25GB origDisk.vmdk When you enlarge or expand the virtual disk’s capacity, VM- ware immediately recognizes the new disk and fi le size. How- ever, the partitions on the guest operating system remain unchanged. On a Windows guest operating system, if you Marshall_AU3931_C022.indd 516Marshall_AU3931_C022.indd 516 4/13/2006 1:45:35 PM4/13/2006 1:45:35 PM VMware GSX Server Advanced Topics  517 look at Disk Management, the system should now have an unallocated amount of disk space equal to the diff erence between the new maximum capacity size and the original amount of allocated partition space. If you wish to resize the original partition, you will need a third-party tool such as Partition Magic, QtParted for Linux or for a Window’s guest operating system, Microsoft’s DiskPart tool that comes with Windows XP Profes- sional and Windows Server 2003 and is available in the Resource Kit for Windows 2000 Server. Prepare and Shrink a Virtual Disk Another key feature is the ability to shrink a dynamically expanding virtual disk fi le located on a Windows host server. Shrinking a virtual disk should not be confused with decreasing an existing disk’s maximum capacity. Instead, it should be understood that shrinking a virtual disk simply means that it is reclaiming unused space on the disk. When a fi le is deleted, most operating systems do not immediately overwrite the actual data. Rather, they update the fi le system table to refl ect that the fi le is no longer there. To reclaim the space, the old data needs to be zeroed out on the virtual disk.  is is a two step process.  e fi rst step is to prepare each volume on the disk for shrinking.  e volume can be mounted by using a third-party tool such as the VMware DiskMount Utility. Once the volume is mounted, the virtual disk manager can prepare the disk for shrinking. For example, if the volume is mounted on the M: drive, the following command should be executed: vmware-vdiskmanager -p M: Once the preparation is complete, unmount the volume.  is is repeated for each volume on the virtual disk that needs to go through the shrinking process. After preparing all the volumes on the virtual disk, the next step is to actually shrink the disk. As an example, the following command will shrink the virtual disk named origDisk: vmware-vdiskmanager -k origDisk.vmdk Converting a Virtual Disk A fi nal key feature discussed is the ability to convert a fi xed disk to a dynamically expanding disk and vice versa. Sometimes, it is diffi cult to decide whether or not a pre-allocated disk or a growable disk is needed in any given circumstance. In the past, if the wrong choice was made, it was painful to fi x and had to be done with using third-party tools.  e virtual disk manager now allows an easy way to convert from one type to the other.  e following example converts a fi xed disk to a dynamically expanding disk: vmware-vdiskmanager -r -t 0 sourceDisk.vmdk targetDisk.vmdk Marshall_AU3931_C022.indd 517Marshall_AU3931_C022.indd 517 4/13/2006 1:45:35 PM4/13/2006 1:45:35 PM 518  Advanced Server Virtualization Virtual Networking Virtual networking is an important component of GSX Server and it allows a wide range of confi gurations to take place. However, it is possible to create a virtual machine that has no communication with any other server, physical or virtual. While that scenario may be likely in a workstation class virtualization environment, it is probably less true in a server class virtualization environment such as GSX Server. It is more likely the virtual machine will need to interact with other servers to share fi les, applications, Web pages, printers or to act as a proxy server or fi rewall. A virtual machine may also need access to the internet or the ability to host services for other machines outside of its LAN.  is section will outline the concepts behind networking in GSX Server and cover the vari- ous components needed to get a basic network up and running. Virtual Network Components Before confi guring a virtual network, it is important to gain an understanding of the various networking components that GSX Server has to off er. As mentioned in previous chapters, VMware off ers three types of network confi guration: bridged, NAT and host-only networking. In order to facilitate these confi gura- tions, VMware makes use of the virtual switch, the virtual network adapter and in some cases a virtual DHCP server. Bridged Networking A bridge allows a virtual machine to access a network being used by the host server.  e easiest way to think of a bridge is to consider the virtual network adapter in the virtual machine as being connected to the physical Ethernet adapter in the host server. Host-Only Networking  e host virtual adapter creates a virtual Ethernet LAN on the host server that allows communication between the host server and the virtual machines on that host server. By default, the host virtual adapter is not connected to any external network. NAT Networking A NAT (network address translation) device enables communication between virtual machines and the external network. Using a NAT device becomes ex- tremely advantageous when there is a limited amount of IP addresses available on the physical network and those IP addresses are being used by the physical servers. Marshall_AU3931_C022.indd 518Marshall_AU3931_C022.indd 518 4/13/2006 1:45:36 PM4/13/2006 1:45:36 PM VMware GSX Server Advanced Topics  519 Virtual Switch A virtual switch is similar to a physical switch in that it connects networking components together. A virtual switch can be connected to the physical network or it can be completely virtual and therefore isolated from the outside network. GSX Server allows a total of 10 switches on a Windows host server and up to 100 switches on a Linux host server. And each switch can have one or more virtual machines connected to it at any given time. Since each virtual machine has its own virtual network adapter that is connected to the virtual switch, the GSX Server network basically becomes an extension of the physical network it is connected into.  e virtual network can therefore become as simplistic or complex as needed. Virtual switches are identifi ed or labeled as VMnet[N], where [N] is a nu- meric value between 0 and 9 on a Windows host server and 0 to 99 on a Linux host server. By default, a few of the switches are assigned specifi cally named confi gurations. Out of the box, the bridged network normally uses VMnet0, the host-only network uses VMnet1, and the NAT network uses VMnet8.  ese defaults can be changed if necessary. DCHP server  e DHCP (dynamic host confi guration protocol) server is useful when virtual machines are confi gured to use host-only or NAT confi gurations.  e DHCP server provided by VMware works very much like a DHCP service confi gured in a Windows or Linux operating system. It provides a range of IP addresses to virtual machines that are not bridged to an external network. Network adapter A single virtual network adapter is added to each virtual machine that is created. In fact, up to three virtual network adapters can be confi gured in each virtual machine. Generally, a single virtual adapter per virtual machine is all that is necessary. So if a virtual machine only needs a single adapter, why would VMware allow for up to three adapters on a single virtual machine?  e most common answer is for routing or security purposes. If you need to multi-home your virtual machine (allow it to access more than one subnet), it will need to be confi gured with multiple adapters assigned to diff erent virtual switches. And for secu- rity reasons, you may want to create a more complex virtual network that uses a virtual machine to act as a fi rewall to isolate segments and control the traffi c that can pass through. Just like a physical network, you have a number of options available to confi gure your virtual network. Marshall_AU3931_C022.indd 519Marshall_AU3931_C022.indd 519 4/13/2006 1:45:36 PM4/13/2006 1:45:36 PM 520  Advanced Server Virtualization As previously explained, there are two types of network adapters: the AMD PC/NET 32 compatible NIC that uses the vlance driver and the VMware PCI Ethernet Adapter that uses the vmxnet driver. When a new virtual machine is created, the default network adapter is the AMD PC/NET 32 device. Of the two adapters, it off ers more compatibility with a wider support of guest operat- ing systems.  e VMware PCI Ethernet Adapter does not off er native support in any guest operating system. It requires a VMware specifi c driver that must be installed, either manually or by installing the VMware Tools. For the trouble and eff ort of installing the vmxnet driver, it off ers better performance, most notice- ably if the host adapter is Gigabit Ethernet. GSX Server Network Confi gurations  e three types of networking confi gurations found in GSX Server have already been identifi ed and described in the previous section.  e following will attempt to go into more detail and illustrate the confi gurations that are automatically created when the standard networking options are selected in the New Virtual Machine Wizard or when making a change in the virtual machine settings edi- tor. In each of these confi gurations, a Windows host can connect an unlimited number of virtual devices to a virtual switch, while a Linux host can only con- nect up to 32 devices. Bridged Networking If the host server is on an Ethernet network, bridged networking is probably the easiest way to connect the virtual machine to the local area network and to the internet. It is as easy as installing an Ethernet adapter into a physical server and joining it into the LAN. A Linux host server can use bridged networking to connect to a wired network while a Windows host server can connect to either a wired or a wireless network. Keep in mind, when using bridged networking, the virtual machine has two-way communication on the LAN.  at means, it can access other equipment on the network and it can be contacted by other equipment on the network. Figure 22.10 depicts a host server and three virtual machines using bridged networking. It is important to note, if you choose bridged networking, your virtual machines need to have their own unique network identity.  is typically means that the virtual machines need their own IP address. You cannot share an IP address with the host server or another machine on the network. Always consult with the network administrator for an available IP range or make use of a DHCP server in the network. Selecting an IP address that is assigned to another Marshall_AU3931_C022.indd 520Marshall_AU3931_C022.indd 520 4/13/2006 1:45:36 PM4/13/2006 1:45:36 PM VMware GSX Server Advanced Topics  521 device on the network will lead to IP confl icts and cause intermittent net- work problems that may be troublesome to diagnose. When should bridged networking be used?  When the LAN is Ethernet  When the LAN has enough free IP addresses to use  When virtual machines need Internet and LAN access  When virtual machines are hosting applications Network Address Translation (NAT) Networking NAT networking is similar to host-only networking but with the added feature of network address translation, which allows the virtual machine to transcend the private network and communicate with the external LAN as well as the Internet. When unable to assign virtual machines an IP address on the external network, NAT is a good alternative to bridged networking. When using this type of networking, the guest operating system does not have its own IP address on the external network. Instead, a private network is set Host Server with VMware GSX Server Physical Network Adapter Virtual Machine 1 Virtual Machine 2 Virtual Machine 3 Virtual Switch VMnet0 Firewall LAN Internet Virtual Network Adapter Virtual Network Adapter Virtual Network Adapter Figure 22.10 VMware GSX Server Bridged Networking Confi guration. Marshall_AU3931_C022.indd 521Marshall_AU3931_C022.indd 521 4/13/2006 1:45:36 PM4/13/2006 1:45:36 PM 522  Advanced Server Virtualization up on the host server, much like the host-only network, and the guest operating system receives an internal IP address from the VMware virtual DHCP server.  e virtual machines then communicate with a router node, the VMware NAT device, which passes network data between one or more virtual machines and the external network. Communication across the NAT device is recorded in a translation table and the traffi c is then funneled back to the correct destination. Figure 22.11 shows a typical NAT networking confi guration. Notice the extra NAT node and its placement. NAT will allow virtual machines to use many standard TCP/IP protocols to communicate with other machines on the external network. For example, it can open a Telnet or FTP session on another computer. Unfortunately, a problem with NAT networking is the default confi guration does not allow computers on the external network to initiate connections to the virtual machines.  at means, the default confi guration does not allow a virtual machine to act as a Web server or an FTP server because it only allows the opening of an initial con- nection from a client behind the NAT node and not from a computer on the external network or the Internet. When should NAT networking be used? Host Server with VMware GSX Server Physical Network Adapter Virtual Machine 1 Virtual Machine 3 Virtual Switch VMnet1 Firewall LAN Internet Virtual Machine 2 Virtual DHCP Server NAT Module Virtual Network Adapter Virtual Network Adapter Virtual Network Adapter Figure 22.11 VMware GSX Server Network Address Translation (NAT) Networking Confi guration. Marshall_AU3931_C022.indd 522Marshall_AU3931_C022.indd 522 4/13/2006 1:45:37 PM4/13/2006 1:45:37 PM VMware GSX Server Advanced Topics  523  When connecting to Token Ring adapters—Bridged only works with Eth- ernet  When external network IP addresses are not available  When virtual machines need Internet and LAN access  When a Linux host uses a wireless networking adapter  When securing virtual machines from network attacks is an issue Host-only Networking Unlike bridged networking, host-only networking provides a network connec- tion between the host server and the virtual machines located on that server. It uses a virtual Ethernet adapter that is visible to the host operating system.  e entire network infrastructure is virtual and isolated from everything outside of the host server. Only the virtual machines on the host and the host virtual adapter are connected to a private TCP/IP network. Communication is not only allowed between the host server and the virtual machines, but also between virtual machines located on the same host. Addresses on this private network are provided by the VMware DHCP server. Figure 22.12 shows a host-only network and depicts how the network is completely contained within the host server and isolated from the LAN. Host Server with VMware GSX Server Physical Network Adapter Virtual Machine 1 Virtual Network Adapter Virtual Machine 3 Virtual Switch VMnet1 Firewall LAN Internet Virtual DHCP Server Virtual Machine 2 Virtual Network Adapter Virtual Network Adapter Figure 22.12 VMware GSX Server Host-Only Networking Confi guration. Marshall_AU3931_C022.indd 523Marshall_AU3931_C022.indd 523 4/13/2006 1:45:37 PM4/13/2006 1:45:37 PM 524  Advanced Server Virtualization When should host-only networking be used?  When isolating virtual machines from systems outside the host computer  When the host itself is already isolated Host-only and NAT DHCP Server One of the most tedious tasks for a network administrator to perform is to man- ually enter the IP address, subnet mask and other networking information on an operating system so that the new server can communicate with the network when it comes online.  e answer is the Dynamic Host Confi guration Protocol (DHCP). In order to ease this process, a virtual DHCP server is automatically installed with GSX Server. Since host-only and NAT networking use a private virtual network, each virtual machine and the host must be assigned addresses on the private network.  is is usually accomplished with the VMware DHCP server, although addresses can also be assigned statically from a pool of addresses that are not used by the DHCP server. For a list of address assignments on a private VMware class C network, see Figure 22.13.  e VMware DHCP server does not service DHCP requests from virtual or physical servers residing on a bridged net- work. Host-Only Network IP Range Address Use Example x.x.x.1 Host server 192.168.0.1 x.x.x.2 - x.x.x.127 Static addresses 192.168.0.2 - 192.168.0.127 x.x.x.128 - x.x.x.253 DHCP addresses 192.168.0.128 - 192.168.0.253 x.x.x.254 DHCP server 192.168.0.254 x.x.x.255 Broadcast 192.168.0.255 NAT Network IP Range Address Use Example x.x.x.1 Host server 192.168.0.1 x.x.x.2 NAT node 192.168.0.2 x.x.x.3 - x.x.x.127 Static addresses 192.168.0.3 - 192.168.0.127 x.x.x.128 - x.x.x.253 DHCP addresses 192.168.0.128 - 192.168.0.253 x.x.x.254 DHCP server 192.168.0.254 x.x.x.255 Broadcast 192.168.0.255 Figure 22.13 Address Assignments for Host-Only and NAT Networking. Marshall_AU3931_C022.indd 524Marshall_AU3931_C022.indd 524 4/13/2006 1:45:38 PM4/13/2006 1:45:38 PM VMware GSX Server Advanced Topics  525 Generally speaking, a randomly assigned DHCP address is the norm for vir- tual machines that are used infrequently or for a short period of time. A good example of a dynamic virtual machine is a test server. Typically, the virtual ma- chine is confi gured and powered on to run a specifi c test. And when that test is successful, the virtual machine is usually powered off and recycled. If however a virtual machine is static and used for extended periods of time, it is probably a better idea to statically assign it an IP address or to confi gure the DHCP server to always assign the same IP address to each of these virtual machines.  is can be accomplished by assigning each virtual machine a static MAC address and then confi guring the DHCP server to always assign an IP based on that MAC address. As an example, to assign IP address 192.168.0.128 to a virtual machine named “StaticVM” with a MAC address of 00:50:56:01:02:03, the following can be added to the VMware DHCP confi guration: host StaticVM { hardware Ethernet 00:50:56:01:02:03; fi xed-address 192.168.0.128; } Confi guring the DHCP server VMware’s DHCP server can be confi gured by manually editing its confi guration fi les or on a Windows host server by using the GUI. See Figure 22.14. On a Linux host server, the DHCP confi guration fi le and lease fi le can be modifi ed by editing them directly with a standard text editor.  e default con- fi guration and lease fi les are located at: /etc/vmware/vmnet[N]/dhcp/dhcp.conf /etc/vmware/vmnet[N]/dhcp/dhcp.leases Where [N] is the vmnet network, i.e., host-only is vmnet1 and NAT is vmnet8 On a Windows host server, the DHCP confi guration fi le and lease fi le can be modifi ed by editing them directly with a standard text editor.  e default confi guration and lease fi les are located at: C:\Documents and Settings\All Users\Application Data\VMware  e two fi les are respectively named vmnetdhcp.conf and vmnetdhcp.leases On a Windows host server (see Figure 22.14), the DHCP server can also be confi gured by using the Virtual Network Editor by selecting Host > Virtual Network Settings > DHCP. DHCP and NAT Networking One additional diff erence between host-only and NAT networking is the ad- ditional confi guration information supplied by the DHCP server for NAT Marshall_AU3931_C022.indd 525Marshall_AU3931_C022.indd 525 4/13/2006 1:45:38 PM4/13/2006 1:45:38 PM [...]... as the paging from RAM to disk increases GSX Server for Windows also allows the changing of the priority that the Windows process scheduler gives to the virtual machines It affects the performance of both, the virtual machines and the Windows host server An administrator can change the priority settings by selecting Host > Settings > Priority and using the drop-down lists Change Input grabbed from either... include the server software, the console, the management interface, and the scripting APIs Uninstalling the server software and components does not delete the virtual machines 1 To begin the uninstall process, choose Add/Remove Programs in the Windows Control Panel, select the VMware GSX Server Installer, and then click Change 2 After the master installer launches, click Next 3 Select Remove and then click... using the RPM installer then the current product needs to be uninstalled before upgrading to the new version Uninstall the RPM Package To uninstall the current GSX Server installation created with the RPM package, open a terminal and log in as root Remove the software by running the following command (used to uninstall both the server software and the VmPerl API if installed): rpm –e VMware- gsx To uninstall... GSX Server for Windows 526 Advanced Server Virtualization 4/13/2006 1:45: 38 PM VMware GSX Server Advanced Topics 527 networking This information includes the default gateway and the DNS server The DHCP server sets the virtual machine’s default gateway and DNS server to the IP address of the NAT node (x.x.x.2) This causes all outbound IP packets and DNS requests to be forwarded to the NAT node The NAT... operating system is selected for each virtual machine created Based on the selection, GSX Server optimizes certain internal configurations Making the wrong selection probably won’t cause a virtual machine to run incorrectly, but it may degrade the virtual machine’s performance For example, when creating a new Windows Server 2003 virtual machine in the New Virtual Machine Wizard and selecting Microsoft Windows... shut down the guest operating system, and finally power off the virtual machine It is important to perform this action while the current version is still installed If the virtual machine is left in a suspended state and the host server is upgraded, the virtual machine can only be powered on by discarding or losing the saved Marshall_AU3931_C023.indd 547 4/13/2006 1:46:35 PM 5 48 Advanced Server Virtualization. .. not allow it VMware recommends that licenses in the registry be maintained 4 The uninstaller may offer to remove log -in information for the virtual machines, do not allow it Removing the log -in information will change the virtual machine’s configuration to run as the user that powers on the virtual machine rather than a specific user 5 Once the current product has been removed, the host server should... affect the virtual machines 1 To uninstall the server software, go to Start > Programs > VMware > VMware GSX Server Uninstallation and follow the onscreen instructions 2 To remove the VMware Management Interface, use Add/Remove Programs in the Windows Control Panel, select VMware Management Interface, click Change/Remove, and follow the onscreen instructions to remove the application 3 To remove the VMware. .. processor(s) the better To make the best use of the processors on a GSX Server host, it is best to not share the server with any other running applications In other words, dedicate the server host to being a virtualization platform host rather than also using it as a Web server, a database server, or a file server for other applications Debugging Mode A virtual machine hosted in GSX can be configured to run in. .. after the upgrade, the virtual machines will be configured to run as the user that powers on the virtual machine rather than a specific user 7 To complete the uninstallation process, click Finish once all components are removed 8 The host server should then be rebooted to complete the uninstallation process Upgrading the Linux Host Server VMware GSX Server for Linux provides two installation packages, the . the virtual machines and the Windows host server. An adminis- trator can change the priority settings by selecting Host > Settings > Priority and using the drop-down lists.  Change Input. Server 2003 virtual machine in the New Virtual Machine Wizard and selecting Microsoft Windows as the guest operating system, make sure to select the proper version in the drop-down list rather than. located in the VMware GSX Server folder while the Linux version is named vmnet-sniff er and is located in your VMware bina- ry directory. To run the utility, from a command-line, enter in the program

Ngày đăng: 08/08/2014, 21:21

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan