Fix boot detection and extend boot timeout

This commit is contained in:
Anders Ingemann 2015-01-19 16:37:31 +01:00
parent 0f82fbd6af
commit 0e19b4c1ed

View file

@ -60,11 +60,12 @@ class VirtualBoxInstance(Instance):
# Gotta figure out a more reliable way to check when the system is done booting.
# Maybe bootstrapped unit test images should have a startup script that issues
# a callback to the host.
if self.image.manifest.system['release'] in ['squeeze', 'wheezy']:
from bootstrapvz.common.tools import get_codename
if get_codename(self.image.manifest.system['release']) in ['squeeze', 'wheezy']:
termination_string = 'INIT: Entering runlevel: 2'
else:
termination_string = 'Debian GNU/Linux'
self.console_output = read_from_socket(self.serial_port_path, termination_string, 20)
self.console_output = read_from_socket(self.serial_port_path, termination_string, 120)
def shutdown(self):
log.debug('Shutting down vbox machine `{name}\''.format(name=self.name))