refactor create_machines and make it work with HPCloud