XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Unable to define count of CPUs during VM create

    Scheduled Pinned Locked Moved REST API
    4 Posts 2 Posters 54 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      akihu2
      last edited by

      Dear Community and Vates staff,

      I'm trying to automate VM creation using XO REST API, specifically using /rest/v0/pools/_/actions/create_vm endpoint.
      Looks like this endpoint doesn't yet support defining CPU count for the VM. I have XO Community setup in the lab which is compiled from sources. Version is commit c70f9, while writing this it's 9 commits behind master.

      After searching another topics, I found following, https://xcp-ng.org/forum/post/87887

      8 Jan 2025, 18:14
      We will try to add support for CPU settings soon.
      Also, expect things to accelerate in 2025 regarding the REST API.

      This sounds awesome, but as we are already over year 2025, would there be any information available when CPU settings are available in the REST API ?
      Are there any alternative methods available for this need? Previously mentioned Topic mentions JSON RPC but is there any docs available for this interface.

      Attaching also screenshot of create_vm endpoint schema from swagger:fac08cc0-6c8a-4bb1-80c4-4ab9b1c76ff3-image.jpeg

      Thank you in advance!

      Br,
      Aki

      MathieuRAM 1 Reply Last reply Reply Quote 0
      • MathieuRAM Offline
        MathieuRA Vates 🪐 XO Team @akihu2
        last edited by

        @akihu2 Hi.
        It appears to be a bug, as the XO6 UI offers the option to choose the number of VCPU when creating a VM (obviously, this doesn't work).
        I will fix this immediately.

        MathieuRAM A 2 Replies Last reply Reply Quote 0
        • MathieuRAM Offline
          MathieuRA Vates 🪐 XO Team @MathieuRA
          last edited by

          Here is the fix for the REST API + XO6
          https://github.com/vatesfr/xen-orchestra/pull/9591

          MathieuRA opened this pull request in vatesfr/xen-orchestra

          open fix(rest-api/xo6): cpu at VM creation was not working #9591

          1 Reply Last reply Reply Quote 0
          • A Offline
            akihu2 @MathieuRA
            last edited by

            @MathieuRA

            Wow thank you for super fast response! I did check the XO6 also previously and noticed that it had the option to define VCPU count but it didn't work, this explains it completely 😎
            Waiting for merge. I will test and share results here once available.

            Thanks again!

            1 Reply Last reply Reply Quote 1

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post