RSS feed

S3FS on XenServer 5.6

August 7th, 2011 | Posted in AWS, Linux, Xen | No Comments

Get s3fs going on xenserver 5.6:
yum remove fuse fuse*
yum --enablerepo=base install yum-utils
yumdownloader --enablerepo=base e2fsprogs-devel
rpm --nodeps -Uvh e2fsprogs-devel*.rpm
yum install gcc libstdc++-devel gcc-c++ curl curl* curl-devel libxml2 libxml2* libxml2-devel openssl-devel mailcap
cd /usr/local/src
wget --no-check-certificate "https://downloads.sourceforge.net/project/fuse/fuse-2.X/2.8.4/fuse-2.8.4.tar.gz?r=&ts=1312707573&use_mirror=kent"
tar -zxff fuse-2.8.4.tar.gz
cd fuse-2.8.4
./configure --prefix=/usr && make && make install
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig/
ldconfig
modprobe fuse
pkg-config --modversion fuse (confirm correct version)
cd ../
wget http://s3fs.googlecode.com/files/s3fs-1.59.tar.gz
tar -zxf s3fs-1.59.tar.gz
cd s3fs-1.59
./configure --prefix=/usr && make && make install
vi /etc/passwd-s3fs (add aws id and secret key in format xxxxx:xxxxx)
mkdir /mnt/s3drive
s3fs bucket /mnt/s3drive

dump all running vms/data to the AWS S3 cloud mount (/mnt/s3drive)


Adding an ISO repository on XenServer 5.5

March 6th, 2010 | Posted in Blog, Xen | 2 Comments

In order to do advanced installs or installations where there are no templates under XenCenter and you wish to use your own custom ISO images, you can add an ISO repository. The following steps outlines what needs to be done;

mkdir -p /var/opt/xen/iso_import

Copy your ISO image to this directly, but be careful as the control domain filesystem has limited space and if this fills up, unpredictable behaviour will follow.

Next up you need to create the repository by running


xe sr-create name-label=ISOs type=iso device-config:location=/var/opt/xen/iso_import device-config:legacy_mode=true content-type=iso


You need to mount the new repository so it’s available on XenCenter

xe-mount-iso-sr /var/opt/xen/iso_import

You can now proceed to create your VM using the ISO repository you just added.



Debian xenserver updates apt repository missing GPG key

August 13th, 2009 | Posted in Blog, Debian, Linux, Xen | No Comments

After you’ve installed XenTools on your VM and you try to do a apt-get update you are greeted with a GPG error message saying that the repository isn’t trusted. This is because the GPG key Citrix use to sign their packages has not been added to the apt keyring.

To fix it, run;

wget -q http://updates.vmd.citrix.com/XenServer/5.5.0/GPG-KEY -O- | apt-key add —



error: xenconsole: Could not open tty `/dev/pts/2': No such file or directory

August 13th, 2009 | Posted in Blog, Linux, Xen | No Comments

Error: xenconsole: Could not open tty `/dev/pts/2′: No such file or directory

Check whether xenconsoled is running, if not;

 

/etc/init.d/xend start

or

xenconsoled



PTY allocation request failed on channel 0

January 16th, 2009 | Posted in Debian, Linux, Xen | No Comments

After creating a new VM on Debian Lenny, I got the following when trying to ssh into the DomU;

PTY allocation request failed on channel 0
stdin: is not a tty

Run the following to fix the issue;

apt-get install udev



Xen on Debian Etch

December 2nd, 2008 | Posted in Debian, Xen | No Comments

I’ve been testing out a few virtualization systems and am sofar very pleased with Xen. Installing on Debian Etch couldn’t be easier and it worked straight out the box – I had my first virtual server running in under 15 minutes flat!

Use the following commands to install Xen on a Debian Etch machine:

apt-get install xen-linux-system-2.6.18-4-xen-686 libc6-xen bridge-utils

This will install the Xen kernel (2.6.18-5-xen-686 #1 SMP), the libc6-xen libraries which is optimized for the Xen hypervisor and the utilities for configuring the Linux ethernet bridge.

Next up is a reboot into your newly installed kernel:

reboot

Once the machine is back online you need to install the xen-tools package which allows you easily create new guest Xen domains on your Debian Etch host:

apt-get install xen-tools

Next, modify the Xen config file (/etc/xen/xend-config.sxp) and enable:

(network-script network-bridge)

You also need to modify /etc/xen-tools/xen-tools.conf to set kernel and initrd parameters as well as the disk and sizing options for your vistual servers.

You can easily find out what your kernel and initrd image is named by typing:

ls /boot/vmlinuz* /boot/initrd*

This will list the kernel and initrd names for your system. Remember, your after the xen kernel and initrd images!

/boot/initrd.img-2.6.18-5-xen-686

/boot/vmlinuz-2.6.18-5-xen-686

Continue and edit the xen-tools configuration file

vi /etc/xen-tools/xen-tools.conf

#
# Default kernel and ramdisk to use for the virtual servers
#
kernel = /boot/vmlinuz-2.6.18-5-xen-686
initrd = /boot/initrd.img-2.6.18-5-xen-686

dir = /data/vservers
debootstrap = 1
gateway   = 172.16.0.1
netmask   = 255.255.255.0

size   = 6Gb
memory = 256Mb
swap   = 256Mb
fs     = ext3
dist   = etch
image  = sparse

Next, create the directory where your virtual servers will reside:

mkdir -p /data/vservers/domains

Now your ready to create your first virtual server! Use the following command to create it:

xen-create-image -hostname=dns -ip=172.16.0.25 -passwd

It will take a minute or two to create the virtual server after which you can fire it up by using:

xm create dns.cfg

Your virtual server should be started up and ready for you to use.. You can either ssh to the IP you created the server with or attach to it from the host using:

xm console dns

Have fun with your Xen virtual machine!




Categories