Vsphere Deployment Series 05--Virtual machine creation and setup

Source: Internet
Author: User
Tags xeon e5

Vsphere Deployment Series 05--Virtual machine creation and setup


For the overall planning of the experimental environment, please see the previous blog post, "Vsphere Deployment series of 03--experimental environment master plan".


In this article, for example, using the local storage esxi-mgt, explain how ESXi hosts create and set up virtual machines.



650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/83/27/wKioL1druIXRi-qiAALXJy2rt0w353.png-wh_500x0-wm_3 -wmp_4-s_2016488417.png "title=" network topology figure 02.png "alt=" Wkiol1druixri-qiaalxjy2rt0w353.png-wh_50 "/>

▲ Master plan network topology diagram



First, the preparatory work


In this case, two virtual machines, SQDC01 and Sqvcenter, are created and run on the planned ESXI-MGT host to act as the domain and vcenter servers in the Vsphere Admin Center.


Connect to the host using vsphere client. Please see the installation and configuration of the 04--esxi of the Vsphere Deployment series in the previous blog post for specific operations.


If the physical server configuration information record is not known (due to accessory adjustment and other reasons, is not factory configured), in the Vsphere Client console main Interface "Configuration" page, you can view, such as processor, memory and so on. For Dell servers, you can also see the service number.


650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/83/27/wKioL1druLrCE-MqAABg-v_8u7Y515.png-wh_500x0-wm_3 -wmp_4-s_4175060395.png "title=" 00 processor information. png "alt=" wkiol1drulrce-mqaabg-v_8u7y515.png-wh_50 "/>

▲vsphere Client Console Main Interface "Configuration" page

Note: There are 2 CPUs, 6 cores per channel, and hyper-Threading technology enabled, so the logical processor is 24.


Second, upload ISO image


Before you create a virtual machine, you need to upload the appropriate system image to the storage that the ESXi host can access.

In the previous section, two local storage on the ESXI-MGT host was configured. This uploads the system image of Windows Server R2 to the storage named OS-241020.

Right-click on "OS-241020" to select "Browse Datastore" in the pop-up menu and the Data Store Browser dialog box will appear.


650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/83/27/wKioL1druOnyQ-r6AACrLsqyYTE401.png-wh_500x0-wm_3 -wmp_4-s_1418200031.png "title=" 01-copy. png "alt=" wkiol1druonyq-r6aacrlsqyyte401.png-wh_50 "/>

▲ Memory Options Page

Note: The local storage on which the ISO is placed can be seen in terms of personal use, but it is important to ensure that the storage of the installation system (OS-241020) reserves enough space for the system to run, a concept that is somewhat similar to the C drive under Windows System.


In the Data Storage Browser dialog box that pops up, there are uploads, downloads, and so on, where you can upload files or folders.


650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/83/27/wKiom1druPuzyXavAAC6jPgO9QA875.png-wh_500x0-wm_3 -wmp_4-s_3263020517.png "title=" 02-copy. png "alt=" wkiom1drupuzyxavaac6jpgo9qa875.png-wh_50 "/>

▲ Data Store Browser dialog box

Note: Clicking the upload button will bring up the "Upload file" and "Upload Folder" submenu, click the submenu option and the corresponding "Upload Project" dialog will pop up.


650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/83/28/wKioL1drzZ7glH5LAAGS5aQSe2A854.png-wh_500x0-wm_3 -wmp_4-s_936665354.png "title=" 03.png "alt=" Wkiol1drzz7glh5laags5aqse2a854.png-wh_50 "/>

▲ Upload Project Dialog box

Note: Select the system image you want to upload here, and then click the Open button. The time required to upload depends on the size of the image and the speed of the network.


Iii. Creating a virtual machine


The process of creating a virtual machine in ESXi with vsphere client is similar to the process of creating a virtual machine in VMware Workstation, which is relatively simple, and there are many installation documents on the network that are no longer specifically described here. The following is an example of creating a virtual machine SQDC01 (the virtual machine name is 10.1.241.11-SQDC01, the hostname of the virtual machine operating system is SQDC01), and describes some key steps.


