Re: WOL from a container to virtualbox

2023-12-28 Thread Nick Couchman
On Mon, Dec 25, 2023 at 10:11 AM Massimiliano Gilli 
wrote:

> Hello,
> If you look at my log in the two cases when the WoL is active i get
>
>guacd[2674]: DEBUG: Sending Wake-on-LAN packet, and pausing for 15
> seconds.
>guacd[2674]: DEBUG: Client is using protocol version "VERSION_1_5_0"
>guacd[1]: INFO: Connection "$6e922686-03ca-43ac-82f2-d1c3079d8074"
> removed.
>guacd[1]: DEBUG: Unable to request termination of client process:
> No such process
>guacd[1]: DEBUG: All child processes for connection
> "$6e922686-03ca-43ac-82f2-d1c3079d8074" have been terminated.
>
> Aren't the last two entries a signal of something going wrong inside guacd?
>

Yeah, looking at the current code for the WOL functionality, if it fails it
actually just quits without logging anything useful. I'm working on some
other changes to WOL, and I'll try to brush up the error logging a bit as
part of those changes.

https://github.com/apache/guacamole-server/pull/470
https://issues.apache.org/jira/browse/GUACAMOLE-1686

-Nick

>


Re: WOL from a container to virtualbox

2023-12-25 Thread Massimiliano Gilli
Hello,
If you look at my log in the two cases when the WoL is active i get

   guacd[2674]: DEBUG: Sending Wake-on-LAN packet, and pausing for 15
seconds.
   guacd[2674]: DEBUG: Client is using protocol version "VERSION_1_5_0"
   guacd[1]: INFO: Connection "$6e922686-03ca-43ac-82f2-d1c3079d8074"
removed.
   guacd[1]: DEBUG: Unable to request termination of client process: No
such process
   guacd[1]: DEBUG: All child processes for connection
"$6e922686-03ca-43ac-82f2-d1c3079d8074" have been terminated.

Aren't the last two entries a signal of something going wrong inside guacd?
In fact that explains why even if the machine is up and running there is no
way to establish a connection as long as the WoL tick is present

Regards,

Il giorno dom 24 dic 2023 alle ore 21:28 Nick Couchman 
ha scritto:

> On Sun, Dec 24, 2023 at 5:06 AM Massimiliano Gilli 
> wrote:
>
>> Hello,
>> im playing around with guacamole on docker coupled with virtualbox (VRDE)
>> The connection works fine and I can browse my VMs as long as they are
>> powered on.
>> To overcome the fact that they must be powered on, I started to play
>> around with the WoL feature.
>> I was successfully able to receive WoL packets from the guacamole
>> frontend container to my host machine and via tcpdump I'm able to listen
>> for these packets so that I can trigger a "VBoxManage startvm" command the
>> poweron a vm.
>> The issue is that even if the VM comes up and even with 5 seconds of Host
>> boot wait time the connection is not established.
>> I think i'm quite close to a decente result because if immediately after
>> the first connection request (which starts up the vm) i disable the WoL
>> feature from guacamole frontend and reconnect i can see the boot logo and
>> work on it normally.
>> Is the WoL feature expecting a reply from the machine that is woken up
>> before trying to connect?
>>
>>
> No, the WoL feature does not wait for a reply from the target machine - it
> just sends the WoL packet and then attempts the connection. This generally
> results in a connection "failure" the first time around, and then success,
> depending on how long it takes the VM to boot. There is a feature request
> out there somewhere in Jira to make the WoL feature a little bit more
> "intelligent" in this regard, like sending the WoL packet and then pinging
> or attempting a TCP connect to the machine that has just been woken up
> until it responds so that you don't get the failure, timeout, and then have
> to retry.
>
> It is worth nothing that you do not need to disable the WoL feature before
> re-trying the connection - it should just work as soon as the system is
> available.
>
> -Nick
>
>>


Re: WOL from a container to virtualbox

2023-12-24 Thread Nick Couchman
On Sun, Dec 24, 2023 at 5:06 AM Massimiliano Gilli 
wrote:

> Hello,
> im playing around with guacamole on docker coupled with virtualbox (VRDE)
> The connection works fine and I can browse my VMs as long as they are
> powered on.
> To overcome the fact that they must be powered on, I started to play
> around with the WoL feature.
> I was successfully able to receive WoL packets from the guacamole frontend
> container to my host machine and via tcpdump I'm able to listen for these
> packets so that I can trigger a "VBoxManage startvm" command the poweron a
> vm.
> The issue is that even if the VM comes up and even with 5 seconds of Host
> boot wait time the connection is not established.
> I think i'm quite close to a decente result because if immediately after
> the first connection request (which starts up the vm) i disable the WoL
> feature from guacamole frontend and reconnect i can see the boot logo and
> work on it normally.
> Is the WoL feature expecting a reply from the machine that is woken up
> before trying to connect?
>
>
No, the WoL feature does not wait for a reply from the target machine - it
just sends the WoL packet and then attempts the connection. This generally
results in a connection "failure" the first time around, and then success,
depending on how long it takes the VM to boot. There is a feature request
out there somewhere in Jira to make the WoL feature a little bit more
"intelligent" in this regard, like sending the WoL packet and then pinging
or attempting a TCP connect to the machine that has just been woken up
until it responds so that you don't get the failure, timeout, and then have
to retry.

