Created
March 27, 2021 02:20
-
-
Save derekschrock/0a388058ee102f3ae2f59fd11fb079f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- src/VBox/Main/src-client/ConsoleImpl.cpp.orig 2021-03-27 01:43:21 UTC | |
+++ src/VBox/Main/src-client/ConsoleImpl.cpp | |
@@ -8801,6 +8801,18 @@ DECLCALLBACK(void) Console::i_vmstateChangeCallback(PU | |
switch (enmState) | |
{ | |
+ case VMSTATE_POWERING_ON: | |
+ { | |
+#ifdef VBOX_WITH_GUEST_PROPS | |
+ Bstr bstr; | |
+ that->mMachine->COMGETTER(Name)(bstr.asOutParam()); | |
+ that->mMachine->SetGuestProperty(Bstr("/VirtualBox/VirtualMachine/Name").raw(), | |
+ bstr.raw(), | |
+ Bstr("TRANSIENT, RDONLYGUEST").raw()); | |
+ that->mMachine->SaveSettings(); | |
+#endif | |
+ break; | |
+ } | |
/* | |
* The VM has terminated | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment