Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vsphere datastore cluster support #2

Closed
hashibot opened this issue Jun 13, 2017 · 49 comments
Closed

Vsphere datastore cluster support #2

hashibot opened this issue Jun 13, 2017 · 49 comments
Labels
enhancement Type: Enhancement

Comments

@hashibot
Copy link

This issue was originally opened by @hugoboos as hashicorp/terraform#3721. It was migrated here as part of the provider split. The original body of the issue is below.


Hi,

It looks like the Vsphere provider does not have support for datastore clusters.
When I provide a datastore cluster name as datastore under the disk section, Terraform reports back that it can't find the datastore.

With govc from https://github.com/vmware/govmomi I can list the the datastores with the command govc ls.

Thanks!

@hashibot hashibot added the bug Type: Bug label Jun 13, 2017
@hashibot
Copy link
Author

This comment was originally opened by @tkak as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


Current version supports datastore cluster feature partly. If you don't mind, could you tell me your use cases more detail? (.tf file, datastore directory path, etc)

@hashibot
Copy link
Author

This comment was originally opened by @hugoboos as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


We have a VMware cluster with resources pools, storage DRS. The whole enterprise thing.

What we want is to deploy virtual machines based on cluster names, resource pool names, datastore cluster names, etc. like below in the main.tf file. We do not want to specify the directory path but only the name of the object.

Regarding storage, Storage DRS should decide on which datastore the virtual machine ends up.

# main.tf

provider "vsphere" {
  vcenter_server = "vcenter"
  user           = "DOMAIN\account"
  password       = "password"
}

resource "vsphere_virtual_machine" "webserver01" {
  name   = "webserver01"
  vcpu   = 4
  memory = 2048

  datacenter    = "datacenter name"
  cluster       = "cluster name"
  resource_pool = "resource pool name"

  time_zone = "Europe/Amsterdam"

  network_interface {
    label = "network name"
  }

  disk {
    datastore = "datastore cluster name"
    size      = 40
  }
}

@hashibot
Copy link
Author

This comment was originally opened by @chrislovecnm as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


@tkak what changes would need to take place?

@mijit thoughts?

@hashibot
Copy link
Author

This comment was originally opened by @kc11381 as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


Hi,

For this we need support at govmomi library itself. https://github.com/vmware/govmomi/blob/master/find/finder.go look at line number 255.
I think we should have something
if ref.Type == "Datastore" || ref.Type == "StoragePod"{

I have done it for my use case and it works fine.

@hashibot
Copy link
Author

This comment was originally opened by @chrislovecnm as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


@kc11381 you mind filing an issue with Govmomi and referencing it here?

@hashibot
Copy link
Author

This comment was originally opened by @kc11381 as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


Hi Chris,

Here is the ticket:
vmware/govmomi#386
Thank you.

@hashibot
Copy link
Author

This comment was originally opened by @hugoboos as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


Cool.

If we need to test something, please let me know. I'm willing to help out.

@hashibot
Copy link
Author

This comment was originally opened by @daryn-kerr as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


anyone had any success with this? would be great to get it working.

@hashibot
Copy link
Author

This comment was originally opened by @mixacha as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


Support for datastore clusters was merged in vmware/govmomi#428 I guess nothing stops us on terraform side? Waiting on this one as its a God sent tool :-)

@hashibot
Copy link
Author

This comment was originally opened by @mixacha as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


@chrislovecnm itd be great if someone looked into this one now that vmware fully supports it

@hashibot
Copy link
Author

This comment was originally opened by @chrislovecnm as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


@mixacha unfortunately I no longer have my vsphere test bed ;(

@hashibot
Copy link
Author

This comment was originally opened by @mixacha as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


@chrislovecnm unfortunately :(
Really the last piece of puzzle for to enable enterprise companies to use the tool.

@hashibot
Copy link
Author

This comment was originally opened by @derng as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


Same here. I need to demonstrate how powerful Terraform is and I'm from one of the biggest enterprise companies :(

@hashibot
Copy link
Author

This comment was originally opened by @GSkouroupathis as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


+1

@hashibot
Copy link
Author

This comment was originally opened by @mixacha as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


I've got a "small" lab that I can run tests against on any ESX version (currently 5.5 and 6 are installed in it).

@hashibot
Copy link
Author

This comment was originally opened by @chrislovecnm as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


@mixacha appreciated. You develop at all?

@hashibot
Copy link
Author

This comment was originally opened by @kc11381 as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


I will probably look at it. I had customized this plugin for my use case and I too needed Datastore cluster support. At that time I used some hack (basically joining paths) to support it and that is working fine.
Now that proper support is available from govmomi api's, we should look at it.

@hashibot
Copy link
Author

This comment was originally opened by @chrislovecnm as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


@kc11381 that would be aaaawwwweeesssoommmme!!!!

@hashibot
Copy link
Author

This comment was originally opened by @Shruti29 as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


+1 badly need this :)

@hashibot
Copy link
Author

This comment was originally opened by @chrislovecnm as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


@stack72 @phinze @jen20

  1. please remove the bug tag
  2. please add feature

Everyone on this thread I will help this become a P1 feature.

@hashibot
Copy link
Author

This comment was originally opened by @chrislovecnm as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


Pulling in couple more active devs and users:

@dkalleg @kristinn need some design ideas here. Govomi has added support for datastores, vmware/govmomi#428, and now it needs to be implemented in TF. Would either of you be willing to take this on? I can but it may be a couple of weeks, and the scope is probably not huge.

@hugoboos @tommymalmqvist @xantheran as vsphere gurus can you give us silly developers use cases, off of the top of my head:

  1. what happens without DRS
  2. what happens in a cluster
  3. what happens without a cluser
  4. what happenes without datastores
  5. how does TF know which use case

@phinze the natives are saying that this has about as much need as windows support 😄

@hashibot
Copy link
Author

This comment was originally opened by @kristinn as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


@chrislovecnm I would love to. Unfortunately I don't have access to a vmware instance with a datastore cluster configured. I've just used our small vmware setup at work so far while I'm creating PR for TF. 😞

@hashibot
Copy link
Author

This comment was originally opened by @chrislovecnm as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


@kristinn any comments about design would be awesome. Yah lots of bells and whistles ..

@hashibot
Copy link
Author

This comment was originally opened by @mixacha as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


@kristinn You can always run a hypervisor within a hypervisor + vCenter in trial mode for 60 days with highest license tier available and attach two VMDKs to form a datastore custer for testing purposes :-)

@chrislovecnm I'm not a developer but logic inclines that terraform plugin should be able to determine regular datastore vs DS cluster (I believe these are marked as StoragePod type), and should a DS cluster be detected for placement, collect recommendations about initial placement - same as PowerShell cmd-lets are doing this. (also I think govc implemented a similar fashion to detect DS clusters and place virtual machines on top of them).

@hashibot
Copy link
Author

This comment was originally opened by @chrislovecnm as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


This is a long time coming :) It will take 2+ PR's to get in.

The first one hashicorp/terraform#6777

@hashibot
Copy link
Author

This comment was originally opened by @chrislovecnm as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


Still working on this ... But it is getting closer 😄

@hashibot
Copy link
Author

This comment was originally opened by @chrislovecnm as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


If anyone on here is able to help testing, please let me know!!! Code is here: hashicorp/terraform#7031

Initial support for VMs. Disks, Files, and CDs are not yet supported.

@hashibot
Copy link
Author

This comment was originally opened by @pfrayer as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


Hello, any news on this feature, aka using datastore cluster name ?

Having a combo terraform + vmware for huge company is a must have. If stuff like datastore cluster doesn't work, is totaly unsable/useless. And then terraform just become a "tool used for POC or dirty testing", and not for an industrialized-enterprise-grade usage.

@hashibot
Copy link
Author

This comment was originally opened by @gbolo as hashicorp/terraform#3721 (comment). It was migrated here as part of the provider split. The original comment is below.


+1

Would be nice to be able to deploy to a datastore cluster.

@luntzel
Copy link

luntzel commented Jul 7, 2017

+1

krzkowalczyk referenced this issue in krzkowalczyk/terraform-provider-vsphere Jul 14, 2017
This commit fixes the issue where a resize of disk would result
in deletion and creation of the disk. With this change if the
size of an existing disk is increased, terraform reconfigures
the vm's disk with the new size and does not delete create the
disk.
krzkowalczyk referenced this issue in krzkowalczyk/terraform-provider-vsphere Jul 14, 2017
girishramnani pushed a commit to girishramnani/terraform-provider-vsphere that referenced this issue Jul 25, 2017
Terraform website documentation

Approved-by: Ishan Gajera <[email protected]>
squat pushed a commit to squat/tectonic-installer that referenced this issue Sep 25, 2017
There is an open issue for Terraform not supporting LUNs:
hashicorp/terraform-provider-vsphere#2
https://groups.google.com/d/msg/terraform-tool/rSjjZi4ojf8/5F5y0XB-CAAJ

This fix enables users to specify a LUN for each node type.
@jaredmcook
Copy link

Is this issue still being addressed? This is a really big deal for larger VMware shops.

@vancluever
Copy link
Contributor

Hey @jaredmcook, this is definitely on the roadmap! It's not slated for our v1.0.0 release which will be in November, but it will be shortly thereafter - probably one of the first on-deck items after release. Stay tuned!

@tianomonteiro
Copy link

Hi @vancluever , we have any update about this? Thank you.

@pfrayer
Copy link

pfrayer commented Dec 13, 2017

Is this issue still true with the new version of vSphere provider ?
https://www.hashicorp.com/blog/a-re-introduction-to-the-terraform-vsphere-provider

I don't have any vSphere around me to test it

@vancluever
Copy link
Contributor

vancluever commented Dec 13, 2017

Hey all,

Storage cluster support is a feature that is definitely still on the roadmap. Conservatively, I would expect it in a couple of months, released around the time of our support for DRS and storage DRS, but the actual release time may be different.

Hope this helps!

@pfrayer
Copy link

pfrayer commented Dec 13, 2017

Thanks for the update @vancluever :) And it's nice to ear about DRS support !

@tianomonteiro
Copy link

Thanks for the update @vancluever .

@vancluever vancluever added enhancement Type: Enhancement and removed bug Type: Bug labels Dec 15, 2017
@ranjanm1
Copy link

ranjanm1 commented Feb 5, 2018

Hi, just checking is the feature has been progressed?

@jerrykan
Copy link

+1

@darkyat
Copy link

darkyat commented Feb 19, 2018

+1

datastore cluster support would be really important. Right now I don't see any other way than manual datastore assignment when using local storage?

@c4nc
Copy link

c4nc commented Feb 20, 2018

+1

@NickLarsenNZ
Copy link

NickLarsenNZ commented Mar 5, 2018

Is there something particularly difficult with Storage Clusters? Aren't they interacted with in the same way as a Datastore?

@vancluever
Copy link
Contributor

Hi everyone,

I apologize for the delays here. As possibly mentioned in other threads, this is a feature we plan on working on very soon.

@NickLarsenNZ storage pods are not specifically datastores, and are actually more akin to VM folders in the vSphere API. So we need to go over the specifics of addressing them, in addition to evaluating the implications that working with them will have to the way we currently work with datastore attributes.

I understand that there is a lot of demand for this feature and know that we are for sure taking these requests seriously. However, as feedback has just recently been largely limited to +1's, update inquiries, and questions regarding the technical difficulty of implementing the feature, I am going to lock the thread for now until we have further developments on the issue.

Thanks!

@vancluever
Copy link
Contributor

Hey all, I'm happy to say that we have released 1.4.0 with support for datastore clusters and Storage DRS. Check the CHANGELOG for more details, in addition to the provider documentation for the following resources:

Thanks for all your patience on this one!

@hashicorp hashicorp unlocked this conversation Apr 10, 2018
@midacts
Copy link

midacts commented Apr 10, 2018

Awesome. Thanks for adding this.
This is a big deal for vShpere VM deployments.

stobias123 pushed a commit to stobias123/terraform-provider-vsphere that referenced this issue Dec 9, 2019
Adding travis, gitignore,go-version files
@ghost ghost locked and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Type: Enhancement
Projects
None yet
Development

No branches or pull requests