<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to revert VM to snapshot]]></title><description><![CDATA[<p dir="auto">Re: <a href="/forum/topic/7685/automation-script-to-revert-and-save-snapshot">Automation script to revert and save snapshot</a></p>
<p dir="auto">I have the same question.<br />
I'm trying<br />
curl -k -X POST -b 'authenticationToken=&lt;my-token-from-user-authentication-tokens&gt;' 'https://&lt;xen-local&gt;/rest/v0/vm-snapshot/&lt;snapshot-id&gt;/actions'<br />
and i get<br />
[]<br />
How do i revert to the snapshot?</p>
]]></description><link>https://xcp-ng.org/forum/topic/11384/how-to-revert-vm-to-snapshot</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 08:00:00 GMT</lastBuildDate><atom:link href="https://xcp-ng.org/forum/topic/11384.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Oct 2025 10:57:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to revert VM to snapshot on Tue, 09 Jun 2026 09:16:30 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/slavavrn" aria-label="Profile: slavavrn">@<bdi>slavavrn</bdi></a>,<br />
FYI, its now possible to revert a snapshot via the REST API.<br />
<code>POST /vms/:id/actions/revert_snapshot</code><br />
And the body of the endpoint:</p>
<pre><code>{
  "snapshotId": &lt;snapshot-id&gt;
  "snapshotBefore": boolean (optional)
}
</code></pre>
]]></description><link>https://xcp-ng.org/forum/post/106094</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/106094</guid><dc:creator><![CDATA[MathieuRA]]></dc:creator><pubDate>Tue, 09 Jun 2026 09:16:30 GMT</pubDate></item><item><title><![CDATA[Reply to How to revert VM to snapshot on Mon, 03 Nov 2025 14:23:07 GMT]]></title><description><![CDATA[<p dir="auto">Thanks <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/mathieura" aria-label="Profile: MathieuRA">@<bdi>MathieuRA</bdi></a> !</p>
]]></description><link>https://xcp-ng.org/forum/post/99181</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/99181</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Mon, 03 Nov 2025 14:23:07 GMT</pubDate></item><item><title><![CDATA[Reply to How to revert VM to snapshot on Mon, 03 Nov 2025 13:20:48 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/slavavrn" aria-label="Profile: slavavrn">@<bdi>slavavrn</bdi></a><br />
FYI, all endpoints are now documented in Swagger.</p>
<p dir="auto">The REST API code is available <a href="https://github.com/vatesfr/xen-orchestra/tree/master/%40xen-orchestra/rest-api/src" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>.</p>
<p dir="auto">The <code>revert snapshot</code> action is not yet accessible via the REST API, but you can use it with xo-cli.</p>
<p dir="auto"><a href="https://github.com/vatesfr/xen-orchestra/blob/master/packages/xo-server/src/api/vm.mjs#L1195" target="_blank" rel="noopener noreferrer nofollow ugc">See</a><br />
<code>xo-cli vm.revert snapshot=&lt;snapshot-id&gt;</code></p>
]]></description><link>https://xcp-ng.org/forum/post/99178</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/99178</guid><dc:creator><![CDATA[MathieuRA]]></dc:creator><pubDate>Mon, 03 Nov 2025 13:20:48 GMT</pubDate></item><item><title><![CDATA[Reply to How to revert VM to snapshot on Mon, 03 Nov 2025 11:52:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> There is no information on this issue yet?</p>
]]></description><link>https://xcp-ng.org/forum/post/99173</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/99173</guid><dc:creator><![CDATA[slavavrn]]></dc:creator><pubDate>Mon, 03 Nov 2025 11:52:49 GMT</pubDate></item><item><title><![CDATA[Reply to How to revert VM to snapshot on Wed, 15 Oct 2025 07:33:01 GMT]]></title><description><![CDATA[<p dir="auto">I will let <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/mathieura" aria-label="Profile: mathieuRA">@<bdi>mathieuRA</bdi></a> to answer</p>
]]></description><link>https://xcp-ng.org/forum/post/98487</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/98487</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Wed, 15 Oct 2025 07:33:01 GMT</pubDate></item><item><title><![CDATA[Reply to How to revert VM to snapshot on Wed, 15 Oct 2025 07:32:11 GMT]]></title><description><![CDATA[<p dir="auto">So, Swagger isn't 100% API compliant. That's what I was saying <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=1d3f495298e" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /><br />
Can I see the API endpoints myself? Is the code open source?<br />
<a href="https://github.com/vatesfr/xen-orchestra/blob/master/packages/xo-server/src/api/vm.mjs#L1088" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/vatesfr/xen-orchestra/blob/master/packages/xo-server/src/api/vm.mjs#L1088</a><br />
Did I find the correct entry point?<br />
Maybe I should use xo-cli to perform the revert operation? Or does the cli also access the API and can't provide more functionality?</p>
]]></description><link>https://xcp-ng.org/forum/post/98486</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/98486</guid><dc:creator><![CDATA[slavavrn]]></dc:creator><pubDate>Wed, 15 Oct 2025 07:32:11 GMT</pubDate></item><item><title><![CDATA[Reply to How to revert VM to snapshot on Tue, 14 Oct 2025 15:38:06 GMT]]></title><description><![CDATA[<p dir="auto">Because some endpoints aren't migrated to swagger yet (it needs to be correctly typed etc.). Each month we migrate more and more endpoint to it (it's almost done).</p>
<p dir="auto">Adding <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/mathieura" aria-label="Profile: mathieuRA">@<bdi>mathieuRA</bdi></a> in the convo</p>
]]></description><link>https://xcp-ng.org/forum/post/98463</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/98463</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Tue, 14 Oct 2025 15:38:06 GMT</pubDate></item><item><title><![CDATA[Reply to How to revert VM to snapshot on Tue, 14 Oct 2025 15:19:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a><br />
But, for example, for VMS, there are the following actions:<br />
curl -k -X GET -H "Content-Type: application/json" -b authenticationToken=&lt;my-token-from-user-authentication-tokens&gt; 'https://&lt;xen-local&gt;/rest/v0/vms/&lt;vm_id&gt;/actions'<br />
[<br />
"/rest/v0/vms/&lt;vm_id&gt;/actions/clean_reboot",<br />
"/rest/v0/vms/&lt;vm_id&gt;/actions/clean_shutdown",<br />
"/rest/v0/vms/&lt;vm_id&gt;/actions/hard_reboot",<br />
"/rest/v0/vms/&lt;vm_id&gt;/actions/hard_shutdown",<br />
"/rest/v0/vms/&lt;vm_id&gt;/actions/snapshot",<br />
"/rest/v0/vms/&lt;vm_id&gt;/actions/start"<br />
]<br />
but in swagger you can see only one action - start<br />
So, not everything available through the API is reflected in Swagger?<img src="/forum/assets/uploads/files/1760455169983-screenshot-2025-10-14-181918.png" alt="Screenshot 2025-10-14 181918.png" class="img-markdown  img-fluid" width="1450" height="596" /></p>
]]></description><link>https://xcp-ng.org/forum/post/98462</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/98462</guid><dc:creator><![CDATA[slavavrn]]></dc:creator><pubDate>Tue, 14 Oct 2025 15:19:36 GMT</pubDate></item><item><title><![CDATA[Reply to How to revert VM to snapshot on Sun, 05 Oct 2025 07:58:48 GMT]]></title><description><![CDATA[<p dir="auto">Swagger is auto generated from the API, so the doc cannot lag. That's the point of the Swagger doc/API.</p>
]]></description><link>https://xcp-ng.org/forum/post/98126</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/98126</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Sun, 05 Oct 2025 07:58:48 GMT</pubDate></item><item><title><![CDATA[Reply to How to revert VM to snapshot on Sat, 04 Oct 2025 13:11:55 GMT]]></title><description><![CDATA[<p dir="auto">Re: <a href="/forum/topic/7685/automation-script-to-revert-and-save-snapshot">Automation script to revert and save snapshot</a></p>
<p dir="auto">Thanks.</p>
<p dir="auto">Can I be sure that all API capabilities are reflected in Swagger?</p>
<p dir="auto">So far, I've only found one method: creating a scheduled job, which can be launched via the API.<br />
curl -k -X POST -b 'authenticationToken=&lt;my-token-from-user-authentication-tokens&gt;' 'https://&lt;xen-local&gt;/rest/v0/schedules/&lt;schedule-id&gt;/actions/run'<br />
But that's a bit of a complicated process.</p>
]]></description><link>https://xcp-ng.org/forum/post/98113</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/98113</guid><dc:creator><![CDATA[slavavrn]]></dc:creator><pubDate>Sat, 04 Oct 2025 13:11:55 GMT</pubDate></item><item><title><![CDATA[Reply to How to revert VM to snapshot on Sat, 04 Oct 2025 11:42:52 GMT]]></title><description><![CDATA[<p dir="auto">Adding <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/lsouai-vates" aria-label="Profile: lsouai-vates">@<bdi>lsouai-vates</bdi></a> in the loop to check with the team to know when it's planned</p>
]]></description><link>https://xcp-ng.org/forum/post/98112</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/98112</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Sat, 04 Oct 2025 11:42:52 GMT</pubDate></item><item><title><![CDATA[Reply to How to revert VM to snapshot on Sat, 04 Oct 2025 11:40:15 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">You should use the integrated Swagger doc.  Directly from your browser, eg:<br />
https://&lt;xen-local&gt;/rest/v0/docs/#/vms</p>
<p dir="auto">You will see in green all the actions possible. Revert isn't implemented yet in the REST API AFAIK.</p>
]]></description><link>https://xcp-ng.org/forum/post/98111</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/98111</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Sat, 04 Oct 2025 11:40:15 GMT</pubDate></item></channel></rss>