one icon indicating copy to clipboard operation
one copied to clipboard

Keep BOOT state for managed VMs until the running state is confirmed

Open OpenNebulaProject opened this issue 9 years ago • 7 comments


Author Name: OpenNebula Systems Support Team (OpenNebula Systems Support Team) Original Redmine Issue: 4242, https://dev.opennebula.org/issues/4242 Original Date: 2015-12-14 Original Assignee: Abel Coronado


To avoid getting "VNC Failed to connect to server (code: 1006)" shortly after the VM has booted.

OpenNebulaProject avatar Nov 20 '17 09:11 OpenNebulaProject


Original Redmine Comment Author Name: Ruben S. Montero (@rsmontero) Original Date: 2015-12-16T09:07:37Z


Probably the state machine transitions for "managed" VMs (vCenter, EC2...) may be altered, so it remains in BOOT state till their running status is confirmed through monitor, or a new state can be added BOOT->PRE-RUN...

OpenNebulaProject avatar Nov 20 '17 09:11 OpenNebulaProject


Original Redmine Comment Author Name: Ruben S. Montero (@rsmontero) Original Date: 2016-01-04T11:48:36Z


Ruben S. Montero wrote:

Probably the state machine transitions for "managed" VMs (vCenter, EC2...) may be altered, so it remains in BOOT state till their running status is confirmed through monitor, or a new state can be added BOOT->PRE-RUN...

Or probably based on the last-monitored is a better idea

OpenNebulaProject avatar Nov 20 '17 09:11 OpenNebulaProject


Original Redmine Comment Author Name: OpenNebula Systems Support Team (OpenNebula Systems Support Team) Original Date: 2016-01-05T10:51:45Z


For vCenter the VMware tools may be used to ascertain that the VM is running

To preserve the hook functionality, the state machine transition change may be the right path.

OpenNebulaProject avatar Nov 20 '17 09:11 OpenNebulaProject


Original Redmine Comment Author Name: Miguel Ángel Álvarez Cabrerizo (Miguel Ángel Álvarez Cabrerizo) Original Date: 2017-05-23T15:10:40Z


The issue in vCenter is like this:

  • A VM is deployed and the status is RUNNING.
  • Sunstone's VNC button is enabled as the state is RUNNING.
  • The VNC connection may fail shortly after the VM is RUNNING because the VCENTER_ESX_HOST attribute is not assigned yet, so Sunstone does not know in what ESX host the VM is running so NoVNC proxy cannot forward the connection.
  • Once the VMs are monitored in a host poll, Sunstone knows where's the VM and the VNC connection is successful.

This is the solution that will be committed to master:

  • Once the VM has been powered on, a temporary file will store the esx host where the VM has been deployed. Also a similar file will be generated when a Wild VM is imported, so the VNC connection works right away.
  • When OpenNebula's proxy tries to open a connection for the vCenter VM it will try to obtain the ESX host from the monitoring info but if it's not there yet it'll use the temporary file containing the host. If it's not possible to retreve that host, an error will be sent to Sunstone telling the user: "Could not determine the vCenter ESX host where the VM is running. Wait till the VCENTER_ESX_HOST attribute is retrieved once the host has been monitored"

OpenNebulaProject avatar Nov 20 '17 09:11 OpenNebulaProject


Original Redmine Comment Author Name: Ruben S. Montero (@rsmontero) Original Date: 2017-07-14T11:32:35Z


Just to review the file procedure, it'd may be better to add that directly to the VM template of the imported VM.

OpenNebulaProject avatar Nov 20 '17 09:11 OpenNebulaProject

I checked it and it is already done.

joseangelgm avatar May 28 '18 11:05 joseangelgm

He should to reopen this issue because we will add a new field in user template with the vcenter host.

joseangelgm avatar Jun 07 '18 10:06 joseangelgm