I. installation environment CentOS6.5 kernel version: 2.6.32-431. el6.x86 _ 64VMware-Workstation 2: install xen using [root @ node1 ~] # Cat & nbs
I. installation environment
CentOS6.5 kernel version: 2.6.32-431. el6.x86 _ 64 VMware-Workstation
II. Installation and Use of xen
|
[Root @ node1 ~] # Cat/proc/cpuinfo | grep flagflags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat limit 36 clflush dts acpi mmx fxsr sse sse2 ss syscall nx rdtscp lm limit up pebs bts limit pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt hypervisor lahf_lm arat epb xsaveopt pln pts dts |
'Pae' indicates that the cpu supports semi-virtualization.
|
[Root @ node1 ~] # Yum install centos-release-xen [root @ node1 ~] # Yum update [root @ node1 ~] # Yum install xen-y (modified/etc/grub. conf) [root @ node1 ~] # Yum install libvirt virt-manager (libvirt is a service) |
After xen is installed, grub information has been modified (xen4.4.2 grub information is automatically modified without manual modification)
Since Dom0 can only run versions later than 2.6.37, the kernel version 3.10.68 is automatically installed when xen is installed. The kernel uses xen, and the newly installed kernel runs as a module.
After restart, the system starts the xen kernel.
[Root @ node1 xen] # cat/proc/xen/capabilities
Control_d
Control_d indicates that our xen is ready for use.
3. install DomU
Install xen DomU in three ways: nfs, ftp, and http. nfs is used here;
Now mount the system disk of CentOS to the system:
|
[Root @ node1 ~] # Mount/dev/cdrom/media/cdrom [root @ node1 ~] # Mkdir/mnt/centos/[root @ node1 ~] # Cp-r/media/cdrom/*/mnt/centos/[root @ node1 ~] # Chmod 777/mnt/centos/. treeinfo [root @ node1 ~] # Vim/mnt/centos /. treeinfo is as follows: [general] family = CentOStimestamp = 1385726532.68 variant = totaldiscs = 1 version = 6.5 discnum = 1 packagedir = arch = x86_64 [images-x86_64] initrd = images/pxeboot/initrd. img [images-xen] kernel = images/pxeboot/vmlinuz // add this line of initrd = images/pxeboot/initrd. img [stage2] mainimage = images/install. img |
Install and mount the nfs service
|
[Root @ node1 ~] # Yum install nfs-utils-y (use service nfs start directly when starting nfs 3.10.68) [root @ node1 ~] # Echo '/mnt/centos/* (ro)'>/etc/exports [root @ node1 ~] Service nfs start [root @ node1 centos] # showmount-e localhostExport list for localhost:/mnt/centos * |
The above indicates that nfs is successfully installed.
Install DomU named Dom2:
|
[Root @ node1 ~] # Virt-install-n dom2-r 512 -- vcpus = 1 -- prompt -- disk path =/dev/sdb -- nographics-l nfs: 10.43.2.11: /mnt/centos/We will install Dom2 on another hard disk/dev/sdb. 1. starting install... retrieving file. treeinfo... | 616 B... retrieving file vmlinuz... | 7.9 MB... retrieving file initrd. img... | 64 MB... creating domain... | 0 B Connected to domain Dom2Escape character is ^] Initializing cgroup subsys cpuset ......... Greetings. anaconda installer init version 13.21.215 startingmounting/proc filesystem... doneWelcome to CentOS for x86_64 ┌ ── ─ ┐ │ What Language wocould you like to use │ during the installation process? │ Catalan │ Chinese (Simplified) │ Chinese (Traditional) │ Croatian │ Czech │ Danish │ Dutch │ English ↓ │ ── ┐ │ OK │ ── ─ the above information appears to install common to install the operating system. |
Install the bridge configuration management tool: (this operation is required to minimize the installation of CentOS6.x)
|
Yum install-y bridge-utils |
Start xend and libvirt and enable it to start automatically
|
Service xend start service libvirt start chkconfig xend onchkconfig libvirt on |
So far, Dom2 in our xen has been installed.