Let provisioning finish if script fails
This will allow cleanup to succeed even if the provisioning script fails, avoiding leaving the system in a weird state.
This commit is contained in:
parent
b6474198a4
commit
641f13bb95
|
@ -1291,14 +1291,17 @@ def create_vm(self, vm_name, vm_profile, define_vm=True, start_vm=True):
|
||||||
script_arguments[argument_name] = argument_data
|
script_arguments[argument_name] = argument_data
|
||||||
|
|
||||||
# Run the script
|
# Run the script
|
||||||
installer_script.install(
|
try:
|
||||||
vm_name=vm_name,
|
installer_script.install(
|
||||||
vm_id=vm_id,
|
vm_name=vm_name,
|
||||||
temporary_directory=temp_dir,
|
vm_id=vm_id,
|
||||||
disks=vm_data['volumes'],
|
temporary_directory=temp_dir,
|
||||||
networks=vm_data['networks'],
|
disks=vm_data['volumes'],
|
||||||
**script_arguments
|
networks=vm_data['networks'],
|
||||||
)
|
**script_arguments
|
||||||
|
)
|
||||||
|
except:
|
||||||
|
continue
|
||||||
|
|
||||||
# Phase 9 - install cleanup
|
# Phase 9 - install cleanup
|
||||||
# * Unmount any mounted volumes
|
# * Unmount any mounted volumes
|
||||||
|
|
Loading…
Reference in New Issue