A bootstrap script to pull in the ulexus/qemu docker image, and export it to the host filesystem.
This is a means of working around the packet storm problem of running kvm within a container whose image is housed on rbd and whose network is attached to a host bridge. Instead of using docker for execution, use systemd-nspawn.
This is customized for internal use, so it is probably not fit for public consumption.
rbd -p vms create --size <sizeinMB> vm9
- Create all the necessary etcd keys:
- /kvm/9/ram - RAM to allocate, in MB
- /kvm/9/mac - MAC address
- /kvm/9/rbd - RBD to use (e.g.
vms/vm9
) - /kvm/9/spice_port - Port on which SPICE server should bind (5900 + vm instance)
- Bootstrap the image for installation
- ssh cc3
- sudo -i
- export INSTANCE=9
- export BRIDGE_IF=public
- /opt/bin/qemu_wrapper.sh -cdrom rbd:isos/ubuntu-14.04.1
- Install OS
- Halt the OS
- Start with fleet:
fleetctl start kvm@9