On Sat, Mar 3, 2018 at 6:46 PM, Mike Jumper <mike.jum...@guac-dev.org>
wrote:

> On Sat, Mar 3, 2018 at 1:51 PM, Joachim Lindenberg <joac...@lindenberg.one
> > wrote:
>>
>> (3)    It is still unclear to me what configuration changes I can/should
>> support, and how to best trigger restore of VMs. One approach I am
>> experimenting with is to subclass GuacamoleConfiguration and “monitor”
>> whether parameters are accessed and then as a side effect trigger restore.
>> However the unpleasant aspect is that I´d also have to cache credentials of
>> the user then. Any better approach?
>>
>
> Can you clarify what you mean here? What do you mean by "restore" in the
> context of VMs, and why are you trying to trigger this as a side effect?
> Can you describe what you're trying to achieve at a high level - based on
> the overall goal, rather than the specifics of your current implementation?
>
> - Mike
>

IIRC from earlier conversations, "restore" in this context means to bring
them out of a suspended/sleep mode.  So, Joachim is trying to implement an
extension that will resume a VM from a suspended state when the user tries
to (or is about to) connect.  This was discussed recently in the
Wake-on-LAN conversation, where you mentioned the challenge of somehow
delaying the connection until the machine is in an operational state.

In my mind, this would involve code to do the following things:
- Determining when the VM needs to be resumed (when a user logs in, when a
connection is initiated).
- Storing/retrieving some information about each connection that determines
how/where to resume the VM, if that isn't readily obvious.  This can be
done with the newly-added code for allowing extensions to store arbitrary
code.
- Code to actually trigger the VM resume/restore.  This could involving
calling a REST API for the hypervisor manager, executing a string of
command line commands, or connecting to a TCP socket, etc.
- Somehow checking the state of the VM to see if it is up and running
before actually connecting.

-Nick

Reply via email to