chef-provisioning-vsphere icon indicating copy to clipboard operation
chef-provisioning-vsphere copied to clipboard

Provide ability to assign vSphere tags when creating machines

Open jmery opened this issue 7 years ago • 9 comments

vSphere tags allow users to associate metadata with vSphere objects including VMs. In many environments, the usage of tags is a mandatory requirement when creating VMs. Additionally, many users require a standard hostname format which precludes the ability to directly determine that a host was created by chef-provisioning-vsphere or kitchen-vsphere.

In the latter case, the ability to tag a VM with something like test-kitchen would provide a very easy method to identify temporary machines. This could be used to setup jobs that periodically delete these systems to clean up orphans, prevent VM sprawl, etc.

jmery avatar Apr 20 '17 13:04 jmery

@jrgarcia any thoughts here? Can rbvmomi take tags?

jjasghar avatar Apr 20 '17 21:04 jjasghar

I'm pretty sure that RbVmomi doesn't support tagging yet. Let me check on that. I know that the vSphere Automation SDK handles tagging, but it's not available as a Gem or on GitHub yet (I'm working on that as we speak). I'll look at what it would take to add tagging to RbVmomi.

jrgarcia avatar Apr 20 '17 21:04 jrgarcia

What about this https://code.vmware.com/apis/70/vsphere-automation-ruby ?

juanxhos avatar Apr 26 '17 02:04 juanxhos

@jcalonsoh That is available (I've just actually started working on that as my daily job), but as I stated above, it isn't available as a Gem or on GitHub. It's still available for use, but it is not as easily consumable as it should be.

jrgarcia avatar Apr 26 '17 02:04 jrgarcia

true @jrgarcia

juanxhos avatar Apr 26 '17 02:04 juanxhos

I am working on it though! :smile: Soon...

jrgarcia avatar Apr 26 '17 02:04 jrgarcia

Any further movement on this? This is a feature we'd definitely like to see.

Thanks!

qubitrenegade avatar Jul 23 '18 16:07 qubitrenegade

@jrgarcia poke :)

jjasghar avatar Jul 23 '18 16:07 jjasghar

I would also like to vote this up. We're using this for kitchen cookbook testing on our VMWare lab.

smackmybitsup avatar Nov 29 '18 17:11 smackmybitsup