# cannot run vagrant without the config in the YAML file
if os.path.exists(os.path.join(serverdir, 'Vagrantfile.yaml')):
# cannot run vagrant without the config in the YAML file
if os.path.exists(os.path.join(serverdir, 'Vagrantfile.yaml')):
- v.destroy()
- logger.debug('vagrant destroy completed')
+ try:
+ v.destroy()
+ logger.debug('vagrant destroy completed')
+ except subprocess.CalledProcessError as e:
+ logger.debug('vagrant destroy failed: %s', e)
if logger.level <= logging.DEBUG:
logger.debug('Cannot run destroy vagrant setup since Vagrantfile.yaml is not setup!')
subprocess.check_call(['vagrant', 'global-status', '--prune'])
if logger.level <= logging.DEBUG:
logger.debug('Cannot run destroy vagrant setup since Vagrantfile.yaml is not setup!')
subprocess.check_call(['vagrant', 'global-status', '--prune'])
v.box_remove(config['basebox'], 'virtualbox')
logger.info("Configuring build server VM")
v.box_remove(config['basebox'], 'virtualbox')
logger.info("Configuring build server VM")