Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28870

allow specifying target host when cloning a VM

      When you clone a VM the cloned VM is created randomly on any host.
      In our situation there is assigned host per team and the clone is created on host assigned to other teams.
      Let configure the target host for the VM clone in advanced parameter.

          [JENKINS-28870] allow specifying target host when cloning a VM

          pjdarton added a comment - - edited

          I'd also like to see this implemented.
          While we don't have a "host per team", we have hosts that have finite GPU hardware resources and have found that when vSphere clones a template, it always targets the same host that the template is on, and when that host runs out of hardware resources for the VMs, vSphere continues to try putting the VM on the now-overloaded host and fails.
          So, as vSphere isn't managing the distribution of VMs across the different hosts, we're going to have to do that ourselves.

          So, I'd like to see a optional "Host" field in

          • The "Deploy VM from template" vSphere build step
          • The "Clone VM from VM or template" vSphere build step
          • The vSphere cloud-slave template configuration.

          Ideally, the UI would allow the user to select a host from a drop-down list, but free-format text would suffice if that proves too tricky.
          I'd guess that this would require modifying VSphere.java's cloneOrDeployVm method and adding yet another nullable field, and then wiring that through (plus any other helper methods required to support the UI).

          pjdarton added a comment - - edited I'd also like to see this implemented. While we don't have a "host per team", we have hosts that have finite GPU hardware resources and have found that when vSphere clones a template, it always targets the same host that the template is on, and when that host runs out of hardware resources for the VMs, vSphere continues to try putting the VM on the now-overloaded host and fails. So, as vSphere isn't managing the distribution of VMs across the different hosts, we're going to have to do that ourselves. So, I'd like to see a optional "Host" field in The "Deploy VM from template" vSphere build step The "Clone VM from VM or template" vSphere build step The vSphere cloud-slave template configuration. Ideally, the UI would allow the user to select a host from a drop-down list, but free-format text would suffice if that proves too tricky. I'd guess that this would require modifying VSphere.java's cloneOrDeployVm method and adding yet another nullable field, and then wiring that through (plus any other helper methods required to support the UI).

          pjdarton added a comment -

          I have since found that if you have datastores that are limited to a single host, specifying a datastore will limit operations to that host.

          i.e. it can be done, albeit indirectly.

          pjdarton added a comment - I have since found that if you have datastores that are limited to a single host, specifying a datastore will limit operations to that host. i.e. it can be done, albeit indirectly.

          pjdarton added a comment -

          ichai This ticket is marked as being "In progress" and owned by you - are you working on this?  If so, could you submit a pull-request (on github) for this?

          pjdarton added a comment - ichai This ticket is marked as being "In progress" and owned by you - are you working on this?  If so, could you submit a pull-request (on github) for this?

          pjdarton added a comment -

          Looks like it wasn't as "in progress" as shown.

          If I'm wrong, feel free to re-open this and submit a PR that does this.

          pjdarton added a comment - Looks like it wasn't as "in progress" as shown. If I'm wrong, feel free to re-open this and submit a PR that does this.

            ichai Ichai Luzon
            ichai Ichai Luzon
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: