Install xen:
# Yum install kernel-xen
Restart and select the xen kernel during startup.
View the xen status after startup:
# XM list
Name id mem (MIB) vcpus state time (s)
Domain-0 0 747 2 R -- 3623.1
Install virtual machine:
Virt-install-N centos-r 256-f/home/feisky/xen/centos. IMG-S 4-nographics-p-lhttp: // mirrors.163.com/centos/5.6/ OS /i386
after the installation is complete, a configuration file is generated under/etc/xen:
name = "centos"
UUID = "40ded0f5-0b0b-d556-5590-f6f987beed95"
maxmem = 256
memory = 256
vcpus = 1
bootloader = /usr/bin/pygrub "
on_poweroff =" destroy "
on_reboot =" restart "
on_crash =" restart "
disk = [" tap: AIO:/home/feisky/xen/centos. IMG, xvda, W "]
VIF = [" Mac = 00: 16: 36: 5f: 0f: 72, bridge = xenbr0, script = VIF-bridge "]
Start the VM:
# XM create centos
# XM list
name id mem (MIB) vcpus state time (s)
domain-0 0 747 2 R -- 3643.4
centos 6 256 1 R -- 16.2
Terminal connected to the virtual machine:
# XM console 6
Linux version 2.6.18-238. el5xen (mockbuild@builder10.centos.org) (GCC version 4.1.2 20080704 (Red Hat 4.1.2-48) #1 SMP Thu Jan 13 17:49:40 est 2011
BIOS-provided physical Ram map:
Xen: 0000000000000000-0000000010800000 (usable)
0 MB highmem available.
264 MB lowmem available.
..............................
Or use xterm to connect: xterm-T centos-e XM console 1 &
Use the shortcut key Ctrl +] to exit the Virtual Machine terminal.