Uploaded image for project: 'TrueNAS'
  1. TrueNAS
  2. NAS-109712

Use updated endpoints to manipulate VM display/vnc devices

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: Medium
    • Resolution: Complete
    • Affects Version/s: Master - TrueNAS SCALE
    • Fix Version/s: SCALE-21.04-ALPHA.1
    • Component/s: WebUI
    • Labels:
      None

      Description

      Middleware has added support for SPICE and the relevant VNC related enpoints have been updated.

      To summarise, we now have 2 options to have access to a VM - one is VNC and the other is SPICE. Earlier middleware used to have device of type "VNC", these have been changed to use the name "DISPLAY" instead.

      "DISPLAY" device now encapsulate information what a VNC device used to before. All the attributes remain same with the exception of removing "vnc" prefix from them. So now we have following attributes for a "DISPLAY" device:

      1) resolution ( can be retrieved via vm.resolution_choices)
      2) port ( same as before, just renamed )
      3) bind ( same as before, just renamed - choices to be retrieved via "vm.device.bind_choices" )
      4) password ( same as before, just renamed )
      5) type ( a new attribute with valid choices being "SPICE" or "VNC" )

      Other attributes remain same and have not been changed with.

      Now once a VM had started and a VM had a VNC device, we used to show a VNC button which opened up a new tab, this should be changed as a VM can now have 2 DISPLAY devices, one being a VNC device and another being a SPICE display device.

      What we should do now is that we should have a "DISPLAY" button, which when clicked on, should show the a list of DISPLAY devices available and user can click on any device he/she would like to use, if the device in question has a password configured, UI should prompt for a password from the user in a form and then send the payload to "vm.get_display_web_uri" with device id and password. Middleware should return a URI which UI can open in another tab.

      How UI can see that if a VM has display device with password configured is with output of "vm.get_display_devices" which should contain an attribute saying if password is configured or not plus the same endpoint can be used to retrieve the list of display devices when we prompt the user to select which one he/she would like to use with his/her VM.

      Please let me know if there are any queries, thanks.

        Attachments

          Attachments

            JEditor

              Issue Links

                Activity

                  People

                  Assignee:
                  ryousaf Rehan Yousaf
                  Reporter:
                  waqar Waqar Ahmed
                  Votes:
                  2 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved: