(aka 'homecloud')
fakecloud
is a lightweight cloud-init metadata server that makes it easy
to run pre-built cloud OS images on plain old libvirt, without having to
install openstack or similar.
It serves the data that cloud-init expects to fetch from a meta-data server at http://169.254.169.254/
Run it on your VM host(s), and add an iptables
rule to redirect
cloud-init requests to it. e.g. if fakecloud
is running on
localhost:3000:
iptables -t nat -I PREROUTING -d 169.254.169.254 -p tcp --dport 80 -j REDIRECT --to-port 3000
Features:
./hosts.txt
. Format is
vmname mac-address ip-address
./userdata/all/*
./userdata/vmname/*
./userdata/default/*
./userdata/all/shellscript
or
./userdata/vmname/hostkeys
.Testing features:
?host=
override in URLs to see what meta-data and user-data a VM would get without having to reboot that VM.Future plans:
Written with perl and Mojolicious::Lite