Menu

#46 Start all vms in a group, problem on RDP

5.0-3
closed
nobody
None
5
2015-09-09
2015-08-12
Davide Dec
No

Just begun to use the grouping function of the phpvirtualbox interface.
Starting all the group vms using the context menu on the group title results in all vms to be assigned with the same RDP listening port.
Each vm is configured for a port range of 9000-9100. Starting vms one-by-one it works, assigning a different port for each vm.
I'm using vbox 5.0.0 and phpVirtualBox 5.0-1.
Don't know if the same apply on older versions.

Discussion

  • Ian Moore

    Ian Moore - 2015-08-13

    phpVirtualBox doesn't choose RDP ports. VIrtualBox itself does this. I imagine all of them are starting up at the same time and seeing the same port free. This would probably happen in the VirtualBox GUI as well.

     
  • Davide Dec

    Davide Dec - 2015-08-14

    Many thanks Ian for your explanation. I will check deeply and try to find a solution.

     
  • Davide Dec

    Davide Dec - 2015-08-14

    I confirm that the standard VirtualBox GUI is not affected by this problem.

    The main reason I think is because phpVirtualBox starts all the group's machine at the same time.
    The standard GUI starts them one-by-one.

    Best Regards,
    Davide

     
  • Davide Dec

    Davide Dec - 2015-08-14

    Ok, sorry for flooding this thread but I found a workaround that works.
    In js/phpvirtualbox.js in the startVMs function I did the following change:

    // Loop
    window.setTimeout(function(){ runVMsToStart(vms); }, 500);

    instead of:

    // Loop
    runVMsToStart(vms);

    I know it's just a workaround. If the speed of the server or the web browser changes it's possible that still some vms gets the same RDP port.

    Some sort of feedback from ajax is needed in order to fix it in the best way. It doesn't look to be too much complicated (I think can be done inside the .done section of _startVM).

    Thanks for your work.
    Davide

     
  • Ian Moore

    Ian Moore - 2015-08-14

    OK, thank you for chasing it down. I'll get something similar added to the next version.

     
  • Davide Dec

    Davide Dec - 2015-08-14

    Thanks to you Ian.

     
  • Ian Moore

    Ian Moore - 2015-09-09
    • Group: unassigned --> 5.0-3
     
  • Ian Moore

    Ian Moore - 2015-09-09

    This should be resolved in 5.0-3

     
  • Ian Moore

    Ian Moore - 2015-09-09
    • status: open --> closed
     

Log in to post a comment.