Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1867012
  • 博文数量: 473
  • 博客积分: 13997
  • 博客等级: 上将
  • 技术积分: 5953
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-22 11:52
文章分类

全部博文(473)

文章存档

2014年(8)

2013年(38)

2012年(95)

2011年(181)

2010年(151)

分类: LINUX

2010-09-26 16:42:29

In meantime Xen 4.0.1 is available via rawhide repositories . Been installed along with 2.6.32.21 pvops kernel and the most recent libvirt 0.8.3 on top of F14 (rawhide) via just several yum install commands,it doesn’t require any longer to build xen rpms using corresponding xen-4.0.1-1.f14.src.rpm. Changing preferences allows to play with Gnome 3 shell managing virt-manager and other desktop tools.
Looks like F14 rawhide with Xen 4.0.1 available via yum install and Michael Young’s ~myoung/dom0/src/kernel-2.6.32.21-167.xendom0.fc12.src.rpm which might be rebuilt on F14 and loaded under xen with init=/sbin/upstart is the most friendly environment for the Xen&Pvops testing.
*********************************************************************************************************
Update on 09/18/10 

*********************************************************************************************************
Install xen 4.0.1

[root@fedora14a ~]# yum install xen
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package xen.x86_64 0:4.0.1-1.fc14 set to be installed
–> Processing Dependency: xen-runtime = 4.0.1-1.fc14 for package: xen-4.0.1-1.fc14.x86_64
–> Processing Dependency: PyXML for package: xen-4.0.1-1.fc14.x86_64
–> Processing Dependency: libxenguest.so.4.0()(64bit) for package: xen-4.0.1-1.fc14.x86_64
–> Processing Dependency: libxenctrl.so.4.0()(64bit) for package: xen-4.0.1-1.fc14.x86_64
–> Processing Dependency: libxenstore.so.3.0()(64bit) for package: xen-4.0.1-1.fc14.x86_64
–> Processing Dependency: libflask.so.1.0()(64bit) for package: xen-4.0.1-1.fc14.x86_64
–> Running transaction check
—> Package PyXML.x86_64 0:0.8.4-25.fc14 set to be installed
—> Package xen-libs.x86_64 0:4.0.1-1.fc14 set to be installed
–> Processing Dependency: xen-licenses for package: xen-libs-4.0.1-1.fc14.x86_64
—> Package xen-runtime.x86_64 0:4.0.1-1.fc14 set to be installed
–> Processing Dependency: xen-hypervisor-abi = 4.0 for package: xen-runtime-4.0.1-1.fc14.x86_64
–> Processing Dependency: /usr/bin/qemu-nbd for package: xen-runtime-4.0.1-1.fc14.x86_64
–> Processing Dependency: /usr/bin/qemu-img for package: xen-runtime-4.0.1-1.fc14.x86_64
–> Running transaction check
—> Package qemu-common.x86_64 2:0.13.0-0.5.20100809git25fdf4a.fc14 set to be installed
—> Package qemu-img.x86_64 2:0.13.0-0.5.20100809git25fdf4a.fc14 set to be installed
—> Package xen-hypervisor.x86_64 0:4.0.1-1.fc14 set to be installed
—> Package xen-licenses.x86_64 0:4.0.1-1.fc14 set to be installed
–> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================
Package Arch Version Repository Size
===================================================================================================================
Installing:
xen x86_64 4.0.1-1.fc14 fedora 1.0 M
Installing for dependencies:
PyXML x86_64 0.8.4-25.fc14 updates-testing 894 k
qemu-common x86_64 2:0.13.0-0.5.20100809git25fdf4a.fc14 fedora 258 k
qemu-img x86_64 2:0.13.0-0.5.20100809git25fdf4a.fc14 fedora 169 k
xen-hypervisor x86_64 4.0.1-1.fc14 fedora 3.5 M
xen-libs x86_64 4.0.1-1.fc14 fedora 378 k
xen-licenses x86_64 4.0.1-1.fc14 fedora 59 k
xen-runtime x86_64 4.0.1-1.fc14 fedora 4.6 M

Transaction Summary
===================================================================================================================
Install 8 Package(s)

Total download size: 11 M
Installed size: 31 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 11 M
(1/8): PyXML-0.8.4-25.fc14.x86_64.rpm | 894 kB 00:03
(2/8): qemu-common-0.13.0-0.5.20100809git25fdf4a.fc14.x86_64.rpm | 258 kB 00:00
(3/8): qemu-img-0.13.0-0.5.20100809git25fdf4a.fc14.x86_64.rpm | 169 kB 00:00
(4/8): xen-4.0.1-1.fc14.x86_64.rpm | 1.0 MB 00:04
(5/8): xen-hypervisor-4.0.1-1.fc14.x86_64.rpm | 3.5 MB 00:15
(6/8): xen-libs-4.0.1-1.fc14.x86_64.rpm | 378 kB 00:01
(7/8): xen-licenses-4.0.1-1.fc14.x86_64.rpm | 59 kB 00:00
(8/8): xen-runtime-4.0.1-1.fc14.x86_64.rpm | 4.6 MB 00:20
——————————————————————————————————————-
Total 236 kB/s | 11 MB 00:47
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : xen-licenses-4.0.1-1.fc14.x86_64 1/8
Installing : xen-libs-4.0.1-1.fc14.x86_64 2/8
Installing : PyXML-0.8.4-25.fc14.x86_64 3/8
Installing : 2:qemu-img-0.13.0-0.5.20100809git25fdf4a.fc14.x86_64 4/8
Installing : 2:qemu-common-0.13.0-0.5.20100809git25fdf4a.fc14.x86_64 5/8
Installing : xen-hypervisor-4.0.1-1.fc14.x86_64 6/8
Installing : xen-runtime-4.0.1-1.fc14.x86_64 7/8
Non-fatal POSTIN scriptlet failure in rpm package xen-runtime-4.0.1-1.fc14.x86_64
Restarting xenconsoled (via systemctl): Job failed, see system logs for details.
[FAILED]
warning: %post(xen-runtime-4.0.1-1.fc14.x86_64) scriptlet failed, exit status 1
Installing : xen-4.0.1-1.fc14.x86_64 8/8
Non-fatal POSTIN scriptlet failure in rpm package xen-4.0.1-1.fc14.x86_64
Restarting xend (via systemctl): Job failed, see system logs for details.
[FAILED]
warning: %post(xen-4.0.1-1.fc14.x86_64) scriptlet failed, exit status 1

Installed:
xen.x86_64 0:4.0.1-1.fc14

Dependency Installed:
PyXML.x86_64 0:0.8.4-25.fc14 qemu-common.x86_64 2:0.13.0-0.5.20100809git25fdf4a.fc14
qemu-img.x86_64 2:0.13.0-0.5.20100809git25fdf4a.fc14 xen-hypervisor.x86_64 0:4.0.1-1.fc14
xen-libs.x86_64 0:4.0.1-1.fc14 xen-licenses.x86_64 0:4.0.1-1.fc14
xen-runtime.x86_64 0:4.0.1-1.fc14

Complete!

Then install libvirt 0.8.3

# yum install libvirt libvirt-python python-virtinst virt-manager virt-viewer
# chkconfig libvirtd on

Now checkout and build 2.6.32.21 pvops kernel

# git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xen
# cd linux-2.6-xen
# git checkout -b xen/stable-2.6.32.x origin/xen/stable-2.6.32.x
# git branch
xen/master
* xen/stable-2.6.32.x - current branch
# make menuconfig



# make -j(x)number_of_cores
# make modules_install install

Comment out all xen bridging declarations in /etc/xen/xend-config.sxp except

(network-script /bin/true)

Another option to install Dom0 kernel is via Michael Young kernel-2.6.32.21-167.xendom0.fc12.src.rpm

# wget
# yum install transfig texi2html libaio-devel \
dev86 glibc-devel.i686 \
e2fsprogs-devel gitk iasl
# rpm -iv kernel-2.6.32.21-167.xendom0.fc12.src.rpm
# cd /root/rpmbuild/SPECS
# rpmbuild -bb ./kernel.spec
# cd ../RPMS/x86_64
# yum install \
kernel-2.6.32.21-167.xendom0.fc14.x86_64.rpm \
kernel-devel-2.6.32.21-167.xendom0.fc14.x86_64.rpm \
kernel-debuginfo-2.6.32.21-167.xendom0.fc14.x86_64.rpm \
kernel-headers-2.6.32.21-167.xendom0.fc14.x86_64.rpm \
kernel-debuginfo-common-x86_64-2.6.32.21-167.xendom0.fc14.x86_64.rpm

Creating network initscripts
In the /etc/sysconfig/network-scripts directory it is neccessary
to create 2 config files. The first (ifcfg-eth0) defines your physical
network interface, and says that it will be part of a bridge:

# yum install bridge-utils


# cat > ifcfg-eth0 <DEVICE=eth0
HWADDR=00:16:76:D6:C9:45
ONBOOT=yes
BRIDGE=br0
NM_CONTROLLED=no
EOF

Obviously change the HWADDR to match your actual NIC’s address.

The second config file (ifcfg-br0) defines the bridge device:

# cat > ifcfg-br0 <DEVICE=br0
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes
DELAY=0
NM_CONTROLLED=no
EOF

Disable NetworkManager per [1]

# chkconfig NetworkManager off
# chkconfig network on
# service network start

Create grub entry keeping in mind init=/sbin/upstart to be second parameter kernel command line [2].

title Xen 4.0.1 Fedora (2.6.32.21)
root (hd0,8)
kernel /xen.gz
module /vmlinuz-2.6.32.21 init=/sbin/upstart ro root=/dev/mapper/vg_fedora14-lv_root LANG=US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us
module /initramfs-2.6.32.21.img

In case of rebuilding kernel-2.6.32.21-167.xendom0.fc12.src.rpm

title Xen 4.0.1 Fedora (vmlinuz-2.6.32.21-167.xendom0.fc14.x86_64)
root (hd0,8)
kernel /xen.gz
module /vmlinuz-2.6.32.21-167.xendom0.fc14.x86_64 init=/sbin/upstart ro root=/dev/mapper/vg_fedora14-lv_root LANG=US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us
module /initramfs-2.6.32.21-167.xendom0.fc14.x86_64.img

Reboot

[root@fedora14a ~]# xm info
host : fedora14a
release : 2.6.32.21-167.xendom0.fc14.x86_64
version : #1 SMP Mon Sep 6 13:55:35 MSD 2010
machine : x86_64
nr_cpus : 4
nr_nodes : 1
cores_per_socket : 4
threads_per_core : 1
cpu_mhz : 2833
hw_caps : bfebfbff:20100800:00000000:00000940:0408e3fd:00000000:00000001:00000000
virt_caps : hvm
total_memory : 8190
free_memory : 1668
node_to_cpu : node0:0-3
node_to_memory : node0:1668
node_to_dma32_mem : node0:858
max_node_id : 0
xen_major : 4
xen_minor : 0
xen_extra : .1
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler : credit
xen_pagesize : 4096
platform_params : virt_start=0xffff800000000000
xen_changeset : unavailable
xen_commandline :
cc_compiler : gcc version 4.5.1 20100812 (Red Hat 4.5.1-1) (GCC)
cc_compile_by : mockbuild
cc_compile_domain : (none)
cc_compile_date : Wed Aug 25 20:17:21 UTC 2010
xend_config_format : 4

Now brctl should report :-
[root@fedora14a ~]# brctl show

bridge name bridge id STP enabled interfaces
br0 8000.90e6ba2d11eb no eth0
virbr0 8000.000000000000 yes







Setup compiz

# yum install compiz*



References
1.
2.

阅读(1367) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~