"""
Picks a host to "create" (boot) a VM on, and does so.
-For now, a very dumb algorithm for which host to boot on:
-the one with fewer machines running.
-
-TODO: load-balance based on something like actual free RAM
+Current load-balancing algorithm: wherever there's more free RAM.
TODO: use a lock to avoid creating the same VM twice in a race
"""
host = choose_host()
print 'Creating on host %s...' % host
+ sys.stdout.flush()
return call(['remctl', host, 'remote', 'control',
machine_name, 'create'] + args)