mirror of
https://github.com/gryf/boxpy.git
synced 2025-12-19 05:30:18 +01:00
Made a poor-man progress bar for waiting for cloud init.
This commit is contained in:
7
box.py
7
box.py
@@ -570,12 +570,14 @@ def vmcreate(args):
|
||||
time.sleep(3)
|
||||
|
||||
# than, let's try to see if boostraping process has finished
|
||||
print('Waiting for cloud init to finish')
|
||||
print('Waiting for cloud init to finish ', end='')
|
||||
while True:
|
||||
if vbox.vm_info['uuid'] in vbox.get_running_vms():
|
||||
print('.', end='')
|
||||
sys.stdout.flush()
|
||||
time.sleep(3)
|
||||
else:
|
||||
print('Done')
|
||||
print(' done.')
|
||||
break
|
||||
# dettach ISO image
|
||||
vbox.storageattach('IDE', 1, 'dvddrive', 'none')
|
||||
@@ -630,6 +632,7 @@ def main():
|
||||
parser = argparse.ArgumentParser(description="Automate deployment and "
|
||||
"maintenance of Ubuntu VMs using "
|
||||
"VirtualBox and Ubuntu cloud images")
|
||||
|
||||
subparsers = parser.add_subparsers(help='supported commands')
|
||||
|
||||
create = subparsers.add_parser('create', help='create and configure VM, '
|
||||
|
||||
Reference in New Issue
Block a user