Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Leverage lxc-clone / BTRFS #99

Closed
fgrehm opened this issue Jun 20, 2013 · 6 comments
Closed

Leverage lxc-clone / BTRFS #99

fgrehm opened this issue Jun 20, 2013 · 6 comments

Comments

@fgrehm
Copy link
Owner

fgrehm commented Jun 20, 2013

No description provided.

@codec
Copy link

codec commented Feb 12, 2014

I have a rough sketch for lxc-clone support, see https://github.com/codec/vagrant-lxc/compare/fgrehm:next...feature/lxc_clone_next
(I need to clean that up ⚠️)

This still implies a few things to get it working:

  • The patches require a backing store that supports snapshots (i.e. ZFS, btrfs, LVM).
  • The basebox, except for its name, isn't used at all. You need to provide an existing container named after the basebox (i.e. precise64). I've modified the build scripts to keep the build container and name it properly.
  • LXC 1.0.0 is required (1.0.0~alpha1 works fine on saucy) as prior releases lack backingstore support in lxc-clone.

Obviously this is more of a proof-of-concept, but do you think it's worth to pursue this any further?

@ccope
Copy link
Contributor

ccope commented Feb 18, 2014

I have something pretty similar to @codec's branch that I've been using internally for a test pipeline, but it also needs cleanup. Here's a quick WIP: ccope/vagrant-lxc@fgrehm:next...clone_public (I've been using this on Ubuntu 12.04, LXC 0.7.5, with LVM)

The major problem I've run into is that shared folders don't work with LVM (or probably anything else that isn't a plain directory or overlay). The root volume isn't mounted in a place which is accessible by the host when the guest boots, so the current method of mkdir'ing it doesn't work. The mountpoint directories have to be created either when the tarball gets unpacked or via ssh once the vm boots up (the latter is more flexible).

@fgrehm
Copy link
Owner Author

fgrehm commented Feb 20, 2014

I'm up for having this in place and I actually had some notes around it, I'll try to find them and will get back to you guys :-)

@ccope
Copy link
Contributor

ccope commented Feb 23, 2014

So, I've found a couple of ways to interact with a running container's filesystem from the host. One, if you're running a new enough kernel, is to just use lxc-attach --name foo -- foo_cmd
Another is to make folders in the following path:
/proc/$(sudo lxc-info -n NAME -p | awk '{print $2}')/
(I'm using awk instead of lxc-info -H because that option doesn't exist in lxc <1.0)
Source: https://www.stgraber.org/2013/12/21/lxc-1-0-advanced-container-usage/

I'm going to implement the latter option in my branch for now, because it has better backwards compatibility, but lxc-attach seems much less hacky.

@fgrehm
Copy link
Owner Author

fgrehm commented Feb 26, 2014

Unfortunately I wasn't able to find my notes =/

@ccope @codec I don't have plans to work on this on the short term, so feel free to open up a "WIP pull request" so that we can discuss the implementation itself :-)

@fgrehm fgrehm modified the milestones: v1.0.0, Nice to have Mar 19, 2014
@fgrehm fgrehm removed this from the v1.0.0 milestone Sep 23, 2014
@fgrehm fgrehm added the ignored label Nov 17, 2022
@fgrehm
Copy link
Owner Author

fgrehm commented Nov 17, 2022

Hey, sorry for the silence here but this project is looking for maintainers 😅

As per #499, I've added the ignored label and will close this issue. Thanks for the interest in the project and LMK if you want to step up and take ownership of this project on that other issue 👋

@fgrehm fgrehm closed this as completed Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants