Some fixes for cloud-init and Java.