Last active
June 23, 2017 12:20
-
-
Save corny/4997352 to your computer and use it in GitHub Desktop.
ubuntu-vm-builder for hetzner
This file contains hidden or 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
| hostname=THEHOSTNAME | |
| distr=trusty | |
| swapsize=2048 | |
| rootsize=8192 | |
| memory=2048 | |
| ubuntu-vm-builder kvm $distr \ | |
| --mirror http://mirror.hetzner.de/ubuntu/packages \ | |
| --dest /var/lib/libvirt/images/$hostname \ | |
| --arch amd64 \ | |
| --mem $memory \ | |
| --rootsize $rootsize \ | |
| --swapsize $swapsize \ | |
| --hostname $hostname \ | |
| --bridge=br0 \ | |
| --addpkg acpid \ | |
| --addpkg openssh-server \ | |
| --addpkg unattended-upgrades \ | |
| --addpkg vim \ | |
| --ssh-key /root/.ssh/authorized_keys | |
| mv /var/lib/libvirt/images/$hostname/tmp*.qcow2 /var/lib/libvirt/images/$hostname.qcow2 |
This file contains hidden or 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
| # in /usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/trusty.py | |
| # das 'pass' austauschen durch disk_prefix = 'vd' | |
| hostname=THEHOSTNAME | |
| distr=trusty | |
| swapsize=2048 | |
| rootsize=30720 | |
| memory=2048 | |
| ubuntu-vm-builder kvm $distr \ | |
| --mirror http://mirror.plutex.de/ubuntu \ | |
| --dest /var/lib/libvirt/images/$hostname \ | |
| --arch amd64 \ | |
| --mem $memory \ | |
| --rootsize $rootsize \ | |
| --swapsize $swapsize \ | |
| --hostname $hostname \ | |
| --bridge=br0 \ | |
| --addpkg acpid \ | |
| --addpkg openssh-server \ | |
| --addpkg unattended-upgrades \ | |
| --addpkg linux-image-generic \ | |
| --addpkg vim \ | |
| --ssh-key /root/.ssh/authorized_keys | |
| mv /var/lib/libvirt/images/$hostname/tmp*.qcow2 /var/lib/libvirt/images/$hostname.qcow2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment