PROJET AUTOBLOG


Shaarli - Les discussions de Shaarli

Archivé

Site original : Shaarli - Les discussions de Shaarli

⇐ retour index

Install NetBSD (or any PV-capable system) on IBM's SoftLayer - Emile "iMil" Heitor 's home

jeudi 6 août 2015 à 12:05
GuiGui's Show - Liens
« At ${DAYWORK}, I happen to use IBM’s cloud: SoftLayer. It has all the features you’d expect from such a platform, and can instantiate pretty much any major GNU/Linux distribution you’d think of; but here’s the thing, we also use NetBSD for some infrastructure services, and as you’d guess, there’s no NetBSD support at all on SoftLayer.

I had to reverse some bits of their provisioning system to understand how to achieve NetBSD installation, but most of all, automatic provisioning.

[...]

First thing was to discover what hypervisor and which mode is used, PV? PV-HVM?
HVM?

I must say their support was not really helpful, but hopefully a simple dmesg gave pretty much all the informations:

[    0.000000]  Xen: 0000000000000000 - 00000000000a0000 (usable)
[    0.000000]  Xen: 00000000000a0000 - 0000000000100000 (reserved)
[    0.000000]  Xen: 0000000000100000 - 0000000040000000 (usable)

Ok, Xen it is…

[    0.000000] Booting paravirtualized kernel on Xen

Oh well, PV then. Quite amusing since the support told me they used HVM pretty much everywhere.

[...]

Now to the fun part. While it is possible to install NetBSD “by hand” with the previous procedure, I really wanted to have that system provisioned automatically, just like the Linux systems are.

Watching all the names used during the provisioning process, I deduced there was some kind of scripting phase once the virtual machine has been instantiated, so
I followed the white rabbit. First, following jawa‘s idea (friend and colleague of mine), I installed snoopy to a newly created virtual machine, then created an image template from it, and instantiated it: and bingo, /var/log/auth.log showed there was a /root/install.sh that was called right after boot up. So I wrote a basic
init-script in order to dump /root content before it is removed by the provisioning system, re-imaged the VM, re-instantiated it, and from then, I had my eyes on their provisioning scripts. Nothing fancy, some tune2fs stuff, networking setup, and all the variables I needed to prepare NetBSD :) »

Joli. :)
(Permalink)