diff --git a/samples/vboxwrapper/vbox.cpp b/samples/vboxwrapper/vbox.cpp index f29b2af227..947671bd7d 100644 --- a/samples/vboxwrapper/vbox.cpp +++ b/samples/vboxwrapper/vbox.cpp @@ -298,6 +298,7 @@ bool VBOX_VM::is_running() { string vmstate; size_t vmstate_location; size_t vmstate_length; + char buf[256]; command = "showvminfo \"" + vm_name + "\" "; command += "--machinereadable "; @@ -309,6 +310,13 @@ bool VBOX_VM::is_running() { vmstate_length = output.find("\"", vmstate_location); vmstate = output.substr(vmstate_location, vmstate_length); + fprintf( + stderr, + "%s Current VM State is '%s'.\n", + boinc_msg_prefix(buf, sizeof(buf)), + vmstate.c_str() + ); + // VirtualBox Documentation suggests that that a VM is running when its // machine state is between MachineState_FirstOnline and MachineState_LastOnline // which as of this writing is 5 and 17.