2012/12/10

Fedora 17 with Xen 4.1

1. yum -y upgrade kernel
2. yum -y install xen libvirt python-virtinst
3. Open /boot/grub/menu.lst or /boot/grub2/grub.cfg to add those items:

title Fedora + Xen (3.3.4-5.fc17.x86_64)   
root (hd0,1)     kernel /boot/xen.gz
module /boot/vmlinuz-3.3.4-5.fc17.x86_64 ro root=/dev/sda1
module /boot/initramfs-3.3.4-5.fc17.x86_64.img

4. xm dmesg | head -n 5
5. /etc/init.d/libvirtd start; chkconfig libvirtd on
6. virt-install \   
--paravirt \   
--name=testvm \   
--ram=512 \   
--vcpus=4 \   
--file /dev/vmstorage/testvm \   
--graphics vnc,port=5905 --noautoconsole \   
--autostart 
--noreboot \   
--location=http://mirrors.kernel.org/debian/dists/squeeze/main/installer-amd64/

----------------------------------------------------------------------------------------------------------------------------------
Part1:

[root@localhost ~]$ chkconfig network on
[root@localhost ~]$ /etc/init.d/network start
[root@localhost ~]$ gedit /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

[root@localhost ~]$ gedit /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
127.0.0.1    f16 localhost.localdomain

[root@localhost ~]$ yum update
[root@localhost ~]$ chkconfig iptables off
[root@localhost ~]$ chkconfig ksmtuned off
[root@localhost ~]$ reboot

Part2:

[root@localhost ~]$ yum groupinstall "Development Libraries"  
[root@localhost ~]$ yum groupinstall "Development Tools"
[root@localhost ~]$ yum install transfig wget texi2html libaio-devel dev86 glibc-devel e2fsprogs-devel gitk mkinitrd iasl xz-devel bzip2-devel
pciutils-libs pciutils-devel SDL-devel libX11-devel gtk2-devel bridge-utils PyXML qemu-common qemu-img mercurial

[root@localhost ~]$ yum install glibc-devel.i686
[root@localhost ~]$ yum install xen
[root@localhost ~]# /etc/init.d/xenconsoled start
[root@localhost ~]# /etc/init.d/xend start
[root@localhost ~]# /etc/init.d/xendomains start
[root@localhost ~]# /etc/init.d/xencommons start
[root@localhost ~]# /etc/init.d/xenstored start
[root@localhost ~]# /etc/init.d/libvirtd start
[root@localhost ~]$ reboot

沒有留言:

張貼留言