The Xen virtual machine supports the installation of two types of clients. One is half virtualization, one is full virtualization. The Win2003 system requires installation and operation in a fully virtualized environment.
Hardware environment: DELL R710 CPUs are required to support virtualization (Cat/proc/cpuinfo |grep vmx view), and the BIOS turns on the VT Full virtualization feature. System environment: Physical machine centos5.6 x86_64, Xen. Virtual Machines to install Windows2003
First, physical machine preparation environment:
1. Xen Installation
Yum Install Xen Kernel-xen
2. Edit grub, start/etc/grub.conf with Xen kernel
The default=0 change value is 0, started with the title CentOS (2.6.18-238.el5xen) kernel, and the default is title CentOS (2.6.18-194.el5) kernel boot, which allows you to view the Xen kernel through uname–r.
3. Xen Services Open
/etc/init.d/xend start
/etc/init.d/xendomains start
4. Load Xen Network Bridge file
#vi/etc/xen/scripts/test-network-bridge 500 file permissions
#!/bin/sh
dir=$ (dirname "$")
"$dir/network-bridge" "$@" vifnum=0 netdev=eth0 bridge=xenbr0
"$dir/network-bridge" "$@" Vifnum=1 netdev=eth1 BRIDGE=XENBR1
"$dir/network-bridge" "$@" vifnum=2 netdev=eth2 Bridge=xenbr2
"$dir/network-bridge" "$@" vifnum=3 netdev=eth3 Bridge=xenbr3
#ifconfig See the virtual Machine Network Bridge.
Xenbr0 Link encap:ethernet hwaddr FE:FF:FF:FF:FF:FF
Up broadcast RUNNING Noarp mtu:1500 metric:1
RX packets:1172736 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:76745681 (73.1 MiB) TX bytes:0 (0.0 b)
5. Preparing disk space for a virtual machine
Virtual machines are installed on logical volumes, and logical volume partitioning is based on the following sequence
Physical partitions > Physical volumes > Volume groups > Logical volumes
FDISK/DEV/SDA The remaining space into a volume to build a primary partition
Partprobe Sync Partition to System
PVCREATE/DEV/SDA4 Create a physical
Vgcreate vg01/dev/sda4 Establish group name vg01
Lvcreate-l 90g-n sphone_win vg01 Create logical Sphone_win
Group and Logical view results: Vgdisplay Lvdisplay
---Logical volume---
LV Name/dev/vg01/sphone_win
VG Name vg01
LV UUID 53xsbo-pyxw-qxa0-xcq2-qcds-rrt2-w0hfh0
LV Write Access Read/write
LV Status Available
# open 2
LV Size 90.00 GB
Current LE 23040
Segments 1
Allocation inherit
Read ahead Sectors Auto
-Currently set to 256
Block Device 253:0
Installation preparation for the deployment of virtual machines:
Two ways: one to install via Virt-install, one to install by writing a virtual machine profile (more convenient, here's the case).
1. Installation of Vnc,vnc-server (System with its own)
Yum List VNC Vnc-server
2. xend configuration file Change/etc/xen/xend-config.sxp
(Vnc-listen ' 115.238.x.x ') Remove comments Change the IP of this machine when it is connected to the external IP,VNC client
(VNCPASSWD ' 123456 ') set VNC password
/etc/init.d/xend restart
3. Create a configuration file in the/etc/xen directory to install the virtual machine
[root@sn708 ~]# Vi/etc/xen/spone_web
Name = "Sphone_win"
MAXMEM = 2048
Memory = 2048
Vcpus = 2
Builder = "HVM"
Kernel = "/usr/lib/xen/boot/hvmloader"
PAE = 1
ACPI = 1
APIC = 1
LocalTime = 1
On_poweroff = "Destroy"
On_reboot = "Restart"
On_crash = "Restart"
Device_model = "/USR/LIB64/XEN/BIN/QEMU-DM"
disk = ["Phy:/dev/vg01/sphone_win,hda,w", "File:/tmp/zw86sp2a.iso,hdc:cdrom,r"]
Vif = ["Mac=00:16:3e:a0:00:4b,bridge=xenbr0,script=vif-bridge"]
boot = "C"
Parallel = "None"
Serial = "Pty"
Vnc=1
Vncconsole=1
Vpcpasswd= ' 123456 '
Parameter description:
Boot= "C" starts from the first disk, which is the optical drive
localtime=1 allow virtual machine time to take physical machine time
Disk win virtual machine ISO files can be placed in the physical machine local/tmp directory.
Vif Network Bridge bind first NIC eth0 out
Vnc=1 Open VNC Remote control
Vncconsole=1 the default to turn on VNC when powered on
VPCPASSWD is VNC session password
4. Open the virtual machine
#xm Create/etc/xen/spone_web
#ps –ef |grep VNC View Process
Root 19937 5052 0 Dec19? 00:12:56/usr/lib64/xen/bin/qemu-dm-d 23-m 2048-boot c-localtime-serial Pty-vcpus 2-acpi-domain-name ET nic,vlan=1,macaddr=00:16:3e:a0:00:4b,model=rtl8139-net tap,vlan=1,bridge=xenbr0-vnc 115.238.31.172:23,password -vncunused-vncviewer
Root 19945 19937 0 Dec19? 00:00:00 [Vncviewer] <defunct>
Root 25714 25669 0 11:12 pts/2 00:00:00 grep vnc
# XM Li View the virtual machine ID number
Name ID Mem (MiB) Vcpus state time (s)
Domain-0 0 21998 R-----11857.1
Sphone_win 2055 2-b----85099.3
5. VNC Client Tool Connection
VNC Viewer Connection Ip:id number such as 115.238.x.x:23 the next step is to start the Windows graphical interface installation
The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.