Xen's rapid deployment basics tutorial

  

Install kernel support and xen tools 1.yum -y install kernel-xen.x86_64 kernel-xen-devel.x86_64 xen.x86_642./etc/init.d/xend start#yum - y install virt-manager (graphical interface) dd if=/dev/zero of=centos5.img bs=1M count=10000dd if=/dev/zero of=swap.img bs=2k seek=512k count=1

virt-install -n centosxm -r 512 -f centos5.img -l http://mirrors.163.com/centos/5.7/os/i386/–network=network:default -p -s 10 &ndash ;nographics –vcpus=2yum -y install vncvncserver

xm list

Centos default Xen structure is bridge mode, you need to modify the corresponding configuration. /etc/xen/xend-config.sxp (network-script network-bridge) (vif-script vif-bridge) comment out (network-script network-route) (vif-script vif-route) remove the comment and change it to Route mode (NAT mode) Restart the xen service to make the settings take effect, /etc/init.d/xend restart/etc/init.d/libvirtd start to see the NIC in the virt-manager

xm console <NAME> Connect to the virtual machine console xm create <NAME> Create a host based on the configuration file. If you have followed the previous operation and completed the virtual host installation, this command is actually equivalent to starting a virtual machine xm shutdown <NAME> ; Shutdown xm reboot <NAME> Restart xm destroy <NAME> Delete host xentop resources before host usage

Copyright © Windows knowledge All Rights Reserved