I have an application in Java/Groovy and a Virtual Machine Appliance of Graylog running on VirtualBox.
How can I "make the connection" to store my logs on Graylog?
Your are using this virtual machine. Assuming you need to create a new Graylog input and adapt the Logstash .conf to send logs with GELF:
Add the following line in your Logstash .conf, in the output section as follows:
output {gelf {host => "my_VM_IP"}}
Start your Logstash instance.