<?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[Feedback from Automation Project (vCPUs, VDI rename, boot order)]]></title><description><![CDATA[<p dir="auto"><strong>Hi Vates team,</strong></p>
<p dir="auto">I'm building an automated deployment tool that provisions VMs via the XO REST API (<code>/rest/v0/</code>). The tool needs to work on both <strong>Xen Orchestra from Sources (XOCE)</strong> and <strong>XO Appliance (XOA)</strong>. I ran into a few API limitations and wanted to share what I found, along with the workarounds I implemented. Hopefully this feedback is useful.</p>
<h3>1. <code>cpus</code> field in <code>create_vm</code> — XOCE vs XOA inconsistency</h3>
<p dir="auto">When calling <code>POST /rest/v0/pools/{id}/actions/create_vm</code>, XOCE accepts a <code>cpus</code> field in the request body to set the vCPU count on the new VM. XOA rejects the same payload with a <strong>400 error</strong> citing <code>"excess property"</code>.</p>
<p dir="auto"><strong>Workaround:</strong> I send the payload with <code>cpus</code> included, and if the response contains "excess property", I retry without it. The VM inherits the template's vCPU count in that case, which is acceptable but not ideal — it means XOA users can't set vCPUs at creation time via the REST API.</p>
<p dir="auto"><strong>Request:</strong> Could the <code>cpus</code> field be added to XOA's <code>CreateVmBody</code> schema to match XOCE behavior? Or if there's a different field name XOA expects, documentation would be appreciated.</p>
<h3>2. No way to rename VDIs via REST API</h3>
<p dir="auto">When cloning a VM from a template, the new VM's VDIs (virtual disks) inherit their names from the template. In a Storage Repository with many VMs, this creates confusing duplicate names. I wanted to rename VDIs after creation to follow a <code>{vm_name}_Disk0_OS</code> convention, but the REST API doesn't appear to support <code>PATCH</code> or <code>PUT</code> on <code>/rest/v0/vdis/{id}</code>.</p>
<p dir="auto">I also attempted using the JSON-RPC API (<code>/api/</code>) with <code>vdi.set</code>, but discovered that the JSON-RPC endpoint only supports <strong>WebSocket</strong> connections — HTTP POST to <code>/api/</code> returns an HTML redirect rather than a JSON-RPC response.</p>
<p dir="auto"><strong>Workaround:</strong> I document that users should name the template's VDIs descriptively <em>before</em> converting to a template, since those names propagate to all clones.</p>
<p dir="auto"><strong>Request:</strong> Would it be possible to add PATCH support for VDI properties (at minimum <code>name_label</code>) to the REST API? Alternatively, if there's an existing method I'm missing, I'd appreciate a pointer.  I see that this may have been mentioned here as well:  <a href="https://xcp-ng.org/forum/topic/11970/request-add-patch-vms-id-for-updating-vm-properties-name_description-name_label">https://xcp-ng.org/forum/topic/11970/request-add-patch-vms-id-for-updating-vm-properties-name_description-name_label</a></p>
<h3>3. Boot order altered when cloning without <code>vdis</code> array (XO #4980)</h3>
<p dir="auto">When creating a VM via <code>create_vm</code> with <code>clone: true</code> and <strong>no <code>vdis</code> array</strong> in the payload, the resulting VM has <strong>network boot prepended</strong> to its boot order (e.g., <code>"ncn"</code> instead of <code>"cn"</code>). This causes the VM to PXE boot instead of booting from disk.</p>
<p dir="auto">Including a <code>vdis</code> array in the payload — even if the VM doesn't need a new disk — preserves the correct boot order from the template.</p>
<p dir="auto"><strong>Workaround:</strong> When no data disk is needed, I inject a temporary 1 GB dummy VDI in the <code>vdis</code> array to force the correct boot order, then delete it immediately after VM creation (before the first boot). This is obviously a hack, but it works reliably.</p>
<p dir="auto">I believe this is related to <strong>XO issue #4980</strong>. Any update on whether this will be addressed in the REST API?</p>
<hr />
<h3>Environment</h3>
<ul>
<li><strong>XO versions tested:</strong> XOCE 5.x (built from sources, commit d1736) and XOA (v6.1.2)</li>
<li><strong>XCP-ng:</strong> 8.3</li>
<li><strong>API version:</strong> REST v0 (<code>/rest/v0/</code>)</li>
<li><strong>Automation context:</strong> Bash-based installer using <code>curl</code> for all API calls</li>
</ul>
<p dir="auto">Happy to provide payload examples or logs if any of the above would benefit from more detail. Thanks for the great platform — these are relatively minor friction points in an otherwise excellent API.</p>
]]></description><link>https://xcp-ng.org/forum/topic/12013/feedback-from-automation-project-vcpus-vdi-rename-boot-order</link><generator>RSS for Node</generator><lastBuildDate>Tue, 18 Aug 2026 05:24:21 GMT</lastBuildDate><atom:link href="https://xcp-ng.org/forum/topic/12013.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 27 Mar 2026 00:35:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Feedback from Automation Project (vCPUs, VDI rename, boot order) on Sun, 29 Mar 2026 22:20:55 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> &amp; <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/mathieura" aria-label="Profile: mathieura">@<bdi>mathieura</bdi></a> thanks for the speedy response.  Duly noted, very much appreciated.</p>
]]></description><link>https://xcp-ng.org/forum/post/103954</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/103954</guid><dc:creator><![CDATA[kagbasi-wgsdac]]></dc:creator><pubDate>Sun, 29 Mar 2026 22:20:55 GMT</pubDate></item><item><title><![CDATA[Reply to Feedback from Automation Project (vCPUs, VDI rename, boot order) on Fri, 27 Mar 2026 13:12:49 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the quick answer <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/mathieura" aria-label="Profile: mathieura">@<bdi>mathieura</bdi></a> <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f64f.png?v=f084dd9e819" class="not-responsive emoji emoji-android emoji--pray" style="height:23px;width:auto;vertical-align:middle" title=":pray:" alt="🙏" /></p>
]]></description><link>https://xcp-ng.org/forum/post/103918</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/103918</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Fri, 27 Mar 2026 13:12:49 GMT</pubDate></item><item><title><![CDATA[Reply to Feedback from Automation Project (vCPUs, VDI rename, boot order) on Fri, 27 Mar 2026 10:15:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/kagbasi-wgsdac" aria-label="Profile: kagbasi-wgsdac">@<bdi>kagbasi-wgsdac</bdi></a><br />
Hi, thanks for the feedback.</p>
<ol>
<li>
<p dir="auto">That's normal. It was a bug, and the fix was merged into the master branch two weeks ago. It's therefore available for XOCE, but for XOA, it will be available from version 6.3 (release in a few days).</p>
</li>
<li>
<p dir="auto">Having PATCH enpdoint for all objects (VMs/VDIs/Networks/...) is already in our backlogs but need to be planned. (cc <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/gregoire" aria-label="Profile: gregoire">@<bdi>gregoire</bdi></a> XO-2232). Please also note that you can update a inherited VDI directly during VM creation if you know the VDI's user device. (For example: {userdevice: "0", name_label: "foo-bar"})<br />
<img src="/forum/assets/uploads/files/1774605903853-capture-d-%C3%A9cran-de-2026-03-27-11-00-33.png" alt="Capture d’écran de 2026-03-27 11-00-33.png" class=" img-fluid img-markdown" /></p>
</li>
<li>
<p dir="auto">This fix is already planned to be part of the 6.4 release (cc <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/gregoire" aria-label="Profile: gregoire">@<bdi>gregoire</bdi></a> XO-1909)</p>
</li>
</ol>
]]></description><link>https://xcp-ng.org/forum/post/103913</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/103913</guid><dc:creator><![CDATA[MathieuRA]]></dc:creator><pubDate>Fri, 27 Mar 2026 10:15:24 GMT</pubDate></item><item><title><![CDATA[Reply to Feedback from Automation Project (vCPUs, VDI rename, boot order) on Fri, 27 Mar 2026 07:08:28 GMT]]></title><description><![CDATA[<p dir="auto">Let me add <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/mathieura" aria-label="Profile: mathieuRA">@<bdi>mathieuRA</bdi></a> in the loop (and <a class="plugin-mentions-group plugin-mentions-a" href="/forum/groups/team-xo-backend" aria-label="Profile: Team-XO-Backend">@<bdi>Team-XO-Backend</bdi></a> )</p>
]]></description><link>https://xcp-ng.org/forum/post/103909</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/103909</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Fri, 27 Mar 2026 07:08:28 GMT</pubDate></item></channel></rss>