Skip to content

Slice Host and rBuilder Online Images

I host this blog, as well as e-mail for dragonstrider.com and a host of other services on an old PC behind my cable modem at home. This has served me well for the most part, but it requires onsite maintenance when it goes down. This is bad when I'm at work, or vacation, as happened this week. So, I bit the bullet and researched some Virtual Priate Server (VPS) hosting providers.

I ended up choosing Slice Host as a no-frills, just the tech if you please, Linux/Xen-based VPS host. Their entry level plan (slice) gives you 256 MB RAM, 10GB storage, and 100GB of bandwidth for $20/month, and you can scale it with a reboot up to 4GB/160GB/1600GB for $280. /proc/cpuinfo shows that the host for my entry level slice is a two way "Dual-Core AMD Opteron(tm) Processor 2212" operating at 2.0 GHz. There's a separate swap partition (so swap doesn't count against the 10GB limit), as well as web based management tools for rudimentary Name Services, starting, stopping and rebuilding your slice, a web console (in case ssh isn't working for some reason), some statistics and reporting, and my favorite part, a rescue mode.

Rescue mode lets you boot your slice in a rescue environment, mount your root file system in an alternate location, and do what you want (or need) with it. This makes it pretty easy to run your appliance from rBuilder Online on a hosted slice. Here are the steps to get this working. Choose a Xen Appliance Image (32 or 64 bit, though 64 bit is preferred) that is a single file system image.


  • Create a slice (doesn't matter what kind, we're going to blow it away anyway).

  • Reboot your slice into rescue mode

  • SSH or console in using the password mailed to you (yes, rescue mode gets started with a randomized password)

  • wget -O - <link to the rBO image> | tar -xz # This downloads and extracts the filesystem image

  • dd if=<path to filesystem image file> of=/dev/sda1

  • e2fs.ext3 -f /dev/sda1 # This forces a file system check, without this check the next step will fail.

  • resize2fs /dev/sda1 # Resize the file system image to match the available size

  • mount /dev/sda1 /mnt

  • copy the following networking configuration files from your rescue image to your new slice image mounted in /mnt

    • /etc/sysconfig/network /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/resolv.conf

  • Edit /etc/sysconfig/network to fix the hostname to the desired value

  • chroot /mnt

  • passwd # changes the root password since the rBO images ship with root's password blanked



At this point you can do any additional configuration you wish, such as adding additional users, making sure that openssh-server is installed and configured to start on boot, etc.

When that's done, shutdown, exit rescue mode from the Slice Host panel, and log in to your new appliance.

There is quite a bit of noise when the slice boots up with an rPath Linux based appliance because the kernel in the image isn't used for booting, and modules.dep isn't located for the booting kernel, but that seems harmless.

Now to build an appliance to run on the thing... I used the rPL 2 beta 3 text devel image as my image while developing this HOWTO.

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

Brett Adam on :

Thanks for these notes. I just tried using them on the new Rackspace Cloud Server offering. (Which, at $0.015 per hour costs $11 / month for 24x7 server - cheap!!)

Everything appears to have worked except the network config. My instance boots, and has what appears to be all the pieces I expected, but can't bring the network up.

Any suggestions appreciated!

[root@astrographix ~]# service network start
FATAL: Could not load /lib/modules/2.6.24-23-xen/modules.dep: No such file or directory
Bringing up loopback interface: arping: socket: Address family not supported by protocol
[ OK ]
Bringing up interface eth0: arping: socket: Address family not supported by protocol
Error, some other host already uses address 174.143.206.68.

Joseph Tate on :

It's been some time since I have run a slice host image, but the network configuration may have changed since then. I think I would fire up a second instance using a RHEL or CentOS image, and then copy the networking configuration, especially the device names, etc. That would be /etc/sysconfig/network /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/resolv.conf. These should be in the rescue image as well. It looks like you've piggybacked on someone elses IP address instead of your own, so your static IP address is incorrectly configured.

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options