You are not logged in.

#1 2015-01-05 18:13:59

cyph3r
Member
Registered: 2012-01-13
Posts: 11

How to easily migrate my installation between vm/raspberrypi/and more

Hello, smile

Some quick background: I have a x86_64 VM at the moment that has certain services running like znc, nginx, transmission, a git server, ssh, dhcpd and some other minor stuff configured over time. It's mostly for personal usage.

At some time in the near future this VM will expire and I will have to transfer all that to either my raspberry pi or a similar mini pc running arch linux.

I've already done this migration once or twice and each time I had to reinstall all the necessary packages, users, general configurations, service configurations and home dirs. It's a slow process and even with a script that automates a part of this it needs some manual configuration changes after that depending on architecture etc. I usually follow https://wiki.archlinux.org/index.php/Mi … installing to migrate packages etc but because the arm repo is different and some names differ there I also have to change stuff manually and check everything again.

I need a quicker and more flexible solution to be able to just setup the services quickly on a given host running arch.
I could just setup everything in a VM and then run the VM on any given hardware at a time but for mini pcs like raspberry or odroid running a whole virtual machine is just too resource exhausting.

I checked docker some while back and it's more or less what I need and provides easy deployment but writing the docker scripts that will handle the configurations is a new hassle by itself. And there are times where I want to add new services which means that I will have to rewrite a docker script each time. hmm Also when packages for these services are updated in the arch installation I'm not sure if it's going to be so easy to update them inside the docker containers as well.

Is there anything else I could do to make this installation migration easier across any platform? Or at least a docker-like way that would be much easier to setup?

Thanks for your time smile

Last edited by cyph3r (2015-01-05 18:32:41)

Offline

#2 2015-01-05 18:17:41

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: How to easily migrate my installation between vm/raspberrypi/and more

See if this suites your intent.


do it good first, it will be faster than do it twice the saint wink

Offline

#3 2015-01-05 18:41:38

cyph3r
Member
Registered: 2012-01-13
Posts: 11

Re: How to easily migrate my installation between vm/raspberrypi/and more

The above instructions assume that the architecture is the same though right? And also installing the packages is just the smaller step. I mainly waste time on copying configurations/specific files/setting up scripts/services etc.

I was also checking out the solution of running everything in a light vm with qemu although I am reading that it has problems on arm processors (?).

Offline

#4 2015-01-05 23:17:32

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: How to easily migrate my installation between vm/raspberrypi/and more

Because of the architecture difference there's no quick and painless way to do this. There are two options I can think of:

- You can save your various configurations you need, make a list of installed packages, install a new system and copy the configs over.
- You can set up a thin KVM/QEMU virtual machine atop the native system installed on the RasPi. I've never tried any such thing myself, but the wiki pages should point you in the right direction.

Exactly which one presents the least hassle is really a matter of whatever you're comfortable with.

Offline

#5 2015-01-06 00:09:50

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: How to easily migrate my installation between vm/raspberrypi/and more

Trying to run an x86 VM on a Raspberry Pi will theoretically work but will almost definitely be too slow to be usable.

Because of the different architectures the only way this works is for the RPi to emulate an x86 machine entirely in software, some early tests with the RPi had a Windows XP VM taking about an hour to boot.

Last edited by Slithery (2015-01-06 00:11:53)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#6 2015-01-06 08:40:41

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: How to easily migrate my installation between vm/raspberrypi/and more

cyph3r wrote:

The above instructions assume that the architecture is the same though right?

If installing only the package list, It won't be affected. But it you try to install in a different root (pacman -r) that's probably impossible.
For same architectures, you may look at rsync.
Otherwise, once you've prepared a RPi VDI then it's possible to load it in another partition by

$ VboxManage clonehd <uuid|inputfile> --format RAW yourfile.img
$ dd yourfile.img /dev/sdaXY

do it good first, it will be faster than do it twice the saint wink

Offline

#7 2015-01-06 10:15:56

Awebb
Member
Registered: 2010-05-06
Posts: 6,298

Re: How to easily migrate my installation between vm/raspberrypi/and more

1. Install arch-install-scripts on the pi.
2. Write a cute little bash script that duplicates your system.
3. Manage etc with etckeeper, it can use git.
4. Manage configs with git. I really wonder why this has not reached every single one of us. Once you have more than one machine with the same OS, git will save you a lot of time.

Offline

Board footer

Powered by FluxBB