CentOS 6 VM (32 bit) automated installation on XCP
Install Type
- Non-interactive
- Network boot
- Commandline
Introduction
This tutorial was written in the spirit of my CentOS 6 virtual machine (32 bit) installation on Xen howto which was based on the CentOS 5 version of the same. In those tutorials I created a disk, downloaded a kernel, kickstart file plus a xen config file which installed CentOS using the kickstart file. This has proven very popular since you can't install a paravirtualized domain using an install disk. This has been a very nice installation howto because you don't have to download any install CD/DVDs and you could create VMs using nothing more than a commandline login. It's also very nice because it can be mirrored locally if you're doing a bunch of them just by rsyncing a CentOS mirror locally then downloading my files and editing them.
I've recently migrated a lot of my XEN systems to Xen Cloud Platform and it's a very different animal indeed. However, I still needed a system of creating CentOS Virtual Machines in that same manner. I didn't want to download a CentOS install DVD or need a graphical login to install the OS thus this tutorial was born.
It uses the very same CentOS 6 kickstart file from my site as the Xen tutorial. It also uses the very same CentOS 6 repositories on the Internet so in a lot aspects it IS the same tutorial crafted for XCP but will be a bit shorter.
More after the jump.
CentOS 6 VM (64 bit) automated installation on XCP
Install Type
- Non-interactive
- Network boot
- Commandline
Introduction
This tutorial was written in the spirit of my CentOS 6 virtual machine (64 bit) installation on Xen howto which was based on the CentOS 5 version of the same. In those tutorials I created a disk, downloaded a kernel, kickstart file plus a xen config file which installed CentOS using the kickstart file. This has proven very popular since you can't install a paravirtualized domain using an install disk. This has been a very nice installation howto because you don't have to download any install CD/DVDs and you could create VMs using nothing more than a commandline login. It's also very nice because it can be mirrored locally if you're doing a bunch of them just by rsyncing a CentOS mirror locally then downloading my files and editing them.
I've recently migrated a lot of my XEN systems to Xen Cloud Platform and it's a very different animal indeed. However, I still needed a system of creating CentOS Virtual Machines in that same manner. I didn't want to download a CentOS install DVD or need a graphical login to install the OS thus this tutorial was born.
It uses the very same CentOS 6 kickstart file from my site as the Xen tutorial. It also uses the very same CentOS 6 repositories on the Internet so in a lot aspects it IS the same tutorial crafted for XCP but will be a bit shorter.
Creating an iSCSI target on Xen Cloud Platform 1.1
Creating an iSCSI target on Xen Cloud Platform 1.1
Premise: I have two pools – The first has one host in it that acts as a router, firewall and Host for a couple of special VMs for (DNS, DHCP, NFS, Web) the hosts in a second pool. I've added iSCSI SAN to it's lists of jobs using a software iSCSI target in the 8 steps below.
1. Install tgt from CentOS repos
[root@cloud0 ~]# yum --enablerepo=base install scsi-target-utils
2. Start the tgt service
[root@cloud0 ~]# service tgtd start
[root@cloud0 ~]# chkconfig tgtd on
3. Preparing for LVM
I'm using a separate hard drive - /dev/sdb and creating one partition which will be used as my LVM Physical Volume. We'll then add it to the Volume Group and carve it up into Logical Volumes. This way I can just add another hard drive to the Volume Group when we want more capacity and the rest of the tutorial stays the same. The bold letters are what I input, I accepted the defaults everywhere else.
Fix XCP expired license issue
If you're running virtually any version of Xen Cloud Platform you may have run into this error message.
Your license has expired. Please contact your support representative.
It's not really possible to have an expired license on Xen Cloud Platform (XCP) since it's FREE. It's just a regressive bug that has been very stubborn. However, until they fix it for real in XCP 1.5 you'll need follow the steps below.
Open a root terminal on the XCP host and copy and paste the commands below.
service xapi stop;sleep 5
NEXTMONTH=`date --date="next Month" '+%Y%m%d'`
sed -i "s/\(expiry.\{3\}\)[0-9]\{8\}/\1$NEXTMONTH/g" /var/xapi/state.db
service xapi start
echo done
The last line is only to get all the important lines to run automatically. If you don't hit enter it doesn't hurt anything. You could also copy and paste these lines into a script and have it run as a cronjob. Because XCP doesn't like you bumping it's "evaluation license" out more than 30 days you might want to run the cronjob once a week to make sure your license doesn't lapse while you're waiting for the cronjob to run
How to create custom XCP templates
Creating a template
The following is how to create new custom templates based on existing templates in Xen Cloud Platform.
1. Get the template UUID that we want to use as our base. As usual just copy and paste the line in yellow into a root terminal on your XCP host.
xe template-list | grep -B1 name-label | awk -F: '{print $2}'
The output should look like this..
688c625b-93b8-8e66-62e5-4542eca1e597
Red Hat Enterprise Linux 6 (32-bit)
c4e28252-030f-524a-c5d8-7da85df3ccf5
Windows Server 2003 (64-bit)
......
Scroll through the list and find the template you want to clone then copy and past it's UUID number ie. 688c625b-93b8-8e66-62e5-4542eca1e597. Choose a new name for your custom template and enter the following line with the UUID of the template you want to clone and the name you want it to have.
xe vm-clone uuid=<UUID> new-name-label="<NAME>" xe template-param-set uuid=<UUID> other-config:install-methods=http,ftp,nfs other-config:default_template=true
Now you should have a new template of your own that you can customize. More after the jump.
OpenSuse 11.4 VM (64 bit) interactive installation on XCP
Install Type
- Interactive
- Network boot
- Commandline
Introduction
This tutorial was written in the spirit of my CentOS 6 VM (64 bit) automated installation on XCP howto. In that tutorial I do an automated network installation of CentOS 6. This has proven very popular since you can't install a paravirtualized domain using a physical install media. This has been a very nice installation howto because you don't have to download any install CD/DVDs and you could create VMs using nothing more than a commandline login. It's also very nice because it can be mirrored locally if you're doing a bunch of them just by rsyncing a CentOS mirror locally then downloading my files and editing them.
There became a need to do the same thing using OpenSuse thus this tutorial.