First off, since you're using a Virtual Machine I cannot indicate whether this would work fully as expected as this is third party software and may have unexpected configurations.
As I'd still like to help with this, please take the following into account:
For Dropbox to work correctly, it needs to be installed in an Operating System (OS) that is not part of a Shared Session. If installing into a virtual environment, it would need to be installed into a user account that is part of this virtual desktop or virtual machine and only accessed by that user account. The Dropbox folder should also be located on the same mounted drive that is running the virtual machine or virtual desktop. ( also make sure that is on a supported format)
Moreover, be aware that if you install Dropbox on a virtual machine or virtual desktop that are non-persistent, such that they are reset on a schedule or after logging off, Dropbox may be logged out and need to resync everytime this occurs.
In addition and as per your specific issue with "Connecting" I'd suggest that you also checked your antivirus/security programs ( firewalls and proxy settings as well).
I hope this helps to some extent and please let me know how this goes. Thank you and happy Monday!