Last active
March 30, 2016 23:11
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How would you import the containers from another zfs pool into the current one?