<?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[XCP-NG and Ansible - Error in create VM on XCP-NG-8.2.1]]></title><description><![CDATA[<p dir="auto">Hi, Everyone!<br />
I've two environment with XCP-NG, a with XCP-NG 8.2.0 where I use for tests. The other, it is a XCP-NG 8.2.1, this I use for production.<br />
I wrote a playbook for to create VMs in XCP-NG. In test environment ( 8.2.0) I dind't have problem, but when I ran the playbook in produciton environmet for me the ansible showed a error when it try to create a VM.<br />
This is the error:<br />
fatal: [localhost]: FAILED! =&gt; {"changed": false, "msg": "XAPI ERROR: ['HANDLE_INVALID', 'host', 'OpaqueRef:45ceb5df-0d7f-4485-98b5-af8439f6cbd2']"}</p>
<p dir="auto">In logs i found the lines with de error menseges.</p>
<p dir="auto">Apr 29 15:32:53 xcp-ng-r740 xapi: [error||1967426 :::80||backtrace] host.get_record D:74f5c816f7e9 failed with exception Db_exn.DBCache_NotFound("missing row", "host", "OpaqueRef:45ceb5df-0d7f-4485-98b5-af8439f6cbd2")<br />
Apr 29 15:32:53 xcp-ng-r740 xapi: [error||1967426 :::80||backtrace] Raised Db_exn.DBCache_NotFound("missing row", "host", "OpaqueRef:45ceb5df-0d7f-4485-98b5-af8439f6cbd2")<br />
Apr 29 15:32:53 xcp-ng-r740 xapi: [error||1967426 :::80||backtrace] 1/9 xapi Raised at file ocaml/database/db_cache_impl.ml, line 135<br />
Apr 29 15:32:53 xcp-ng-r740 xapi: [error||1967426 :::80||backtrace] 2/9 xapi Called from file ocaml/xapi/db_actions.ml, line 8160<br />
Apr 29 15:32:53 xcp-ng-r740 xapi: [error||1967426 :::80||backtrace] 3/9 xapi Called from file ocaml/xapi/rbac.ml, line 197<br />
Apr 29 15:32:53 xcp-ng-r740 xapi: [error||1967426 :::80||backtrace] 4/9 xapi Called from file ocaml/xapi/rbac.ml, line 205<br />
Apr 29 15:32:53 xcp-ng-r740 xapi: [error||1967426 :::80||backtrace] 5/9 xapi Called from file ocaml/xapi/server_helpers.ml, line 92<br />
Apr 29 15:32:53 xcp-ng-r740 xapi: [error||1967426 :::80||backtrace] 6/9 xapi Called from file ocaml/xapi/server_helpers.ml, line 113<br />
Apr 29 15:32:53 xcp-ng-r740 xapi: [error||1967426 :::80||backtrace] 7/9 xapi Called from file lib/xapi-stdext-pervasives/pervasiveext.ml, line 24<br />
Apr 29 15:32:53 xcp-ng-r740 xapi: [error||1967426 :::80||backtrace] 8/9 xapi Called from file <a href="http://map.ml" target="_blank" rel="noopener noreferrer nofollow ugc">map.ml</a>, line 135<br />
Apr 29 15:32:53 xcp-ng-r740 xapi: [error||1967426 :::80||backtrace] 9/9 xapi Called from file src/sexp_conv.ml, line 156<br />
Apr 29 15:32:53 xcp-ng-r740 xapi: [error||1967426 :::80||backtrace]</p>
<p dir="auto">Can someone help me in this case?</p>
<p dir="auto">Bellow I putted the playbook that I used.</p>
<hr />
<ul>
<li>name: Tentativa de criação VM<br />
hosts: localhost<br />
vars_files: /home/teste/ansible/vars/xen_localhost_vars.yml<br />
tasks:
<ul>
<li>name: Criando VM<br />
community.general.xenserver_guest:<br />
hostname: "{{ xenserver }}"<br />
username: "{{ xenserver_username }}"<br />
password: "{{ xenserver_password }}"<br />
#validate_certs: false<br />
#home_server:<br />
folder: /teste/vm<br />
name: teste<br />
state: poweredon<br />
#template: Debian11_Disk30G<br />
template_uuid: "{{ templete_vm }}"<br />
disks:
<ul>
<li>size_gb: 40<br />
sr_uuid: xxxxxx-xxxx-xxxxx-xxxxx-xxxxxxxxxxxxx<br />
hardware:<br />
num_cpus: 1<br />
num_cpu_cores_per_socket: 1<br />
memory_mb: 1024<br />
#cdrom:<br />
#type: iso<br />
#iso_name: guest-tools.iso<br />
networks:</li>
<li>name: network0<br />
#mac: aa:bb:dd:aa:00:18<br />
#wait_for_ip_address: true<br />
#delegate_to: localhost<br />
register: deploy</li>
</ul>
</li>
<li>name: deploy<br />
debug:<br />
msg: "{{ deploy }}"<br />
...</li>
</ul>
</li>
</ul>
<p dir="auto">Sorry me about my English, because it is in building</p>
]]></description><link>https://xcp-ng.org/forum/topic/8931/xcp-ng-and-ansible-error-in-create-vm-on-xcp-ng-8-2-1</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Apr 2026 18:17:26 GMT</lastBuildDate><atom:link href="https://xcp-ng.org/forum/topic/8931.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 30 Apr 2024 16:54:57 GMT</pubDate><ttl>60</ttl></channel></rss>