- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise
- >
- Triggering a snapshot during a workflow?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2022 10:41 AM
04-29-2022 10:41 AM
I’m developing a provisioning workflow to run in our vmware cloud. I want to trigger a snapshot of the VM once it’s booted. What’s the easiest way to set up a task I can drop in the workflow?
Solved! Go to Solution.
- Tags:
- automation
- VMware

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2022 12:07 PM
04-29-2022 12:07 PM
Re: Triggering a snapshot during a workflow?
That worked! Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2022 11:11 AM
04-29-2022 11:11 AM
Re: Triggering a snapshot during a workflow?
Hey @malberg! The easiest way will be calling the API via a post task to call to snapshot. Give me 2 minutes and I’ll whip something up!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2022 11:19 AM
04-29-2022 11:19 AM
Re: Triggering a snapshot during a workflow?
Damn… took me 6 minutes. I have failed you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2022 11:18 AM
04-29-2022 11:18 AM
SolutionSo per the API docs here you can do a task like the local executed shell script below.
Optionally you can send a body payload to configure a name/description as well
URL='<%=morpheus.applianceUrl%>'
INSTANCE='<%=instance.id%>'
TOKEN='<%=morpheus.apiAccessToken%>'
curl -X PUT "$URL/api/instances/$INSTANCE/snapshot" \
-H "Authorization: BEARER $TOKEN" \
-H "Content-Type: application/json"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2022 10:04 AM
05-10-2022 10:04 AM
Re: Triggering a snapshot during a workflow?
Followup… I need to revert to that snapshot later on in the workflow.
I guess I can use GET $serverUrl/api/instances/:id/snapshots to get the snapshot listing for the instance, then PUT $serverUrl/api/instances/:id/revert-snapshot/:snapshotId to revert. The list of snapshots is returned as json. is there a best practice for parsing JSON inside a bash task?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2022 12:20 PM
05-10-2022 12:20 PM
Re: Triggering a snapshot during a workflow?
You can make the API calls in really any language. If you are utilizing bash, probably best bet is to use jquery or something to easily manipulate JSON returns.