How To: Install XenServer 7 on a Dedibox (Online.net)


XenServer 7 installation on a Online.net Dedibox via PXE boot using an answerfile. on

XenServer Installation

Requirements

  • Webserver
  • XenServer ISO (http://downloadns.citrix.com.edgesuite.net/11616/XenServer-7.0.0-main.iso)

At first install a minimal OS (ie. Debian/Ubuntu) on your Dedibox. When the installation is finished, log into this server and take a note of the network configuration. You will need the IP, Gateway and Subnet mask.

Download and Unzip XenServer ISO

wget http://downloadns.citrix.com.edgesuite.net/11616/XenServer-7.0.0-main.iso
mount -o loop XenServer-7.0.0-main.iso /mnt/xen
cp -a /mnt/xen /var/www

Generate Answerfile

Here is an example of a Answerfile for XenServer 7.

Make sure to double check your IP, Gateway and Subnet mask, otherwise you won't be able to contact your server after the installation.

<installation mode="fresh" srtype="lvm">
	<primary-disk gueststorage="yes">sda</primary-disk>
	<keymap>de</keymap>
	<hostname>xenserver7</hostname>
	<root-password>supersecure</root-password>
	<source type ="url">http://x.x.x.x/xen/</source>
	<!-- No Post install scripts configured -->
	<admin-interface name="eth0" proto="static">
		<ip>x</ip>
		<subnet-mask>x</subnet-mask>
		<gateway>x</gateway>
	</admin-interface>
	<nameserver>8.8.8.8</nameserver>
	<nameserver>8.8.4.4</nameserver>
	<timezone>Europe/Berlin</timezone>
	<time-config-method>ntp</time-config-method>
	<ntp-servers>ntp</ntp-servers>
	<ntpservers>0.de.pool.ntp.org</ntpservers>
	<ntpservers>1.de.pool.ntp.org</ntpservers>
	<ntpservers>2.de.pool.ntp.org</ntpservers>
</installation>

Copy the Answerfile into the root of the extracted ISO (in our case /var/www/xen/xenserver.xml).

Preparations for PXE boot on Dedibox

On your Dedibox download some files which are needed for the installation.

cd /boot
wget http://your-webserver.com/xen/install.img
wget http://your-webserver.com/xen/boot/vmlinuz
wget http://your-webserver.com/xen/boot/xen.gz

Now customize your grub.cfg, it should look like this:

menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-444013cc-90fd-4603-8fff-27f166e9f156' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_msdos
	insmod ext2
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  444013cc-90fd-4603-8fff-27f166e9f156
	else
	  search --no-floppy --fs-uuid --set=root 444013cc-90fd-4603-8fff-27f166e9f156
	fi
	multiboot /xen.gz dom0_mem=1024M acpi=off nosmp noirqbalance
	module /vmlinuz answerfile=http://<IP of the remote server>/xen/xenserver.xml install
	module /install.img
}

Note: you need to insert an IP address, so watch out when using virtual hosts.

Reboot

Now reboot your server, the installation should start after a few minutes.

You can check your webserver log i.e. via tail -f /var/log/nginx/access.log and if you see something like this the installation should have started.

163.172.x.y - - [25/Jun/2016:15:26:46 +0200] "GET /xen/xenserver.xml HTTP/1.1" 200 772 "-" "Python-urllib/2.7"
163.172.x.y - - [25/Jun/2016:15:26:48 +0200] "GET /xen/.treeinfo HTTP/1.1" 200 83 "-" "Python-urllib/2.7"
163.172.x.y - - [25/Jun/2016:15:26:48 +0200] "GET /xen/repodata/repomd.xml HTTP/1.1" 200 3708 "-" "Python-urllib/2.7"

After about 30 minutes you should see the XenServer 7 Welcome Page when you try to access your servers IP via any browser.

You can now connect to your newly installed XenServer via XenCenter (or just use XenOrchestra :P).


Leave a Comment:


Comments