Reprinted from: http://mabofeng.blog.51cto.com/2661587/1019497
In the previous blog post, we installed a powerful VMware vcenter Management Center, connected to the VMware vcenter Management Center via VMware vsphere Client, and the two core components of VSphere are VMware ESXi and VMware Vcen Ter Server. ESXi is the virtualization platform for creating and running virtual machines. VCenter Server is a service that acts as a central administrator for ESXi hosts connected to the network. VCenter Server can be used to join resources from multiple hosts to the pool and manage those resources. VCenter Server also provides a number of features for monitoring and managing physical and virtual infrastructures. The entire virtualization platform can be managed, but also as a virtual machine administrator in the daily life of the virtual machine operations, the same is the virtual machine administrator several common methods to ensure the normal operation of virtual machines. Administrators can use several methods to create and deploy virtual machines to a vsphere datacenter. You can create a single virtual machine and then install the guest operating system and VMware Tools in it. You can clone or create templates in an existing virtual machine, or deploy an OVF template. Use snapshots to capture the state of a virtual machine, including virtual machine memory, settings, and virtual disk conditions. If needed, you can roll back the previous virtual machine state, which reduces the damage to the virtual machine by misoperation. The virtualization platform is being used.
In the virtualization platform, connecting to the VMware vcenter Management Center via VMware vSphere Client is the primary way to operate virtualization at a later stage, all managed through the client or Web client. The main management of a large number of host servers and virtual machines to meet a large number of rapid deployment of virtual machine work, the completion of virtual machine monitoring and snapshot, the virtual machine data transfer and rapid replication, and can be scheduled to automatically daily maintenance of the virtual machine, to solve the virtual machine in peacetime work abnormal phenomenon. These are things that could not have been done on previous physical machines. Due to space and time constraints, in this blog post virtualization series VMware VSphere 5.1 virtual machine Management, the main introduction of the next: First, in ESXi deployment of virtual machine two, virtual machine clone three, re-encapsulate operating system four, create a custom specification five, use the specification to deploy virtual machine VI, Managing virtual machines with Web clinet seven, using workstation 9.0 to manage virtual machines above is the content of this blog, for beginners, this chapter is more important, for the master, this is just a few of the usual operation.
First,
in the
ESXi
deploying virtual Machines in to deploy virtual machines in ESXi, there are 3 ways to connect to VMware vcenter using VMware vSphere Client , establishing virtual machines in VMware vcenter, the 2nd method is to connect directly to ESXi using VMware vSphere client, establish virtual machines in ESXi, but only 1 ESXi servers can be connected at a time. This applies when there is no VMware vcenter or when a VMware vcenter failure occurs. The last one is to connect to the VC using Web client or other means. This method is applicable when the landing port has no corresponding environment etc. Many of these methods can be used to log on to the virtualization platform to manage virtual machines, which is much easier for administrators to manage. Below, we use VMware VSphere client to sign in from the most common method. 1. Connect to VMware vcenter using VMware vSphere Client, enter the domain name or IP address of the VC, and enter a username and password to log in. 2, after the first landing, click Home-List-host and cluster, first create the data center, click Create Data Center. Or, right-click on the VC.Mabofeng.com in the left column and select Create Data center from the popup menu bar. 3, after the completion of the data center, we need to manage 1 or more ESXi hosts through VMware VCenter, right-click on the newly established data, to access the full functionality of the host and simplify the management of multiple hosts, the host must be connected to the VCenter Server system, Also, verify that a firewall-protected host can communicate with the VCenter Server system and all other hosts over Port 902 or other custom-configured ports. Select Add Host. 4. In the Add Host Wizard-Connection settings, enter the name or IP address of the host you want to add to the vcenter, and enter the management account information for the host. VSphere client will use this information to connect to the host and establish a permanent account for its operation, then click Next. 5, the security warning pops up, if you trust the host, select Yes, select No to terminate the Add host. Here is the choice. 6. View the name, model, version, and virtual machine of ESXi in the host summary. Click Next, 7, assign an existing or new license key to this host, and without entering the key, some advanced features default period is 60 trial period. 8, after the VCenter Server control the host, you can choose to enable lockdown mode to disable the administratorRemote access to the account. Ensure that the host is managed only through VCenter Server by selecting this check box. You can perform certain administrative tasks by logging on to the host's local console in lockdown mode. 9. Check the host information, and then click Next. 10. Review the summary information and click Finish. 11. After successfully adding 1 or more ESXi servers, create the virtual machine below. Virtual machines, like physical machines, are software computers that run operating systems and applications. A virtual machine contains a set of specifications and configuration files that are supported by the physical resources of the host. Each virtual machine has a virtual appliance that provides the same functionality as the physical hardware, and is superior in terms of portability, manageability, and security. 12. Right-click any inventory object that is a valid parent of the virtual machine, such as a datacenter, folder, cluster, resource pool, or host, and then select New virtual Machine. 13. In the Set Up Virtual Machine Wizard, select the configuration mode for the virtual machine, and select Custom configuration here. 14. Select the virtual machine name and folder, and give it a unique name when creating the virtual machines. A unique name can differentiate it from the Virtual machine folder or an existing virtual machine in the datacenter. The name must not exceed 80 characters. You can choose the Data center or folder location for your virtual machine based on your organization's needs. Folders provide a way to store virtual machines for different groups in your organization, and you can set permissions for them. If you prefer a flat hierarchy, you can put all your virtual machines in one datacenter and organize them in different ways. 15. Select data storage and select a datastore or datastore cluster to store the virtual machine configuration files and all virtual disks. Each data store may have different sizes, speeds, availability, and other properties. The available data stores can be accessed from the target resource you select. 16. Depending on the host in your environment, you can accept the default ESXi host version of the virtual machine, or select a different version. The default compatibility of the virtual machine is determined by the host on which the virtual machine is created, or by the default compatibility settings on the host, cluster, or datacenter. You can choose other compatibility that differs from the default compatibility. In this 5.1 release, the new virtual machine version 9.17 was not seen, the client operating system was selected, the supported devices, and the number of available virtual CPUs for the virtual machine varied depending on the selected guest operating system. The New Virtual Machine Wizard does not install the guest operating system. The wizard uses this information to select the appropriate default values, such as the amount of memory required. Starting with VSphere 5.1, the guest operating system cannot be changed after the virtual machine is created. 18. When selecting the guest operating system, the BIOS or Extensible Firmware Interface (EFI) is selected by default, depending on the firmware supported by the operating system. The Mac OS X Server guest operating system only supports EFI. If the operating system supports BIOS and EFI, you can create a virtualTo change the default settings from the Options tab of the virtual Machine Properties Editor and then install the guest operating system. If you select EFI, you cannot boot only the BIOS-enabled operating system, and vice versa. Mac OS X Server must be running on Apple hardware. If Mac OS X Server is running on another hardware, its power supply cannot be turned on. 19. Select the number of virtual CPUs in the virtual machine, the number of virtual CPUs that can be added to the virtual machine depends on the number of CPUs on the host and the number of CPUs supported by the client operating system. 20. Set the memory size of the virtual machine. 20, set up the network connection of the virtual machine, in VMware ESXi, when creating the virtual machine support up to 4 network cards. 21. In the SCSI Controller dialog box, select the type of SCSI controller you want to use. Typically, you choose the default. 22. Before you deploy a new virtual machine, you can choose to configure the virtual hardware. When you create a virtual machine, the virtual disk is selected by default. You can use the new Device drop-down menu on the custom Hardware page to add a new hard disk, select an existing disk, or add an RDM disk. When you create a virtual machine, a default virtual hard disk is added. If you do not have enough disk space, you may want to add a boot disk or add another hard disk for other file management purposes. When you add a hard disk to a virtual machine, you can create a virtual disk, add an existing virtual disk, or add a mapped SAN LUN. You can add a virtual hard disk to a virtual machine before or after adding a SCSI controller. The new disk is assigned to the first available virtual device node on the default SCSI controller, for example (0:1). Unless additional controllers are added, only the device nodes of the default SCSI controller are available. Here you choose to create a new disk. 23, set the size of the disk, specify the disk provisioning and data storage location, set interface 2-53 is shown. Where disk provisioning includes three options, the meanings are as follows: thick provisioning delay 0: Create a virtual disk in the default thick format. Allocate the required space for the virtual disk during the creation process. Any data that is persisted on the physical device is not erased on creation, but it is zeroed as needed when the first write operation is performed from the virtual machine. Post Provisioning setting 0: When created, it is allocated to all spaces and the previous data is purged on the physical medium. In addition, when you create a disk, all data needs to be set to 0 and spend more time compared to creating other types of disks. Such a disk is the safest because the disk block has cleared the previous data and has good performance when writing data to disk blocks for the first time. Thin provisioning: meaning that now divides 40GB of space without data, the physical storage that is occupied is 0 space. As disk writing blocks are created, thin disks start small and then grow to pre-set 40GB space. So a thinly provisioned disk uses only the data storage space that the disk originally needed. 24. Select the device node of the disk and the mode that the disk is affected by the snapshot. 25. View the virtual machine configuration to complete the virtual machine setup. 26, after the virtual machine is created, to continue to install the operating system, we will first prepare to install the operating system CD or ISO file. If you want to modify the configuration of a virtual machine, you can click the Edit virtual machine settings option, where you can set up a detailed configuration of the virtual machine. Install the operating system from the CD drive boot, choose to set the virtual machine inside the optical drive settings, in the device type has a client device, host device and data storage ISO file. client device: Refers to the CD/DVD driver of the access terminal using VMware vSphere client, the device must be powered on, and the tool bar is selected " Connect CD/DVD "option. host device: refers to the optical drive device on the ESXi server. data store ISO file: refers to the stored ISO files that ESXi can access, and is the easiest way to deploy the system. After selecting the installation device type, tick the "Connect when power is on" check box. After booting, you can read the disc by selecting the disc boot. 27, although the operating system has been installed, but some of the virtual hardware driver is not installed, the virtual machine driver is different from the physical machine, as long as the installation of VMware Tools, the entire virtual hardware will be driven, VMware Tools is a VMware virtual machine comes with an enhanced tool, Provides drivers that enhance virtual graphics and hard disk performance, as well as synchronize virtual machines with host clocks. Realize the file sharing between host and virtual machine, support the function of free drag and drop, the mouse can move freely before the virtual machine and the host (no more pressing ctrl+alt), and the virtual machine screen can also be realized fullscreen. Therefore, when setting up a virtual machine, be sure to choose the correct operating system, especially the 32-bit and 64-bit distinction, otherwise VMware tools will not install. Installing VMware Tools is as simple as selecting virtual machines > Clients > Installing upgrade VMware Tools on the Control Panel
Second,
cloning of virtual machines a clone of a virtual machine is a copy of the entire state of the original virtual machine, or a mirror. The cloning process does not affect the original virtual machine, the cloning operation once completed, the cloned virtual machine can be isolated from the original virtual machine, and in the cloned virtual machine and the original virtual machine operations are relatively independent, do not affect each other. During cloning, Vcenter generates a different MAC address and UUID from the original virtual machine, which allows the cloned virtual machine and the original virtual machine to appear on the same network without any conflicts. A full clone is a completely separate copy of the original virtual machine, and it does not share any resources with the original virtual machine. Can be used independently from the original virtual machine. when cloning a virtual machine, the VM creates the entire replica, which includes the hardware configuration of the virtual machine, the installed software, the user's settings, the user's files, etc., is a complete copy of the process, In this copy process, you can set some custom properties, such as IP address, computer name, user information, if you use custom specifications, you must set the custom options before cloning. 1. On the virtual machine to be cloned, right-click and select Clone. 2. In the Clone Virtual Machine Wizard, enter a name for the virtual machine and select a location, and then click Next. 3. Select the host on which you want to run the new virtual machine, and click Next. 4. You want stores the data storage location of the virtual machine files. You can store all the virtual machine files in the same location on the datastore, applying virtual machine master files and virtual disk virtual machine storage profiles from the virtual machine storage profile drop-down menu. You can also store the virtual machine configuration files and disks in a different location, click Advanced, on the virtual machine profile and on each vdisk, click Browse to change and select a data store or datastore cluster. Or, store all the virtual machine files in the same data store. Then select the format that applies to the virtual machine disk, and then click Next 5 to select the client operating system Customization option. This first does not describe how to customize the specification, and we will show you how to use the custom specification later, so we choose not to customize it here. You can tick the "turn on the power of this virtual machine after creation" check box. Causes the virtual machine to start the virtual machine itself after cloning is complete. 6. To view the settings of the virtual machine to be cloned, before clicking the Finish button, you can make hardware settings or changes to the cloned virtual machine, make any required changes in the Virtual Machine Properties dialog box, and then click OK. Finally, click Finish to deploy the cloned virtual machine. You cannot use or edit a virtual machine until the clone is complete. If the clone involves creating a virtual disk, the clone may take several minutes. You can cancel the clone at any time before the custom phase. 7. Before cloningThe virtual machine snapshot is created for the original virtual machine. 8, after the virtual machine replication. 9, a few minutes later, you will see a clone of a good virtual machine. 10, open the two virtual machines, we can see, they are identical, the same computer name, the same configuration, of course, the system's SID will certainly be the same. Windows SIDs are used in some Windows operating systems to uniquely identify systems and users. A new virtual machine that is cloned or deployed has the same SID as the source virtual machine or template.
Third,
re-encapsulate the operating systemInstall the Microsoft Sysprep tool so that you can customize the Windows guest operating system when you clone a virtual machine. This makes it possible to clone virtual machines and clone them like a newly installed operating system, with different computer names, different usernames, different SIDS, and a convenient way for administrators to build virtual machines. Microsoft Sysprep tools for different operating systems are also placed in different places, and the Microsoft Sysprep tool in Windows 2003 is the need to first insert the operating system CD into the CD-ROM drive (typically the D: drive). Locate the DEPLOY in the \Support\Tools directory on the CD. CAB file, open and expand Deploy. CAB file: The contents of the. cab file vary, depending on the operating system. 1, the Sysprep.exe test as to the operating system, and then double-click Sysprep.exe. 2, click the "Reseal" button in the main interface of the package, other by default settings 3, click the "OK" button in the alert window to regenerate SID, this process is about 15 seconds. The system shuts down automatically when the package is ready to complete. In Windows 2008, Windows2008 R2, and Windows 7, the path to the Sysprep.exe file in Windows 2008 and windows2008 R2 is integrated into the system, and the paths of the files are c: \windows\system32\sysprep, a direct double-click is available for encapsulation. In the System Preparation Tool 3.14, make the relevant settings, select the system shutdown after encapsulation
Iv. Creating custom Specifications every time you clone a virtual machine, you have to set up a cloned virtual machine, including setting the user name, changing the SID, setting up the network, and so on, which is cumbersome and cumbersome, and when the operating system is newly installed, We did not set the standardized options inside, the system will enter a simple boot, to set up some relevant information, so that the installation of the system can be completely new. To reduce the hassle, we re-encapsulate the Windows operating system so that, whether it's cloning or recovering a virtual machine from a template, each time it's a completely new operating system, a custom user name and computer name, and the SID of cloning or recovering a virtual machine from a template is random. But when virtual machines need to be deployed on a large scale, simple system encapsulation and cloning cannot be fully met. At this point we will let vsphere come from the packaged system and automatically answer the operation of the virtual machine. Then we need the template. A template is the primary copy of a virtual machine that you can use to create and provision new virtual machines. This image typically contains the specified operating system and configuration, which provides a virtual copy of the hardware component. Templates typically include installed guest operating systems and a set of applications. 1, first, we first set up a new virtual machine, do not need to encapsulate the virtual machine. Click on the virtual Machine right button and select template-Clone as template. 2. Specify the name and location of the template. 3. Specify that the template be placed on that host or cluster. 4. Select storage data for this template. 5. On the Ready to complete page, review the settings and click Finish to convert the template. 6. At this point, we view the converted template in the home-list-Virtual machine template. For example: 7, before the custom specification is established, the Microsoft Sysprep tool to be collected or downloaded first is placed on the VMware vcenter server C:\Users\All users\vmware\vmware virtualcenter\ The Sysprep directory. If the installed VMware vcenter Server is a Windows 2003 R2 64-bit, then place the Microsoft Sysprep tool on the C + + on the VMware vcenter Server Documents and Settings\All Users\Application Data\vmware\vmware Virtualcenter\sysprep directory. After entering the corresponding folder, put the Microsoft Sysprep tool into the appropriate folder according to different operating systems. To create a custom specification for a Windows system, the Microsoft Sysprep tool must be installed on the VCenter Server system, and depending on the operationinto the appropriate folder. If you want to customize the Linux guest operating system, you must require Perl to be installed in the Linux guest operating system. 8. On the vsphere client's home page, select Custom Spec Manager 9, and in the custom specification manager, click New. 10. In the Client Customization wizard, select Windows from the target virtual machine operating system menu to customize the Sysprep answer file to a file that stores many customizations, such as computer name, license information, and workgroup or domain settings. The Custom Spec Manager can provide a custom Sysprep answer file as an alternative to specifying many settings in the Client Customization wizard. Windows 2000, Windows Server 2003, and Windows XP use a text file called Sysprep.inf. WindowsServer 2008, Windows Vista, and Windows 7 use an XML file called Sysprep.xml. You can use a text editor to create these files, or you can use the Microsoft Setup Manager utility to generate them. Under Custom specification information, enter a specification name and an optional description, and click Next button 11, type the name and organization of the virtual machine owner, and click Next. 12, specify how to determine the computer name of the client operating system, if you choose the Enter Name option, you can enter a name in the text box, enter a name that conforms to the naming convention, and can contain alphanumeric characters and hyphens (-), but cannot contain periods (.) or spaces, and cannot consist only of numbers. The name is not case-sensitive, and if you select the Use virtual machine name option, the machine name created by Vcenter Server is the same as the name of the virtual machine that the client operating system is running, which is truncated if the name exceeds 15 characters, and if you select Enter a name in the Deployment Wizard, After cloning or deployment is complete, VSphere Client will prompt you for a name. When selected, select Next 13, at which point the system requires licensing information for the Windows operating system, enter the appropriate content as required, and then click the Next button. If Windows 2008,windows2008 R2, Windows vista,windows 7, the system does not actively activate, requires manual networking or phone activation. 14. Type the password for the Administrator account and confirm by typing again. Note that only the source Windows virtualThe administrator password can only be changed if the administrator password on the computer is empty. If the source Windows virtual machine or template already has a password, the administrator password does not change. 15. Select the time zone 16 for the virtual machine, and specify the command to run when the user first logs on to the guest operating system. 17. Select the type of network settings to apply to the guest operating system. 18. On the workgroup and Domain page, select how the virtual machine joins the network. 19. On the Operating system Options page, tick the Generate new security ID (SID) check box, which is the unique number that identifies the user, group, and computer accounts. When you create the account for the first time, a unique SID is issued for each account. If the system has the same SID, it can cause some functionality to be used. Then click the Next button. 20. Finally, click the Finish button to save your changes.
v. Deployment of virtual machines using specificationsTo customize the guest operating system during cloning or deployment, you must install the latest version of VMware Tools on a virtual machine or template, and the custom guest operating system must be installed on a disk that is attached to SCSI node 0:0 as a virtual machine configuration, or a location error occurs when you deploy the virtual machine. 1. Right-click on the selected template and select the "Deploy virtual machine from this stencil" option in the popup shortcut menu. 2. In the popup dialog box, under the option group "Select options for customizing the client operating system for a new virtual machine", the "not customized" option indicates that all settings are consistent with the settings of the source virtual machine; "Use custom Wizard customization" means to open the Customization wizard and select the custom options for the client operating system. Customize with existing custom specifications means customizing the client operating system using the settings in the saved custom specification.
Vi. Use of
WEB Client
managing virtual Machines has introduced the VMware WEB Client in the previous blog. The Web Client in Vsphere 5.1 was enhanced by using the Vsphere Web Client Management tool to register or unregister the VCenter Server 5.0 system through an instance of the Vsphere Web client. The VSphere Web Client is a Web application that resides on the same system as the VCenter Server and can reside in a separate system. The Vcenter Server 5.0 system must be registered with the Vsphere Web client before you can connect to the Vcenter Server 5.0 system using vsphere Web client. such as vsphere Web Client does not support VCenter Sever systems with versions earlier than 5.0. with the client integration plug-in, you can access the virtual machine console in the vsphere WEB client or access other vsphere infrastructure tasks. You can use the client integration plug-in to deploy an OVF or OVA template and transfer files using a data store browser. You can also use a client integration plug-in to connect a virtual device on a client computer to a virtual machine. Simply install the client integration plug-in to connect the virtual appliance to a virtual machine accessed through an instance of the VSphere Web client. After you install the plugin, you must restart the browser. If you install the client integration plug-in from the Internet Explorer browser, you must first disable protected mode. Internet Explorer treats the client integration plug-in as being on the Internet rather than on the local intranet. In this scenario, the plug-in does not install correctly because Internet protected mode is enabled. 1. Open a Web browser and enter the URL of the VSphere Web Client. At the bottom of the VSphere WEB client sign-in page, click Download Client Integration plug-in. 2, or select the virtual machine in the list, and then click the Summary tab. Click Download client Integration plug-in. 3, after the download is completed, you need to close the browser, and then install, the installation process is very simple, follow the steps next, know the plug-in complete installation. 4. Log in to the console at this point and we can start the console. 5. Success in IE windowStart the control window.
Seven,
Use
Workstation 9.0
managing virtual MachinesThere are several ways to manage the virtualization platform, including even the latest VMware Workstation 9.0. This also greatly facilitates the administrator user. You can even migrate virtual machines on VMware Workstation 9.0 directly to VMware vsphere. Here I only describe how to connect VCs in VMware Workstation 9.0. 1. First open VMware Workstation 9.0. 2. In the File menu, select Connect to Server .... 3. In the Server Connection window, enter the address of the VC and enter the user name and password with administrative privileges. Click Connect. 4. The security warning will pop up, check the "Always trust" this host and this certificate. Then click Connect anyway. 5, after connecting whether to remember this host, or only this connection, here choose Remember. 6. The VC is successfully connected at this time, and all virtual machines on the VC can be seen. 7. You can click on a virtual machine to manipulate it.
[Reproduced] "virtualization series" VMware VSphere 5.1 virtual machine Management