It is worth nothing that you do not need to disable the WoL feature before
re-trying the connection - it should just work as soon as the system is
available.

-Nick

>


Re: WOL from a container to virtualbox

2023-12-24 Thread Massimiliano Gilli
Here's the log when sending the WoL

guacd[62]: DEBUG: Parameter "disable-paste" omitted. Using default value of
0.
guacd[62]: INFO: No clipboard line-ending normalization specified.
Defaulting to preserving the format of all line endings.
guacd[62]: INFO: User "@756fda37-b4af-482d-8368-ea16537f4c50" joined
connection "$b6c58b35-903c-4789-b63b-729435f42f47" (1 users now present)
guacd[62]: DEBUG: Sending Wake-on-LAN packet, and pausing for 5 seconds.
guacd[62]: DEBUG: Client is using protocol version "VERSION_1_5_0"
guacd[1]: INFO: Connection "$b6c58b35-903c-4789-b63b-729435f42f47" removed.
guacd[1]: DEBUG: Unable to request termination of client process: No such
process
guacd[1]: DEBUG: All child processes for connection
"$b6c58b35-903c-4789-b63b-729435f42f47" have been terminated.

Here's the log when not sending the WoL

guacd[80]: DEBUG: Parameter "disable-paste" omitted. Using default value of
0.
guacd[80]: INFO: No clipboard line-ending normalization specified.
Defaulting to preserving the format of all line endings.
guacd[80]: DEBUG: Parameter "wol-send-packet" omitted. Using default value
of 0.
guacd[80]: INFO: User "@726756d1-8d02-4142-bc61-8f77e0f207ca" joined
connection "$bf1bda0e-9c0d-4d6e-b39d-cdb697e7455f" (1 users now present)
guacd[80]: DEBUG: Client is using protocol version "VERSION_1_5_0"
guacd[80]: INFO: Loading keymap "base"
guacd[80]: INFO: Loading keymap "en-us-qwerty"
guacd[80]: DEBUG: Support for CLIPRDR (clipboard redirection) registered.
Awaiting channel connection.
guacd[80]: DEBUG: Support for static channel "rdpdr" loaded.
guacd[80]: DEBUG: Support for static channel "rdpsnd" loaded.
guacd[80]: DEBUG: Local framebuffer format  PIXEL_FORMAT_BGRX32
guacd[80]: DEBUG: Remote framebuffer format PIXEL_FORMAT_BGRA32
guacd[80]: DEBUG: Error: SSL_CERT_NOT_ON_SERVER
guacd[80]: DEBUG: Error: SSL_CERT_NOT_ON_SERVER
guacd[80]: DEBUG: CLIPRDR (clipboard redirection) channel connected.
guacd[80]: DEBUG: SVC "rdpdr" connected.
guacd[80]: DEBUG: SVC "rdpsnd" connected.
guacd[80]: INFO: Accepted format: 16-bit PCM with 2 channels at 22050 Hz
guacd[80]: INFO: Connected to RDPDR 1.12 as client 0x0003
guacd[80]: DEBUG: Ignoring server capability set type=0x0001, length=44
guacd[80]: DEBUG: Ignoring server capability set type=0x0005, length=8
guacd[80]: DEBUG: Sending capabilities...
guacd[80]: DEBUG: Capabilities sent.
guacd[80]: DEBUG: Client ID confirmed
guacd[80]: DEBUG: [0x0a] OpaqueRect - SERVER BUG: The support for this
feature was not announced!
guacd[1]: DEBUG: Guacamole connection closed during handshake
guacd[1]: DEBUG: Error reading "select": End of stream reached while
reading instruction
guacd[80]: DEBUG: Clipboard data received. Reporting availability of
clipboard data to RDP server.




Il giorno dom 24 dic 2023 alle ore 11:05 Massimiliano Gilli <
max90g...@gmail.com> ha scritto:

> Hello,
> im playing around with guacamole on docker coupled with virtualbox (VRDE)
> The connection works fine and I can browse my VMs as long as they are
> powered on.
> To overcome the fact that they must be powered on, I started to play
> around with the WoL feature.
> I was successfully able to receive WoL packets from the guacamole frontend
> container to my host machine and via tcpdump I'm able to listen for these
> packets so that I can trigger a "VBoxManage startvm" command the poweron a
> vm.
> The issue is that even if the VM comes up and even with 5 seconds of Host
> boot wait time the connection is not established.
> I think i'm quite close to a decente result because if immediately after
> the first connection request (which starts up the vm) i disable the WoL
> feature from guacamole frontend and reconnect i can see the boot logo and
> work on it normally.
> Is the WoL feature expecting a reply from the machine that is woken up
> before trying to connect?
>
> Regards,
>