650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/83/27/wKiom1druTfQqSt8AACnK1qqjwY511.png-wh_500x0-wm_3 -wmp_4-s_2237458111.png "title=" 01-copy. png "alt=" wkiom1drutfqqst8aacnk1qqjwy511.png-wh_50 "/>

▲ Start creating virtual machines in the vsphere Clien console

Note: This action can be done outside of the console on the right side of the "Virtual machine" page, or you can select the host on the left, right-click, and then select the "New Virtual Machine" menu, which will pop up the "Create a new Virtual machine" dialog box.


1, in the popup "Create a new Virtual machine" dialog box, the first step is to select the configuration method, the default is "typical" way, the options are less configurable, generally use the "custom" way to create a new virtual machine.


650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/83/27/wKiom1druU6TsPbhAACAXN-RhpU122.png-wh_500x0-wm_3 -wmp_4-s_873876344.png "title=" 02-copy. png "alt=" wkiom1druu6tspbhaacaxn-rhpu122.png-wh_50 "/>

▲ Select configuration mode

Note: Here is a custom approach, in which the user can set the virtual machine version, CPU, memory, network, SCSI controller and so on according to the requirement.


650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/83/27/wKiom1drucrzAz-bAACYUZUCqDk323.png-wh_500x0-wm_3 -wmp_4-s_4083592324.png "title=" 04-copy. png "alt=" wkiom1drucrzaz-baacyuzucqdk323.png-wh_50 "/>

▲ Memory settings

Note: In this step, select the destination storage for the virtual machine, and here you select the local storage DT-241020 that you plan to use to store the virtual machine.


2, Next is to set the virtual machine virtual CPU number, to follow the two allocation principle:

Allocation principle One: the number of slots cannot exceed the number of physical CPUs of the host, otherwise the extra slots are invalid.

Allocation principle Two: the number of cores per slot cannot exceed the number of cores per physical CPU x Hyper-threading factor.


The number of logical CPUs that vsphere allocates to a virtual machine equals the number of slots x cores per slot. In the setup process, once you violate one of these two principles, the actual number of Vcpus assigned to the virtual machine will be less than the number of Vcpus displayed. In view of the optimization of the system running concurrency, it is common to use multi-virtual slots.


650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/83/27/wKiom1drudqQHZhDAAB1Y3dzZr4232.png-wh_500x0-wm_3 -wmp_4-s_2451512492.png "title=" 07-copy. png "alt=" wkiom1drudqqhzhdaab1y3dzzr4232.png-wh_50 "/>

▲ Virtual CPU Settings

Note: The Dell PowerEdge R720 used in this case has 2 6-core Xeon E5-2630 v2, and the maximum number of virtual slots for a virtual machine can be set to 2. Since the CPU has and has Hyper-Threading technology enabled, the maximum number of cores per virtual slot can be (6x2=) 12. This is set to 2x2.


3. In the Network Settings dialog box, make the settings for the virtual network and virtual NIC (adapter) type.


The system has a virtual NIC VM network that is used for virtual machine traffic by default, and if no new virtual networks are created for the EXSI host, you can only select this virtual network (the management network for management is not visible here) when you create the virtual machines.


Data: There are three types of virtual network cards: E1000, Vmxnet 2, vmxnet 3. The main difference between the three is that the compatibility of virtual machine systems is different. E1000 is the analog version of the Intel 82545EM Gigabit Ethernet card, and basically all of the OS are E1000 driven, so compatibility is the best. Vmxnet 2 is an older generation of parallel virtual web, only applicable to esx/esxi3.5 and above the limited customer operating system, vmxnet 3 relatively new, but it seems only applicable to virtual machine version 7 virtual machine (virtual machine version set in the first two steps, The version recommended for use in ESXI5 is 8). These two cards provide better performance versus E1000 and support extra long frames (only available when VMware Tools is installed).


650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/83/27/wKioL1druezDgDPBAACpX_P5W60708.png-wh_500x0-wm_3 -wmp_4-s_2316827854.png "title=" 09-copy. png "alt=" wkiol1druezdgdpbaacpx_p5w60708.png-wh_50 "/>

▲ Network Settings

Note: The virtual network VM networks are selected here, and the virtual NIC type is the default E1000.


4. Select the SCSI controller


VSphere creates virtual machines with four types of SCSI controllers to choose from: buslogic parallel, LSI logic parallel, LSI logic SAS, VMware quasi-virtual. LSI Logic SAS and VMware paravirtual controllers are available only for virtual machines with a hardware version of 7 or higher.


Data: BusLogic is a simulation of the IDE, primarily to be compatible with some older systems. LSI Logic SAS has a better parallel performance than LSI logic. VMware quasi-virtual (VMware paravirtual, Pvsci) is VMware's own virtual machine SCSI controller, which has the advantage of not having to emulate a third-party vendor's SCSI controller. Directly send driver SCSI command directly to the vmkernel for I/O processing, the middle of the lack of a layer of SCSI controller simulation process, it can effectively reduce the CPU overhead. Although VMware quasi-virtual has high performance, it is not available in some scenarios, such as the ability of a virtual machine to enable fault tolerance (required in a cluster), or a virtual machine to be used as a Microsoft Cluster Service (MSCS).


Typically, you select the default. In the experiment, when installing the Windows Server 2008r2 system, the default is "LSI Logic SAS" type. When installing the CentOS 6.5 system, the default is "LSI Logic parallel type".


650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/83/27/wKiom1druf7w_rZBAACMBVfPThQ780.png-wh_500x0-wm_3 -wmp_4-s_2431486146.png "title=" 10-copy. png "alt=" wkiom1druf7w_rzbaacmbvfpthq780.png-wh_50 "/>

▲SCSI Controller Settings


5. Specify the virtual disk size and provisioning policy


Data: The virtual machine disk type is divided into two categories, thick disk (thick disk) and thin disk (thin disks). The thick plate is divided into a delay of 0 and 2 formats:

The thick provisioning delay is zero, which is the default format. All disk space is allocated, but data that was originally written at the hard disk level is not deleted. Erase data and block 0 (formatted) are only performed the first time the disk is written.

Thick provisioning 0: All disk space is reserved, the data is completely deleted from disk, the disk is created at the time of the Block Association 0 (formatted) compared to the thick-provisioned delay 0, this method is much better when writing to disk.

Compact disk: The virtual machine hard disk occupies space equal to the actual disk space used, that is, disk space on demand. The dynamic change of space size is advantageous to the optimization of storage space.


Typically, for virtual machines that use a database, select thick-provisioned disks, and for most applications, select a thin disk.


650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/83/27/wKioL1druhaTcsjoAACfqiMU_Hw305.png-wh_500x0-wm_3 -wmp_4-s_1961219053.png "title=" 12-copy. png "alt=" wkiol1druhatcsjoaacfqimu_hw305.png-wh_50 "/>

▲ Virtual disk size and provisioning policy settings

Note: Here is a 0 way to choose a thick-provisioned delay for the virtual machine. The hard disk size is 50G.


650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/83/27/wKiom1drukXgi1DuAAENYDMlq3U484.png-wh_500x0-wm_3 -wmp_4-s_2126240433.png "title=" 14.png "alt=" Wkiom1drukxgi1duaaenydmlq3u484.png-wh_50 "/>

▲ Settings Overview

Note: You can check the previous settings here and reverse the changes if you find them wrong.

Check "Edit virtual machine settings before completion" to eject the "Virtual Machine Properties" dialog box for ISO connection settings.


650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/83/27/wKiom1drumWCzTtMAAEw9-F6XRE781.png-wh_500x0-wm_3 -wmp_4-s_2706388599.png "title=" 12.png "alt=" Wkiom1drumwczttmaaew9-f6xre781.png-wh_50 "/>

▲ Edit Virtual Machine properties

Note: Specify the data store ISO file here, and tick "connect when power is on". The equivalent of placing the disc in the optical drive.


Now that the virtual machine is created, you need to start the virtual machine and install the operating system. The system installation process and the physical machine installation is no different, omitted.


650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/83/27/wKioL1druoHyA5jtAAEo9Mzjx7A707.png-wh_500x0-wm_3 -wmp_4-s_2263509823.png "title=" 13-copy. png "alt=" wkiol1druohya5jtaaeo9mzjx7a707.png-wh_50 "/>

▲ Start the virtual machine


650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/83/27/wKiom1drupjhBwxeAAX4VodNIek112.png-wh_500x0-wm_3 -wmp_4-s_559238664.png "title=" 15.png "alt=" Wkiom1drupjhbwxeaax4vodniek112.png-wh_50 "/>

▲ Installing Windows Server R2 in an open standalone console



Iv. Network Settings


Let's start by introducing virtual switches in VMware vsphere.


In the VMware vsphere architecture, the ESXi host virtual out switch is available for virtual machines, and there are two types of virtual switches: vswitch Virtual Switch and vnetwork distributed Virtual Switch.


The virtual Switch VSwitch is provided by the ESXi kernel as a virtual switch for connecting different virtual machines and management interfaces. Vswitch can consist of one or more pieces of vmnic, and different vswitch cannot use the same vmnic. Each ESXI host has a standard vswitch, the default is to add the first Nic Vmnic0 (in ESXi, the physical network card name is called Vmnic), for the main console, virtual machine online and other functions.


In the network option in the configuration page of the vsphere Clien console, you can view virtual switches and network connections for virtual machines.


650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/83/27/wKioL1drurigEatLAABtPtvRuDE946.png-wh_500x0-wm_3 -wmp_4-s_617428417.png "title=" 16-copy. png "alt=" wkiol1drurigeatlaabtptvrude946.png-wh_50 "/>

▲ View Network Settings

Note: During the previous virtual machine creation process, the default VM network is selected for the virtual machine, and the network and the management network management networks are vSwitch0 and connected to the first physical NIC Vmmic0. Click "Properties" (VSwitch0) on the top right, and the VSwitch0 Properties dialog box pops up.


In this case, due to the overall design requirements, the port on the Vmmic0 NIC peer-to-peer switch is trunk, in which case the network of VM networks is not accessible by default, and the VLAN ID needs to be changed from "None (0)" to "241". (The overall design is described in the previous section, "Vsphere Deployment series of 04--esxi installation and configuration," In fact esxi-mgt this machine, because only one vlan,vmmic0 to end access VLan241 port will be better, not complicated).


The following describes how to change the VLAN ID number for VM network.


650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/83/27/wKiom1drutmTSbUAAACYReyDkpE156.png-wh_500x0-wm_3 -wmp_4-s_2316457132.png "title=" 17.png "alt=" Wkiom1drutmtsbuaaacyreydkpe156.png-wh_50 "/>

▲vswitch0 Properties dialog box

Note: The VM Network Properties dialog box pops up when VM network is selected in the configuration and then the Edit button is clicked


650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/83/27/wKioL1druuXCAiSJAACpmkCs7U0493.png-wh_500x0-wm_3 -wmp_4-s_382144262.png "title=" 18.png "alt=" Wkiol1druuxcaisjaacpmkcs7u0493.png-wh_50 "/>

▲VM Network Properties dialog box

Note: Set the VLAN ID number here. The drop-down box initially has only "none (0)" and "All (4095)" Two values, you need to enter "241" manually, and then click the "OK" button to save. It is also possible to change the label name for the network, such as "VLAN241" or other names used to identify the business, and not necessarily the name "VM Network". No amendment is made to the present case.


When the VLAN ID of the VM network is modified, it is marked in the console. Interested friends, you can change the port of the VMMIC0 peer-to-peer switch to an access port and then set it up with a deeper understanding of the VLAN ID and the VLAN (option) option in the ESXi Direct console.


650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/83/27/wKiom1druvfQQQpXAAGmbwohAUE456.png-wh_500x0-wm_3 -wmp_4-s_603685834.png "title=" 21.png "alt=" Wkiom1druvfqqqpxaagmbwohaue456.png-wh_50 "/>

▲ View Network Settings


At this point, in the virtual machine SQDC01 of the installed system, the IP of the 10.1.241.0/24 network segment is set to access the physical host external network through the virtual standard switch vSwitch0.


vsphere Network settings go deep into the complex, and subsequent articles will be further described.



Five, VMware tool installation


Once the virtual machine system is installed and configured, get into the habit of installing VMware tool (especially if the virtual will be transformed into a template).


VMware Tools is an enhanced tool that comes with VMware virtual machines and is a driver for VMware's enhanced virtual graphics and hard disk performance, as well as for synchronizing virtual machines with host clocks.


Before the VMware Tools package, you must run the guest operating system first. Select "Install/upgrade VMware Tool" in the submenu of the virtual machine console and the VMware Tool Toolkit will be connected to the virtual CD-ROM in ISO-mirrored mode.


650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/83/27/wKiom1druz2hWJ9WAADaOXQGy6Q673.png-wh_500x0-wm_3 -wmp_4-s_4083049191.png "title=" 01-copy. png "alt=" wkiom1druz2hwj9waadaoxqgy6q673.png-wh_50 "/>

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/83/27/wKiom1dru6rCEgs7AAIpR1tSKuw835.png-wh_500x0-wm_3 -wmp_4-s_1866086871.png "title=" 03-copy. png "alt=" wkiom1dru6rcegs7aaipr1tskuw835.png-wh_50 "/>


The default is to automatically boot from the CD-ROM drive, if it does not start automatically, to manually double-click Run. The installation process is simple, and the next step is on the line. The virtual machine needs to be restarted for the settings to take effect after the installation is complete.


650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/83/27/wKiom1dru_Dheq9QAAB-L0qUH-k865.png-wh_500x0-wm_3 -wmp_4-s_786360852.png "title=" 09-copy. png "alt=" wkiom1dru_dheq9qaab-l0quh-k865.png-wh_50 "/>

▲vmware Tool Run Tips

Note: At this point in the console summary, you can see that the VMware tool is installed and running. The virtual machine IP is now displayed.


Vi. Other


With the vsphere client directly connected to the ESXi host, the virtual machine cannot be turned into a template on the console (cloned as a template or directly into a template) and cannot be cloned. Templates and cloning capabilities are available only in vcenter.


In this case, in this section, because the vcenter environment has not been established, have to honestly, repeat the above operation, and then create a virtual machine (virtual machine name: 10.1.241.13-sqvcenter), as the virtual host running vcenter software.


650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/83/27/wKiom1drvJuwsHvAAAFL3H6tofg688.jpg-wh_500x0-wm_3 -wmp_4-s_3983277927.jpg "title=" 01.jpg "alt=" Wkiom1drvjuwshvaaafl3h6tofg688.jpg-wh_50 "/>

▲ There is no "template" menu in the right-click menu of the virtual machine


10.1.241.11-SQDC01 and 10.1.241.13-sqvcenter Two virtual machine owners are created, configured to complete, and in the virtual machine system according to the planning requirements of the host name and IP, then you can deploy the domain control and vcenter environment.


This article is from the "One Tree Qing Jin" blog, please be sure to keep this source http://sunshyfangtian.blog.51cto.com/1405751/1792297

Vsphere Deployment Series 05--Virtual machine creation and setup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.