Is it possible to deploy vm's using a csv or something similar? I want to automate the install of about 100 servers. The only option I have found is using powershell. I would really like some other options though. Thanks.
VCenter exposes an API, the documentation for which can be found here:
http://www.vmware.com/support/pubs/sdk_pubs.html
Armed with that API and a template, you should be able to do what you want to do in the language of your choice.
Templates can be customized with a CustomizationSpec directly from the VSphere client as well, which means you can deploy directly from the template in the client.
Other options: VMware's Orchestrator or Microsoft Orchestrator with the VMware plugin.
However, is there really any reason not to use Powershell? PowerCLI can do what you want to do and very easily. I've deployed thousands of servers with it.
Related
I'm attempting to build some custom automation to handle the import / export of VM's to / from an on-prem vmware cluster.
So far I have authenticated the rest api, can get a VM's info, but I cannot work out how to approach exporting the selected VM.
I believe I'll need to create a download session & iterate through its files, saving them to disk one by one whilst keeping the download session alive, but the documentation seems to skirt around the concept of exporting a VM and focus predominantly on deploying.
Does anyone have an example / list of steps required to achieve exporting a VM via the Rest API?
As of 7.0U2, that functionality doesn't exist in the vSphere Automation (REST) API. Here are the top level VM functions: link
If you're open to using the vSphere Web Services (SOAP) API, there's an exportVM function available: link
If you want to automate VMs import/export I recommend to use OVF Tool / PowerCLI.
I leave you a KB with example https://kb.vmware.com/s/article/1038709
I have very less experience working on VM provisioning. As part of my current poc, I want to provision vm through API of either vcenter(VmWare) or through Ovirt(https://www.ovirt.org/). What is the easiest way to set up the ecosystem?
Talking about oVirt, you have different methods to provision your VMs:
With Ansible, using official oVirt roles and methods;
With Terraform, using the Terraform oVirt Provider plugin;
Writing your own code, using the specific SDK for Python, Java, Ruby, Go or in plain REST API without any SDKs.
I am using PowerCLI on RHEL to fetch information from VMs.
I have searched many websites, but I am not getting how to find this details like:
Established connections of VM,
Load Average,
Top Processes,
Process Counts..
It would be a grateful, if anybody knows how to get these details using PowerCLI...
note: I think there are cmdlets which work for windows powerCLi, but doesn't for RHEL.
Thank you
Invoke-VMScript is going to be the cmdlet you'll want to use to obtain that sort of information, however it is not yet functional in the PowerCLI Core fling.
Note: The PowerCLI Core fling isn't a supported VMware release and it also has a dependency on using the PowerShell Alpha release... where as PowerShell is on Beta and even RC builds.
The goal is certainly to make it functional on PowerShell 6.0, but it's not there yet.
I'm trying to build a small webapp that will handle our development environments located on an openstack infrastructure (version 2012.2.2-dev, bundled in ubuntu 12.04) and I need to create some volumes using the API (i decided to use openstack rest api). I'm able to start machines and do some other operations (everything is built based on this: http://api.openstack.org/api-ref.html). If I send the request to create a volume as explained on the api reference, i get a 404. I tried different api versions (v1), but still no success.
Thank you in advance.
What language are you coding in? You could just use an SDK for this and skip trying to talk to the API directly. See
https://wiki.openstack.org/wiki/SDKs
In newer releases of OpenStack it is preferable to make use of the Cinder API rather than Nova API.
In folsom, Cinder uses IDENTICAL API refs to Nova volume related API sets. This is because this was the first release to separate out volume management to cinder as a stand alone project. While volume API references remain in folsom it is not the default and it is not the preferred method for accessing volumes REST queries.
Check out.
http://docs.openstack.org/developer/cinder/
I am trying to move a web application that currently runs on WebSphere 6.1 application server over Glassfish 3.X. I currently have a set of WebSphere jacl files that configure an instance of a WAS for my web application (data sources, queues, etc.) and a .bat and a .sh file that execute the jacl files (I think via wsadmin). I develop on a WAS instance on my Windows PC and the software is tested on a WAS instance installed on a Solaris test machine.
Is there the equivalent concept for Glassfish?
That is, does Glassfish have a concept of a platform independent administration scripting language like WebSphere jacl/jython that can be executed from a call from a Windows .bat file or a Unix .sh file?
I'm relatively new to web development and so I may have made some conceptual mistakes and you may also have to fill in some gaps in my question.
Thanks
You can feed a configuration script to asadmin, that contains asadmin subcommands like deploy and create-jdbc-resource, etc...
The 'language' does not have any real flow-of-control or looping constructs, so you would need to flatten those types of things out of the script that would get called by your dot-bat or dot-sh.
If you are really leveraging jacl/jython this might not be possible... but if you aren't putting these interpreters through their paces, the asadmin 'language' may be rich enough for you.
Yes, take at a look at the "asadmin" command. It should be able to configure most anything you need from a script.