• 0 Votes
    9 Posts
    75 Views
    M

    @CodeMercenary Can't help you there. The only thing I use(d) is the cli on the xcp hosts themselves.
    reboot or shutdown

  • XO Rest API

    4
    0 Votes
    4 Posts
    22 Views
    julien-fJ

    @irtaza9 Creating a VM is an action on a pool.

    Check out the /rest/v0/pools/_/actions endpoint for the available actions and expected params.

  • 0 Votes
    5 Posts
    114 Views
    P

    Hi,

    i have same issue when adding XCP-ng 8.3 host to CloudStack 4.19.1.3 (pool with single host):

    cloudstack log:

    2024-11-28 15:24:31,812 INFO [c.c.r.ResourceManagerImpl] (qtp660017404-16:ctx-2963461b ctx-f5077d60) (logid:c31fbed3) Trying to add a new host at http://10.1.253.118 in data center 1 2024-11-28 15:24:31,865 WARN [c.c.h.x.d.XcpServerDiscoverer] (qtp660017404-16:ctx-2963461b ctx-f5077d60) (logid:c31fbed3) Xml Rpc Exception org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse server's response: Duplicate name: restrict_vtpm at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:188) at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:156) at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:143) at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:69) at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56) at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167) at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:137) at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:126) at com.xensource.xenapi.Connection.dispatch(Connection.java:330) at com.xensource.xenapi.Host.getAllRecords(Host.java:3251) at com.cloud.hypervisor.xenserver.discoverer.XcpServerDiscoverer.find(XcpServerDiscoverer.java:237)

    i've API call packet capture an i found that 'pool.get_record' section 'restrictions' has only one ocurence of 'restrict_vtpm'
    but 'host.get_all_records' section 'license_params' has 'restrict_vtpm' twice, same as 'xe host-license-view' output.

    Petr

  • Clarification on Creating ResourceSet via xo-cli

    4
    0 Votes
    4 Posts
    67 Views
    julien-fJ

    @samuelolavo Shell only handles string values, to pass other types to xo-cli you need to encode them in JSON and use the json: prefix:

    xo-cli resourceSet.create name=test-resource subjects=json:'["d301d9ea-9e22-4480-bf40-111111111111"]' objects=json:'["8fb06362-d8fe-598b-f819-11111111111111"]' shareByDefault=json:true
  • xo-cli user.create issues

    7
    0 Votes
    7 Posts
    104 Views
    julien-fJ

    @samuelolavo No, users management and self service are not in the REST API yet.

  • action rolling_update fails with strange error

    Solved
    6
    0 Votes
    6 Posts
    215 Views
    V

    @julien-f thanks! I have tested it and its working now! cheers Ringo

  • Sorting out APIs and Ansible Modules

    7
    0 Votes
    7 Posts
    177 Views
    olivierlambertO

    Yes, you can use Terraform directly 🙂

  • Using API to automate VM OS Drive replacement

    9
    0 Votes
    9 Posts
    191 Views
    K

    Hi @olivierlambert ,

    Okay, I made some progress today and have worked out the steps to remove, delete or add drives to a VM.

    Removed drive from the server attached to and also deleted the disk itself

    xo-cli vdi.delete id=<the id of the VDI>

    Removed drive from the server attached to, but didn't delete the disk!

    xo-cli vdb.delete id=<the id of the VBD>

    Added a drive to the server

    xo-cli vm.attachDisk vdi=<the id of the VDI> vm=<the id of VM>

    If was the last one that I was missing. I'm still not sure of the difference between the 'uuid' and 'id' fields, but will use the 'id' as this seems to be what the commands are wanting.

    Thanks
    Kent.

  • programmatically connect SR (NFS)

    Solved
    5
    0 Votes
    5 Posts
    124 Views
    olivierlambertO

    Perfect, excellent news 🙂 Enjoy XCP-ng!

  • This topic is deleted!

    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Get VNC Console Stream via REST API

    4
    0 Votes
    4 Posts
    212 Views
    julien-fJ

    @Morpheus0x Your feature request has been noted and will be put in the backlog.

    It appears to be trivial so it should we'll try to do it soon but I cannot tell you when.

  • Xen Orchestra API and documentation - Examples

    Moved
    11
    0 Votes
    11 Posts
    1k Views
    olivierlambertO

    I think it might be easier to do so with the new REST API, what do you think @julien-f ? 🤔

  • Disable TX checksumming with API

    3
  • Example - List all VM backups

    7
    0 Votes
    7 Posts
    463 Views
    K

    @cmuller
    Thank you! It's great to see code-sharing in the forum!

  • Network creation on the pool using xo-cli

    1
    0 Votes
    1 Posts
    83 Views
    No one has replied
  • Inquiry about Obtaining VM Disk Space Usage via XO API or XO-CLI

    5
    0 Votes
    5 Posts
    176 Views
    julien-fJ

    First of all, take a look at the general XO REST API documentation.

    Then, take a look at xo-cli --help which explain how to use it to interact with the REST API.

    You can list all VDIs at /rest/v0/vdis, snapshots are available at /rest/v0/vdi-snapshots.

    You also have the ability to list the VDIs attached to a specific VM at /rest/v0/vms/:id/vdis.

  • Accessing Resource Set and ACLs Information via API

    3
    0 Votes
    3 Posts
    132 Views
    julien-fJ

    @samuelolavo Not exposed in the REST API yet.

    You can use the legacy API for this:

    xo-cli acl.get xo-cli resourceSet.getAll
  • Fetch backup information

    11
    0 Votes
    11 Posts
    387 Views
    R

    @julien-f maybe there can we some recoverypoint endpoint? or remotes?

  • Backup job list with most recent status

    1
    0 Votes
    1 Posts
    108 Views
    No one has replied
  • Access historical CPU and memory metrics - Xen Orchestra v5

    18
    0 Votes
    18 Posts
    743 Views
    olivierlambertO

    Have you read https://xapi-project.github.io/xen-api/metrics.html ? It explains the diff between getting all data and only the diff (delta). It's a must read to understand the way RRDs can be fetch.