I've had a quick look at the README.Debian

It is not completely fixed, but now it covers the networking stuff

Other things like setting up ISO images need to be corrected too

>From 008b381bdefb084e4d5c07a04ad5740a813189cf Mon Sep 17 00:00:00 2001
From: Daniel Pocock <dan...@pocock.com.au>
Date: Wed, 6 Mar 2013 22:53:56 +0100
Subject: [PATCH 1/6] README.Debian: Remove comment about block-based storage
 repositories unsupport on Debian

---
 debian/README.Debian |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index 3171207..7149015 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -4,8 +4,7 @@ xen-api for Debian author's notes
 This is the XCP toolstack ported to Debian. Installing these packages will turn
 a Debian system into an XCP virtualization host. While we aim to be
 functionally equivalent to a standard XCP system, not all features are
-currently ported to Debian. Noteably, block-based storage repositories have
-been disabled.
+currently ported to Debian.
 
  -- Jon Ludlam <jonathan.lud...@eu.citrix.com>  Thu, 07 Jul 2011 21:50:18 +0100
 
-- 
1.7.10.4

>From e910804dc2ea30e6c8a2471e451bf402f205f8fe Mon Sep 17 00:00:00 2001
From: Daniel Pocock <dan...@pocock.com.au>
Date: Wed, 6 Mar 2013 22:54:27 +0100
Subject: [PATCH 2/6] README.Debian: fix typo

---
 debian/README.Debian |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index 7149015..3a3f88b 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -10,7 +10,7 @@ currently ported to Debian.
 
 Quick setup and howto
 ---------------------
-0/ Important nodes
+0/ Important notes
 ------------------
 In this howto, we will pretend that you'll be setting-up a server called
 node1234 with IP address 12.34.56.78. Obviously, the reader will adapt and replace
-- 
1.7.10.4

>From 2e5e83b22c33faeee33ec9bd4288d3bb3f6f4cff Mon Sep 17 00:00:00 2001
From: Daniel Pocock <dan...@pocock.com.au>
Date: Wed, 6 Mar 2013 23:00:57 +0100
Subject: [PATCH 3/6] README.Debian: add notes about suitability of XCP

---
 debian/README.Debian |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/debian/README.Debian b/debian/README.Debian
index 3a3f88b..5d7a6a6 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -8,6 +8,33 @@ currently ported to Debian.
 
  -- Jon Ludlam <jonathan.lud...@eu.citrix.com>  Thu, 07 Jul 2011 21:50:18 +0100
 
+Deciding whether to use XCP - XAPI
+----------------------------------
+
+XCP-XAPI has a rigid structure.  If you install and use this
+virtualisation suite, it must completely take over your physical machine
+in various ways.
+
+In particular, you should be aware of the following:
+
+* xcp-networkd manages your host network.  You can no longer set
+  IP addresses and routing using other mechanisms such as
+  /etc/network/interfaces.  xcp-networkd doesn't support all the
+  things you may implement in a normal host.
+* The storage system wants your raw disks.  It does NOT use your
+  existing LVM PV or VG, rather, it needs to create it's own PV,
+  VG and LVs on demand.  If you do tell it to work within an LV
+  that you have created, it will use the LV as a PV, and
+  you will end up with a nested VG.
+
+That said, you still have significant discretion to customise
+the dom0 environment in some ways, just keep away from the
+things that the XCP infrastructure wants to control.
+
+If you don't like this approach and want fine grained control of
+network addresses, bridging and firewalling, consider using the 
+XL toolstack instead of XCP.
+
 Quick setup and howto
 ---------------------
 0/ Important notes
-- 
1.7.10.4

>From 0d7969cb95982ba3e6f339f99f0d6b917af54f27 Mon Sep 17 00:00:00 2001
From: Daniel Pocock <dan...@pocock.com.au>
Date: Wed, 6 Mar 2013 23:02:12 +0100
Subject: [PATCH 4/6] README.Debian: add more notes about suitability of XCP

---
 debian/README.Debian |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/debian/README.Debian b/debian/README.Debian
index 5d7a6a6..f48f487 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -35,6 +35,10 @@ If you don't like this approach and want fine grained control of
 network addresses, bridging and firewalling, consider using the 
 XL toolstack instead of XCP.
 
+On the other hand, the benefit of this rigidity is that you
+can quickly build a system that supports scaling, XenMotion and other
+enterprise paradigms.
+
 Quick setup and howto
 ---------------------
 0/ Important notes
-- 
1.7.10.4

>From 5b6e8cb49adbd8e9c344226062cf0e1ddb8f728b Mon Sep 17 00:00:00 2001
From: Daniel Pocock <dan...@pocock.com.au>
Date: Wed, 6 Mar 2013 23:03:04 +0100
Subject: [PATCH 5/6] README.Debian: change squeeze referecnes

---
 debian/README.Debian |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index f48f487..19c1979 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -62,7 +62,7 @@ xe network-list bridge=xenbr0
 
 and copy/paste the information somewhere for later use as well.
 
-1/ Install Debian squeeze
+1/ Install Debian wheezy
 -------------------------
 Make sure you use LVM, and leave enough free space on the VG to be able to host
 VMs. What I use is a 2GB RAID1 rootfs on 2 disks, then a 990 GB RAID10 array on
@@ -293,7 +293,7 @@ xe vm-param-set uuid=$vm \
 Let's say you wanted to use an iso image rather than the ftp repository,
 which image would be in your iso SR (see above), then you could have done
 this way:
-xe vm-cd-add vm=windows cd-name=squeeze.iso device=3
+xe vm-cd-add vm=windows cd-name=wheezy.iso device=3
 
 Before you start it, you can set it's memory to 1GB:
 xe vm-memory-limits-set static-min=1024MiB static-max=1024MiB \
@@ -312,7 +312,7 @@ xe vdi-resize uuid=<UUID-OF-THE-VDI> disk-size=10GiB
 6.3/ Cloning the newly created VM
 Since we've done quite some work, it could be possible to clone our virtual
 machine to later do another install:
-xe vm-clone new-name-label=squeeze-32-bits-1024mb vm=$vm
+xe vm-clone new-name-label=wheezy-32-bits-1024mb vm=$vm
 
 6.4/ Life and death of a VM
 Finally start the VM:
-- 
1.7.10.4

>From 50507a5f3c1219333807e6465fa2bc761c231042 Mon Sep 17 00:00:00 2001
From: Daniel Pocock <dan...@pocock.com.au>
Date: Wed, 6 Mar 2013 23:13:02 +0100
Subject: [PATCH 6/6] README.Debian: add notes about networking issues, see
 bugs #695221 and #702337

---
 debian/README.Debian |   66 +++++++++++++++++++++++---------------------------
 1 file changed, 30 insertions(+), 36 deletions(-)

diff --git a/debian/README.Debian b/debian/README.Debian
index 19c1979..36e7744 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -136,55 +136,49 @@ Since this is not yet implemented, please refer to the /etc/default/xen
 file for an eventual explanation.
 
 4.2/ Configure network to use a bridge xenbr0
-The following will convert a static IP configuration on eth0 to a bridged
-physical interface using xenbr0:
-sed -i "s/allow-hotplug eth0/auto xenbr0/" /etc/network/interfaces
-sed -i "s/iface eth0/iface xenbr0/"/etc/network/interfaces
-echo "  bridge_ports eth0" >>/etc/network/interfaces
 
-In other words, the following /etc/network/interfaces would do:
+You need to deliberately clobber your interfaces file like so:
 
+cp -n /etc/network/interfaces /etc/network/interfaces.bak-xcp &&
+cat > /etc/network/interfaces << EOF
 auto lo
 iface lo inet loopback
+EOF
 
-auto xenbr0
-iface xenbr0 inet static
-        bridge_ports eth0
-        address 12.34.56.78
-        netmask 255.255.255.0
-        network 12.34.56.0
-        broadcast 12.34.56.255
-        gateway 12.34.56.1
-
-If you are using DHCP, then this will fit you:
-auto lo xenbr0
-iface lo inet loopback
-
-iface eth0 inet manual
-
-iface xenbr0 inet dhcp
-        bridge_ports eth0
-
-Note that if you are using openvswitch together with XCP, and the xcp-networkd
-daemon, it is overly important that you do setup your xenbr0 as per above,
-because otherwise, you will loose all network connectivity on next reboot,
-as a xenbr0 interface will be setup automatically, and your eth0 will *not*
-be automatically set in the forwarding state (eg: it will stay disabled, which
-means no connectivity).
-
-If you intend to run XCP using Open vSwitch (that is, if your
-/etc/xcp/network.conf contains "openvswitch" and not "bridge), then you should
-tell XCP about your network configuration:
+and then use xe to configure the network:
 
 PIF_UUID=`xe pif-list device=eth0`
-xe pif-reconfigure-ip uuid=$PIF_UUID mode=static \
-	IP=1.2.3.4 netmask=255.255.255.0 gateway=1.2.3.1
+xe pif-reconfigure-ip mode=static DNS=1.2.3.4 \
+     ip=12.34.56.78 netmask=255.255.255.0 gateway=12.34.56.1 \
+     uuid=$PIF_UUID
 
 Note that it will survive reboots. If you use dhcp, then simply use:
 
 PIF_UUID=`xe pif-list device=eth0`
 xe pif-reconfigure-ip uuid=$PIF_UUID mode=dhcp
 
+IMPORTANT BUG:
+
+  *** pif-reconfigure-ip silently converts your netmask to /32 ***
+
+   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695221
+
+If you have a /29 network, for example, pif-reconfigure-ip will
+configure your host using a /32 netmask.   This almost always
+leads to a complete loss of connectivity on the next boot.
+
+Therefore, as a workaround, it is necessary to do the following:
+
+a) run the pif-reconfigure-ip anyway, giving it your valid netmask
+b) stop xcp-networkd
+c) manually edit /var/lib/xcp/networkd.db
+d) look for the bits (e.g. 24 or 32) in the file, change it to the actual
+   prefix length of your subnet (e.g. 29 for a /29 subnet)
+e) save the file
+f) start xcp-networkd again
+g) try rebooting, verify networking is good before doing any real work
+   with the server
+
 4.3/ Set Xen as default in GRUB
 cd /etc/grub.d
 mv 10_linux 25_linux
-- 
1.7.10.4

Reply via email to