In case you have not heard the news, the VMware Fusion and Workstation team just released their 2017 Tech Preview releases which you can read more about it here and here. A couple of years back, VMware had released a slimmed down desktop Hypervisor based on VMware Fusion called AppCatalyst which was optimized for developers wanting to run Docker Containers. Although the feedback for AppCatalyst was positive, the large majority of customers preferred to see the AppCatalyst specific features such as the RESTful API to just be included natively within Fusion rather than having a separate product.
Although it could not be said at the time, the feedback was heard loud and clear and the plan was to pull in the AppCatalyst REST API directly into Fusion. With the Fusion 2017 Tech Preview, you will now be able to interact with your Virtual Machines running on Fusion using the new Fusion REST API which also includes some additional new capabilities that was not there with the AppCatalyst REST APIs such as network and port forwarding management.
UPDATE (09/27/17) - VMware Fusion 10 has just officially GA'ed and there have been number of updates and enhancements since the Tech Preview. From an Automation/API standpoint, there have been several major updates that I would like to call out.
First, there are several new command-linen options to the vmrest utility including support for both HTTP and HTTPS API endpoints, credentials are also now supported so you can setup a shared username/password and ensure that only authorized folks can login to the API and lastly, the default port is now also configurable. Along with these widely requested features during the Tech Preview, there is also a nice debugging option while using the Fusion UI for troubleshooting purposes.
Secondly, the Fusion Swagger REST API docs has received a total re-vamp in terms of organization and cleaned up documentation. Below is a screenshot of the Swagger interface for the GA version of Fusion 10 which should make it even easier to consume the REST API.
Step 1 - Once you have installed the Fusion 2017 TP release, you will need to start the REST API endpoint which is provided by /Applications/VMware Fusion Tech Preview.app/Contents/Public/vmrest You can just type vmrest and it should automatically start or if you prefer to run it in the background, just type the following:
Here is screenshot of starting the Fusion REST API endpoint:
Step 2 - To verify that everything is working correctly, you can browse to the Fusion REST API Explorer (just like you could w/AppCatalyst) which uses Swagger. Simply open a web browser and point it to http://localhost:8697 and it should load the following page as shown in the screenshot below.
Step 3 - If you already have some Fusion VMs deployed, we can use the Fusion REST API Explorer to list all of our VMs. Just click and expand GET /vms endpoint and then scroll to where it says "Try it out" button and it should list all of your VMs as shown in the screenshot below.
The Fusion REST API Explorer not only provides documentation on what APIs are available and how to use them, but you can also use as a quick way of interacting with the API. For those interested in using and learning more about the Fusion REST API, I wrote a nice cheatsheet for the AppCatalyst REST API, although the binaries have changed, some of the underlying API should still be the same and this resource could help.
If you have any feedback or questions, be sure to check out the Fusion 2017 Tech Preview Communities and leave a comment, both Engineering and Product Management is actively watching the forums, so be sure to let them know what you like and what can be improved! I really hope the Fusion REST API turn into a more general "hosted" REST API that could be applicable to both Fusion and Workstation, Bo ... if case you are watching/listening 😀