XenAPI: Fix bug with Xen ext4-using guests

Ubuntu saucy is using ext4, which means it hits a barrier
bug with certain versions of Xen, leading to a read only
filesystem.

This is bug https://bugs.launchpad.net/ubuntu/+source/linux/+bug/824089

Change-Id: I9a72b203d473dc555324d44ad7c240c80dccda15
diff --git a/tools/xen/prepare_guest_template.sh b/tools/xen/prepare_guest_template.sh
index 6ea6f63..546ac99 100755
--- a/tools/xen/prepare_guest_template.sh
+++ b/tools/xen/prepare_guest_template.sh
@@ -79,3 +79,7 @@
     "$GUEST_PASSWORD" "$XS_TOOLS_PATH" "$STACK_USER" \\
     > /opt/stack/prepare_guest.log 2>&1
 EOF
+
+# Need to set barrier=0 to avoid a Xen bug
+# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/824089
+sed -i -e 's/errors=/barrier=0,errors=/' $STAGING_DIR/etc/fstab