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

    SR_BACKEND_FAILURE_79 VDI Invalid size

    Scheduled Pinned Locked Moved Development
    7 Posts 2 Posters 945 Views 1 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.
    • R Offline
      rusaev
      last edited by rusaev

      Hello everyone.
      I am developing management of VMs via the web.
      Faced the problem of resizing the disk.
      To change I use the VDI.resize function
      I cannot understand this function in what format does it accept data B, KB, MB, GB?
      If I transfer to Byte, writes an error

      API failure. (SR_BACKEND_FAILURE_79 VDI Invalid size [opterr = VDI size must be between 1 MB and 2088960 MB])
      

      If I transfer to KB .... an error

      API failure. (SR_BACKEND_FAILURE_79 VDI Invalid size [opterr = shrinking not allowed])
      

      Maybe someone knows how to do it right?

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Hi,

        I am developing management of VMs via the web.

        You know there's Xen Orchestra, right? If no, please check https://xen-orchestra.com If yes, why reinventing the wheel? (you might have a good personal reason, just wondering)

        Believe me, doing an UI on top of XAPI is a LOT of work, it took us years to master it, with a team of 5 or 6 people.

        1 Reply Last reply Reply Quote 0
        • R Offline
          rusaev
          last edited by rusaev

          Of course I'm familiar with Xen Orchestra, but it doesn't suit me.

          1. Integration with CRM.
          2. Integration with the company's website.
          3. I am learning and it is very pleasant to do something myself, time does not matter.
          1 Reply Last reply Reply Quote 0
          • olivierlambertO Offline
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            Then why not using XO API? That would make more sense to control directly the central point than having to deal with all hosts individually. Plus it means XO can act as a proxy between hosts and your business app.

            1 Reply Last reply Reply Quote 0
            • R Offline
              rusaev
              last edited by

              Thank you for introducing the possibilities XO, but everyone is free to choose their own path. Sorry, but the question is not about the capabilities of XO, I would like to hear who can help me ..

              1 Reply Last reply Reply Quote 0
              • olivierlambertO Offline
                olivierlambert Vates 🪐 Co-Founder CEO
                last edited by

                I'm just asking questions 🙂 XO API will be probably more logical to you, but you decide 🙂

                1 Reply Last reply Reply Quote 0
                • R Offline
                  rusaev
                  last edited by

                  Solved the problem by explicitly specifying the data type

                  $resize = 'VDI.resize';
                  $xcpapi->$resize($vdi, ''.(int)$hdd2.'');
                  

                  Doesn't work without brackets

                  ''.(int)$hdd2.''
                  
                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post