Linode disk image to VirtualBox?

Hello,

I'd like to replicate our running application (that's distributed over 5 linodes) on local dev machines to work on issues that arise from the multi-server setup.

My idea is to download disk images of the Linodes and convert them to VirtualBox instances. Does that make sense? How to convert them?

Thanks!

Karim

10 Replies

I use Ubuntu, and set up a VirtualBox with the same distro and applications that I use on my Linode. After that I just copy data files back and forth as needed.

James

The disk images are not immediately compatible. Virtualbox emulates a "normal" BIOS (or EFI…) boot process, with a master boot record and all that. Typically, you'll need the master boot record, a partition table, and a bootloader to make it work. On the other hand, a Linode (or other VPS provider) image skips all this: it's just the contents of a single partition, not an entire disk. Virtualbox cannot boot it.

You can adapt the image to make it work. It's a pain in the ass. My preferred trick is to reduce a system to a set of installed software and configuration atop a base system. Something like devstructure's blueprint can do this for an existing system, or you can build this from the ground up using puppet, chef, or some other tool.

Thanks for the replies. It seems the consensus is to rebuild the systems - I'll look into Puppet and similar tools.

I use this in a nightly cron job to have an updated list of my system's packages:

dpkg –get-selections > packages.txt

Then on my local system I use this to sync the packages up manually:

sudo dpkg --set-selections < packages.txt

sudo apt-get dselect-upgrade

This is an old article but it does contain some helpful responses from the readers:

http://www.ubuntugeek.com/clone-your-ub … ation.html">http://www.ubuntugeek.com/clone-your-ubuntu-installation.html

One last thought, you might want to consider chroot, I'm not a pro (only used it once) at using it but it might let you image your server, copy it locally then access it in a chroot without the booting mess … maybe (not totally sure).

I've been wanting to do a similar setups to this, i just recently learned of this new system http://vagrantup.com/

@arttus:

I've been wanting to do a similar setups to this, i just recently learned of this new system http://vagrantup.com/

Doesn't look good for multi-core programming to me.

James

@zunzun:

@arttus:

I've been wanting to do a similar setups to this, i just recently learned of this new system http://vagrantup.com/

Doesn't look good for multi-core programming to me.

James

Why not? There doesn't seem to be anything preventing you from creating multi-core VMs with it?

@Guspaz:

Why not? There doesn't seem to be anything preventing you from creating multi-core VMs with it?

Ah, but deployment is a different thing altogether - if the remote server does not allow multi-core VMs you cannot deploy one. I do not see this discussed, nor do they mention the number of CPUs available or pricing per additional core. That would indeed be something to crow about, and they do not do so.

James

Huh? It's an opensource VM deployment script, and the remote server is your own box, what does "number of CPUs" or "price-per-core" have to do with anything? They're not selling anything.

@Guspaz:

They're not selling anything.

Oh. I thought they also hosted. My bad - consider me appropriately chastised. Good call.

James

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct