-
-
Save ionatan-israel/6075046 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
References: | |
[1] http://www.virtualzone.de/2012-05-01/ubuntu-12-04-on-citrix-xenserver-5-6/ | |
[2] http://thetechshop.org/showthread.php?847-Citrix-Xenserver-Template-for-Ubuntu-12.04-and-the-weird-Rebooting-to-Read-Only-Mode | |
Steps: | |
1. New VM | |
* Two choices: | |
- Install from ISO Library: ubuntu-12.04.1-server-amd64.iso | |
- Install from URL: http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ | |
* 2 vCPUs | |
* 2048 MB RAM | |
2. Manually or automatically configure the IP | |
IP: 10.???.???.??? (DHCP: 10.0.0.1 -- 10.0.0.255) | |
Netmask: 255.0.0.0 | |
Gateway: 10.255.255.254 | |
Name server: 8.8.8.8 | |
3. Make a separate /boot partition | |
A. Partition method: Manual | |
B. Virtual disk 1 (xvda) (assume to be 8GB, which is the default value for Ubuntu) | |
C. Create new empty partition: Yes | |
D. Create new partition -- /boot | |
a. 256MB | |
b. Primary | |
c. Beginning | |
d. Use as: Ext3 journaling file system <-- "Ext3" is IMPORTANT | |
e. Mount point: /boot | |
f. Reserved blocks: 1% | |
g: Bootable flag: on | |
h: Done setting up the partition | |
E. Create new partition -- / | |
a. 6GB | |
b. Primary | |
c. Beginning | |
d. Use as: Ext4 journaling file system (default) | |
e. Mount point: / (default) | |
f. Reserved blocks: 1% | |
g: Bootable flag: off (default) | |
h: Done setting up the partition | |
F. Create new partition -- swap | |
a. 2.3GB | |
b. Primary | |
c. Use as: swap area | |
d: Done setting up the partition | |
G. The result: | |
Virtual disk 1 (xvda) - 8.6 GB Xen Virtual Block Device | |
> #1 primary 254.8 MB B f ext3 /boot | |
> #2 primary 6.0 GB f ext4 / | |
> #3 primary 2.3 GB f swap swap | |
fdisk -l /dev/xvda | |
Device Boot Start End Blocks Id System | |
/dev/xvda1 * 2048 499711 248832 83 Linux | |
/dev/xvda2 499712 12218367 5859328 83 Linux | |
/dev/xvda3 12218368 16775167 2278400 82 Linux swap / Solaris | |
H. Finish partitioning and write changes to disk | |
I. Yes | |
4. No automatic updates | |
5. Select only "OpenSSH server" | |
6. Install GRUB boot loader to MBR: Yes. | |
7. UTC Time: Yes. | |
8. Boot, login, and become root. Command: | |
sudo -s | |
9. [2] Update /etc/fstab. Two ways to do it. | |
A. Use sed to do the job. Command: | |
cd /etc | |
mv fstab fstab.orig | |
cat fstab.orig | sed -e "s/errors=remount-ro/noatime,nodiratime,errors=remount-ro,nobarrier/" | sed -e "s/defaults/nobarrier/" > fstab | |
B. Or, manually replace | |
errors=remount-ro | |
with: | |
noatime,nodiratime,errors=remount-ro,nobarrier | |
and | |
defaults | |
with: | |
nobarrier | |
to fix the read-only file system issue. | |
10. Reboot. Command: | |
sync ; sync ; reboot | |
11. Boot, login, and become root. Command: | |
sudo -s | |
12. Install PV Linux kernel. Command: | |
apt-get install linux-virtual linux-image-virtual linux-headers-virtual | |
13. Remove Generic Linux kernel. Command: | |
apt-get remove linux-generic linux-headers-generic linux-image-generic | |
apt-get autoremove | |
cd /boot | |
rm *-generic | |
cd / | |
14. Update the grub boot loader. Command: | |
update-grub | |
15. Reboot to check if everything is ok. Command: | |
sync ; sync ; reboot | |
16. Boot, login, and become root. Command: | |
sudo -s | |
17. Select xs-tools.iso from "DVD Drive 1" | |
18. Mount XenServer Tools. Command: | |
mount /dev/xvdd /mnt | |
mount: block device /dev/xvdd is write-protected, mounting read-only | |
19. Install XenServer Tools. Command: | |
cd /mnt/Linux | |
dpkg -i *amd64.deb | |
cd / | |
umount /mnt | |
(It's ok to fail.) | |
sync ; sync; reboot | |
20. Eject xs-tools.iso from "DVD Drive 1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment