Skip to content

Instantly share code, notes, and snippets.

@badsyntax
Last active March 30, 2016 23:11
Show Gist options
  • Save badsyntax/98ea8c01f3bea6a38065 to your computer and use it in GitHub Desktop.
Save badsyntax/98ea8c01f3bea6a38065 to your computer and use it in GitHub Desktop.
Running lxc with zfs backing store, in Ubuntu 14.04, within a virtualbox virtual machine
#!/usr/bin/env bash
# ubuntu/trusty64
apt-get update
apt-get install software-properties-common -y
apt-add-repository ppa:ubuntu-lxc/daily
add-apt-repository ppa:zfs-native/stable
add-apt-repository ppa:nginx/stable -y
apt-get update
apt-get install lxc ubuntu-zfs nginx -y
echo "Creating zfs disk..."
dd if=/dev/zero of=/root/zfsdisk1.img bs=1024 count=10485760 # 10gb
zpool create lxc /root/zfsdisk1.img
zpool set listsnapshots=on lxc
echo "Setting up lxc..."
rmdir /var/lib/lxc
ln -s /lxc /var/lib/
lxc-create -t ubuntu -n ubuntu -B zfs
echo "Done!"
@naisanza
Copy link

How would you import the containers from another zfs pool into the current one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment