Kamal Ahmed
2013-Feb-11 19:19 UTC
[Puppet Users] How to take a (VMWare) Virtual Machine''s Snapshot using Puppet
Hi, Here is the scenario: I am on an ubuntu 12.04 host, and want to be able to run a puppet script on another ubuntu 12.04 and Centos 6.3 host, which are VMWare VM''s and be able to: 1. Start / Stop The VM 2. Take a snap Shot 3. delete the VM 4. make a FRESH copy of a BASELINE VM, and start it up I only have ssh capability to the remote machines, but i can also run the ssh command via Jenkins ( Continuous Integration Server ) The search for this sort of capability leads me to : The answers i found lead me towards using [perl api for VMware orchestration.][1] or [VirtuallyGhetto][2] but cannot find puppet samples, where a user can get permissions to create a VM SnapShot, and also revert it, without having root access, or admin rights. I also found [vmth][3] but VMTH currently only works in a QEMU+KVM environment [1]: http://www.vmware.com/support/developer/viperltoolkit/index.html [2]: http://www.virtuallyghetto.com/p/vmware-vsphere-sdk-for-perl-vi-perl.html [3]: https://github.com/gregretkowski/vmth/ to me this is something very basic, and SHOULD be available in puppet natively, but i just cannot seem to find it. Thanks, -Kamal. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Marco Shaw
2013-Feb-12 02:12 UTC
Re: [Puppet Users] How to take a (VMWare) Virtual Machine''s Snapshot using Puppet
> but cannot find puppet samples, where a user can get permissions to create > a VM SnapShot, and also revert it, without having root access, or admin > rights.I would consider 2 possible approaches: 1. You have to get a restricted user created by a VMware administrator. 2. You consider creating a "push service" to have this done. "push service": I can''t think of a better name, but you basically create a service with admin/root access that scans maybe a particular directory. Your puppet scripts, for example, simply drop a file that special directory. Your service scans this directory regularly and takes the appropriate action(s). The file could contain a name and an action: "vm_foo":"create_snapshot". This would be enough information for the service to act accordingly. Marco -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.