Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 virtual machines (with Debian, using KVM) with virtual hard drives:

  • /srv/kvm/ssh.img
  • /srv/kvm/www.img

Both have 3 partitions (/, /home, swap).

I want to convert them in a RootFS usable with LXC (in order to use LXC instead of KVM).

The only solution I have for the moment is:

  • create a new RootFS
  • copy /home partition into it
  • reproduce the same configuration into it

But is there an automated way to do it

share|improve this question
    
I doubt it since LXC is highly dependable on the type of kernel used. – Lucas Kauffman Sep 17 '12 at 9:38
up vote 2 down vote accepted

Maybe you can give this a shot Booting an Ubuntu 12.04 virtual machine in an LXC container . At least LXC on Ubuntu provides various distro templates, I believe you can boot different Linux distro from the host.

share|improve this answer

You can look at lxc-convert here.

I've done it several time, it works well.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .