We are proud to announce that you can now use the CloudInit system with XenServer, without any plugin to install on your hosts. Only by using Xen Orchestra.
Let's see what it can do for you and how to use it.
Cloud-init is a program "that handles early initialization of a cloud instance". In other words, you can, on a "cloud-init"-ready template VM, pass a lot of data at first boot:
- setting hostname
- add ssh keys
- grow automatically the file system
- create users
- and a lot more!
This tool is pretty standard and used everywhere. A lot of existing cloud templates are using it.
So it means customizing very easily your VM when you create it from a compatible template. It brings you closer to the "instance" principle, like in Amazon cloud or OpenStack.
Let's see a real use case. First, select your template and name it:
Then, activate the config drive and put your SSH key:
Want the new VM bigger than the existing template? No problem, edit the root disk size (template disk was 8 GiB originally):
Finally, create the VM. That's all:
Now start the VM and SSH on its IP, and it's magic: the system got the right VM hostname (from VM name) and you don't have to use a password to access it (thanks to your SSH key):
$ ssh firstname.lastname@example.org [centos@tmp-app1 ~]$
cloud-init configuration in CentOS allows you to be a sudoer directly:
[centos@tmp-app1 ~]$ sudo -s [root@tmp-app1 centos]#
Check the root file system size: indeed, it was automatically grown to what you need (remember, the template had a 8G disk):
[centos@tmp-app1 ~]$ df -h /dev/xvda1 20G 1,2G 18G 6% /
Now, you can work and make whatever you want on this VM!
No agent, no install
We managed to implement this feature without extra software to install on any XenServer. So basically, as soon you got a Xen Orchestra version up to 4.11, you have nothing to do: it just works. Pretty cool isn't it?
Give me some templates!
I was sure you wanted some of them ;) In a coming article, I'll give you some Ubuntu, Debian and CentOS templates, but also write a guide to do them properly.
They will be XVA templates, ready to import in Xen Orchestra, and they will appear in your template list when you create a VM.
Heading for the Cloud!
In the future, this feature combined to a self-service with quota, will allow you to let your users to create their own VMs/instances without setting anything on your side. That's clearly another step toward the cloud!
And that's not all. We'll provide soon more options for Cloud Config, e.g for creating users and directly put your own cloud-init file through the web interface if necessary!
Now, XenServer has a new rocket to push it into the Cloud. And this one is fast.