1 Understanding Server Configuration
1.1 See if the server CPU supports virtualization
1.1.1 Purpose
Virtualization technology is currently supported by Inter and AMD-produced mainstream CPUs, but many computers or motherboard BIOS are disabled by default when they are shipped
1.1.2 Method
SETP1: Press F2 or F10 to enter the BIOS interface after restarting the server (different motherboard models are required to enter the BIOS)
SETP2: Switch the BIOS display to the process panel, because the motherboard does not display the same keyword in the BIOS, mainly to find virtual or virtualization set it to Enabled
SETP3: Save modified CPU Virtualization settings when exiting BIOS
1.2 View server memory size
1.2.1 Purpose
To properly allocate the memory size of the virtual machines deployed on the virtualization platform, let's look at the memory configuration of the server
1.2.1 Method
SETP1: Execute command: free-m
SETP2: View display results, as shown in this example total:65501, indicating that the server has 64G of memory
1.3 View server CPU information
1.3.1 Purpose
In order to rationally allocate the number of CPUs and the number of cores for the virtual machines deployed on the virtualization platform;
1.3.1 Method
SETP1: Execute command: Cat/proc/cpuinfo |grep "Physical" |sort|uniq-c
SETP2: View display results, as this example shows a total of 24 cores (two 12 cores of CPUs)
1.4 View server hard drive information
1.4.1 Purpose
To reasonably allocate virtual hard disk size to virtual machines deployed on a virtualized platform;
1.4.1 Method
SETP1: Execute command: df-th
SETP2: View display results, as shown in this example 48T
2 related software and image download
2.1 XenServer installation image download
2.1.1 Download Purpose
Install XenServer required Mirror files
2.1.2 Download Address
Http://xenserver.org/overview-xenserver-open-source-virtualization/download.html
2.1.3 Version
Xenserver-6.2.0-install-cd.iso
2.1.4 Burn
Burn the Xenserver-6.2.0-install-cd.iso mirrored file to the disc.
2.2 Xencenter installation package download
2.2.1 Download Purpose
XenServer client software, installed on a Windows machine that can be connected to the XenServer server network
2.2.2 Download Address
http://download.csdn.net/download/hvfdh/8270781
2.2.3 Version
Citrix Xencenter 6.5
3 XenServer Installation
Ready for so long, finally can install!!!
3.1 Installation Steps
Basically ok down the way, you need to note the following points:
SETP1: Boot server from CD
SETP2: Note Keyboard Type Select us, region select Shanghai etc details
SETP3: Note the choice of virtualmachine storage, generally by default, do not choose the optimization mode
SETP4: Note Network and DNS settings, based on local actual network settings
SETP5: Note The general installation, do not choose to install the patch
3.2 Installation Xencenter
Xencenter is a xenserver management client that can be used to manage xenserver and the virtual machines deployed on it;
The Xencenter is installed on a Windows machine that can be networked with XenServer; the installation steps are simply not to be summarized here;
After the Xencenter installation is complete, you can connect to the XenServer server through the Add server operation.
3.3 Virtual Machine Deployment preparation
XenServer installation is simpler, but deploying virtual machines on XenServer is a bit of a hassle, but unlike other virtualization platforms, XenServer separates virtual machine installation images from other storage, so it's a bit of a hassle, but, with care, you'll find that easy, Haha, let's get started!
3.3.1 The purpose of the new LV volume
☻ in the installation process of XenServer, there is no disk partition operation as usual installation system;
☺ After the installation of the XenServer system to view disk information, the result of the secondary installation as an example: Hard disk total of 48T, but df-th command, found only 4 G hard disk space, and XenServer system files have taken up 1.9G;
☻ So the problem comes, to deploy the virtual machine on the XenServer, storage will not be enough, leaving about 2G of available storage space, basically can not put a centos system image, this How to break?
☺ Haha, XenServer has the concept of a storage warehouse (Sr-storage repositories) that is used to store ISO or VDI.
☻xenserver was designed to use shared storage to support FC San,iscsi Sans, NFS three storage types.
☺ to be able to store virtual mirrors, you need to first establish an ISO-mirrored LV volume on the xenserver server, and then build a storage repository for XenServer to store the virtual machine installation image, and mount the newly-created LV volume to the storage warehouse;
3.3.2 to create a new LV volume
SETP1: View remaining space
Execute command: vgdisplay; you can see that the VG size is 40TB, showing the existing LV partition's name number is VG_XENSTORAGE-A9C7A79C-4277-2805-4D34-3BAE47A473F8
SETP2: View details of the area
Execute command: Lvdisplay vg_xenstorage-a9c7a79c-4277-2805-4d34-3bae47a473f8
SETP3: New 20G LV volume ISO, for storing virtual image files
Execute command: lvcreate-l 20gb-n ISO vg_xenstorage-a9c7a79c-4277-2805-4d34-3bae47a473f8
Show Logical volume "ISO" created
SETP4: View the area again
Execute command: Lvdisplay vg_xenstorage-a9c7a79c-4277-2805-4d34-3bae47a473f8
As you can see, the new ISO logical volume has been displayed with a size of 20GB
SETP5: Format the logical volume that you just created is ext3 format
Execute command: Mkfs.ext3/dev/vg_xenstorage-a9c7a79c-4277-2805-4d34-3bae47a473f8/iso
SETP6: Create ISO files in root directory for mounting of ISO image files
Execute command: Mkdir/iso
and is mirrored to the/iso directory through the Xshell Transport virtual machine installation
SETP7: Activate all volume groups
Execute command: vgchange-a y
displaying 2 logical Volume (s) in volume Group "VG_XENSTORAGE-A9C7A79C-4277-2805-4D34-3BAE47A473F8" now active
SETP8: Mount/iso folder
Execute command: Mount/dev/vg_xenstorage-a9c7a79c-4277-2805-4d34-3bae47a473f8/iso/iso
SETP9: Adding automatic mounts to/etc/fstab
Execute command: Vi/etc/fstab
Add:/dev/vg_xenstorage-a9c7a79c-4277-2805-4d34-3bae47a473f8/iso/iso ext3 defaults 0 0
SETP10: Creating SR in Xencenter
Execute command: XE sr-create name-label=iso_storage type=iso device-config:location=/iso device-config:legacy_mode=true Content-type=iso
Show 6bab3651-e2ce-c490-a00a-e2858ee2dfa3
SETP11: Executive Xe-toolstack-restart
You can see the newly created SR Iso_storage in the Xencenter's property directory, and you can see the list of virtual machine image files uploaded to the/iso directory in Step6 in the Iso_storage storage directory
☺☺ to complete the preparation of the virtual machine deployment, then start installing the virtual machine;
3.4 Virtual Machine Deployment
Deployment of virtual machines on XenServer can be quickly deployed through the virtual machine deployment templates available on Xencenter
* Installation steps for virtual machines *
SETP1: Select the template for the appropriate version of the virtual machine you want to install in Xencenter
If this example installs: CentOS 6.5 64bit
SETP2: Select Virtual Machine Mirroring path
Select the appropriate CentOS mirrored file under the Iso_storage created earlier
SETP3: Configure the virtual machine CPU, memory and other information
SETP4: Check the virtual machine configuration information, confirm the correct, you can install the virtual machine;
SETP5: After the virtual machine is installed, install the Xenserver-tools, install the xenserver-tools to be able to easily view the CPU, memory, network, disk and other performance curve information of the virtual machine in Xencenter;
Execute command: mount/dev/xvdd/mnt/
Execute command:/mnt/linux/install.sh
SETP6: Configure a new virtual machine network, etc.
☺☺ the deployment of the CentOS virtual machine is over, the WinDOS virtual machine is simpler and easier to deploy, and this is no longer the place to repeat
Possible problems and solutions in the course of operation
Issue 1: After restarting the XenServer, discover the SR iso_storage that love you before you find it
Iso_storage and LV Volume ISO mount failed, Mount again
Problem 2:linux Virtual machine cannot open graphical interface reason
Installing Linux on XenServer (here is CentOS) without a graphical interface installation, finding data found to be a xenserver compatibility issue: Because the XenServer template was selected when the virtual machine was created, So when creating a virtual machine, select other media at the operating system template.
Problem 3: Virtual machine does not start
The possible reason is to use the fast copy mode when creating a virtual machine, in full copy mode