Skip to content

Commit

Permalink
a failing vboxmanage startvm is not considered a bug if virtualizatio…
Browse files Browse the repository at this point in the history
…n detection failed
  • Loading branch information
adrelanos committed Dec 17, 2022
1 parent a968d9f commit 185b1ea
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions usr/bin/installer-dist
Expand Up @@ -549,6 +549,12 @@ die(){
exit "${1}"
}

error_exit(){
log error "${2}"
trap - EXIT
exit "${1}"
}


## Wrapper to log command before running to avoid duplication of code
log_run(){
Expand Down Expand Up @@ -1060,17 +1066,25 @@ start_virtualbox(){
case "${guest}" in
whonix)
log_run "vboxmanage startvm \
${guest_pretty}-Gateway-${interface_all_caps}" || return 1
${guest_pretty}-Gateway-${interface_all_caps}" || virtualbox_start_failed
log_run "vboxmanage startvm \
${guest_pretty}-Workstation-${interface_all_caps}" || return 1
${guest_pretty}-Workstation-${interface_all_caps}" || virtualbox_start_failed
;;
kicksecure)
log_run "vboxmanage startvm \
${guest_pretty}-${interface_all_caps}" || return 1
${guest_pretty}-${interface_all_caps}" || virtualbox_start_failed
;;
esac
}

virtualbox_start_failed() {
if [ "$nested_virtualization_detected" = "true" ] || [ "$virt_detection_success" = "false" ]; then
error_exit 1 "Virtual Machine start failed.
- The installer succeeded with download and import but failed to start the virtual machines.
- This is likely happening due to the virtualization related warnings that have been reported above."
fi
}


install_package_debian_common(){
pkg_mngr="apt-get"
Expand Down

0 comments on commit 185b1ea

Please sign in to comment.