Gitlab@AEI Hannover will go down for maintenance on 2020-09-21 at 4:00 UTC. The service will be unavailable for up to 24 hours. If you have questions about this please contact atlas_admin@aei.mpg.de

Commit 2cb28a82 authored by Rom Walton's avatar Rom Walton Committed by Oliver Bock

- VBOX: On *nix systems, if the vboxdrv kernel module isn't loaded declare

        it a temp error and reschedule execution at a later date.
parent cfca0d21
......@@ -7953,3 +7953,10 @@ Rom 28 Dec 2012
samples\vboxwrapper\
vbox.cpp, .h
vboxwrapper.cpp
Rom 28 Dec 2012
- VBOX: On *nix systems, if the vboxdrv kernel module isn't loaded declare
it a temp error and reschedule execution at a later date.
samples\vboxwrapper\
vbox.cpp
......@@ -622,6 +622,7 @@ void VBOX_VM::poll(bool log_state) {
// Attempt to detect any condition that would prevent VirtualBox from running a VM properly, like:
// 1. The DCOM service not being started on Windows
// 2. Vboxmanage not being able to communicate with vboxsvc for some reason
// 3. VirtualBox driver not loaded for the current Linux kernel.
//
// Luckly both of the above conditions can be detected by attempting to detect the host information
// via vboxmanage and it is cross platform.
......@@ -629,15 +630,22 @@ void VBOX_VM::poll(bool log_state) {
bool VBOX_VM::is_system_ready() {
string command;
string output;
bool rc = true;
command = "list hostinfo ";
if (vbm_popen(command, output, "host info", false, false) == 0) {
if (output.find("Processor count:") != string::npos) {
return true;
if (output.find("Processor count:") == string::npos) {
rc = false;
}
if (output.find("WARNING: The vboxdrv kernel module is not loaded.") != string::npos) {
rc = false;
}
}
return false;
return rc;
}
bool VBOX_VM::is_registered() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment