X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=INSTALL.XenServer;h=e45d5bca025079a83600f63d8e694ab95748da13;hb=refs%2Fheads%2Fof1.1;hp=35d2cc66f52e53f3985c02b891596f8afabb64b7;hpb=454b299181be4e614e1dbc19bc7929ae9bfef439;p=openvswitch diff --git a/INSTALL.XenServer b/INSTALL.XenServer index 35d2cc66..e45d5bca 100644 --- a/INSTALL.XenServer +++ b/INSTALL.XenServer @@ -10,56 +10,69 @@ These instructions have been tested with XenServer 5.6 FP1. Building Open vSwitch for XenServer ----------------------------------- -The recommended build environment to build RPMs for Citrix XenServer -is the DDK VM available from Citrix. If you are building from an Open -vSwitch distribution tarball, this VM has all the tools that you will -need. If you are building from an Open vSwitch Git tree, then you -will need to first create a distribution tarball elsewhere, by running -"./boot.sh; ./configure; make dist" in the Git tree, because the DDK -VM does not include Autoconf or Automake that are required to -bootstrap the Open vSwitch distribution. - -Once you have a distribution tarball, copy it into -/usr/src/redhat/SOURCES inside the VM. Then execute the following: +You may build from an Open vSwitch distribution tarball or from an +Open vSwitch Git tree. The recommended build environment to build +RPMs for Citrix XenServer is the DDK VM available from Citrix. + +1. If you are building from an Open vSwitch Git tree, then you will + need to first create a distribution tarball by running "./boot.sh; + ./configure; make dist" in the Git tree. You cannot run this in + the DDK VM, because it lacks tools that are necessary to bootstrap + the Open vSwitch distribution. Instead, you must run this on a + machine that has the tools listed in INSTALL.Linux as prerequisites + for building from a Git tree. + +2. Copy the distribution tarball into /usr/src/redhat/SOURCES inside + the DDK VM. + +3. In the DDK VM, unpack the distribution tarball into a temporary + directory and "cd" into the root of the distribution tarball. + +4. To build Open vSwitch userspace, run: + + rpmbuild -bb xenserver/openvswitch-xen.spec + + This produces three RPMs in /usr/src/redhat/RPMS/i386: + "openvswitch", "openvswitch-modules-xen", and + "openvswitch-debuginfo". + +Build Parameters +---------------- + +openvswitch-xen.spec needs to know a number of pieces of information +about the XenServer kernel. Usually, it can figure these out for +itself, but if it does not do it correctly then you can specify them +yourself as parameters to the build. Thus, the final "rpmbuild" step +above can be elaborated as: VERSION= KERNEL_NAME= KERNEL_VERSION= KERNEL_FLAVOR= - cd /tmp - tar xfz /usr/src/redhat/SOURCES/openvswitch-$VERSION.tar.gz rpmbuild \ -D "openvswitch_version $VERSION" \ -D "kernel_name $KERNEL_NAME" \ -D "kernel_version $KERNEL_VERSION" \ -D "kernel_flavor $KERNEL_FLAVOR" \ - -bb openvswitch-$VERSION/xenserver/openvswitch-xen.spec + -bb xenserver/openvswitch-xen.spec where: is the version number that appears in the name of the Open vSwitch tarball, e.g. 0.90.0. - is the name of the Xen Kernel, - e.g. kernel-xen or kernel-NAME-xen. By convention, the name - starts with "kernel-" and ends with "-xen". - This can be obtained by executing - 'rpm -q --queryformat "%{Name}" kernel.*xen' - with the "kernel-" stripped out using sed 's/kernel-//' - e.g. kernel-NAME-xen => NAME-xen + is the name of the XenServer kernel package, + e.g. kernel-xen or kernel-NAME-xen, without the "kernel-" prefix. is the output of: - rpm -q --queryformat "%{Version}-%{Release}" kernel.*xen-devel - e.g. 2.6.32.12-0.7.1.xs5.6.100.323.170596 + rpm -q --queryformat "%{Version}-%{Release}" , + e.g. 2.6.32.12-0.7.1.xs5.6.100.323.170596, where is + the name of the -devel package corresponding to . is either "xen" or "kdump". The "xen" flavor is the main running kernel flavor and the "kdump" flavor is the crashdump kernel flavor. Commonly, one would specify "xen" here. -Three RPMs will be output into /usr/src/redhat/RPMS/i386, whose names begin -with "openvswitch", "openvswitch-modules-xen" (if building for kernel_flavor=xen), -and "openvswitch-debuginfo". - Installing Open vSwitch for XenServer ------------------------------------- @@ -92,7 +105,7 @@ When Open vSwitch is installed on XenServer, its startup script /etc/init.d/openvswitch runs early in boot. It does roughly the following: - * Loads the OVS kernel module, openvswitch_mod. + * Loads the OVS kernel module, openvswitch. * Starts ovsdb-server, the OVS configuration database. @@ -142,7 +155,7 @@ command. The plugin script does roughly the following: configuration to a known state. One effect of emer-reset is to deconfigure any manager from the OVS database. - * If XAPI is configured for a manger, configures the OVS + * If XAPI is configured for a manager, configures the OVS manager to match with "ovs-vsctl set-manager". The Open vSwitch boot sequence only configures an OVS configuration