1 | --- src/VBox/Main/src-client/ConsoleImpl.cpp.orig 2021-03-27 01:43:21 UTC
|
---|
2 | +++ src/VBox/Main/src-client/ConsoleImpl.cpp
|
---|
3 | @@ -8801,6 +8801,18 @@ DECLCALLBACK(void) Console::i_vmstateChangeCallback(PU
|
---|
4 |
|
---|
5 | switch (enmState)
|
---|
6 | {
|
---|
7 | + case VMSTATE_POWERING_ON:
|
---|
8 | + {
|
---|
9 | +#ifdef VBOX_WITH_GUEST_PROPS
|
---|
10 | + Bstr bstr;
|
---|
11 | + that->mMachine->COMGETTER(Name)(bstr.asOutParam());
|
---|
12 | + that->mMachine->SetGuestProperty(Bstr("/VirtualBox/VirtualMachine/Name").raw(),
|
---|
13 | + bstr.raw(),
|
---|
14 | + Bstr("TRANSIENT, RDONLYGUEST").raw());
|
---|
15 | + that->mMachine->SaveSettings();
|
---|
16 | +#endif
|
---|
17 | + break;
|
---|
18 | + }
|
---|
19 | /*
|
---|
20 | * The VM has terminated
|
---|
21 | */
|
---|