XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. samuelolavo
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 7
    • Posts 15
    • Groups 0

    samuelolavo

    @samuelolavo

    3
    Reputation
    1
    Profile views
    15
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    samuelolavo Unfollow Follow

    Best posts made by samuelolavo

    • RE: Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2

      Hello,

      I’ve been configuring NUT on XCP-ng 8.3 and had some trouble finding proper documentation. However, after going through the messages in this forum, I created a document that I believe might help others set up the NUT client on XCP-ng 8.3:
      https://github.com/samuel-olavo/xcp-ng-nutclient

      This method worked for me — tested and confirmed.

      Thanks everyone!

      posted in Compute
      S
      samuelolavo

    Latest posts made by samuelolavo

    • RE: Performing automated shutdown during a power failure using a USB-UPS with NUT - XCP-ng 8.2

      Hello,

      I’ve been configuring NUT on XCP-ng 8.3 and had some trouble finding proper documentation. However, after going through the messages in this forum, I created a document that I believe might help others set up the NUT client on XCP-ng 8.3:
      https://github.com/samuel-olavo/xcp-ng-nutclient

      This method worked for me — tested and confirmed.

      Thanks everyone!

      posted in Compute
      S
      samuelolavo
    • How to force shutdown a specific XCP-ng host without migrating VMs (with HA enabled)

      Hi everyone,

      I have an XCP-ng pool with High Availability (HA) enabled. Normally, when I issue a shutdown command on a host (either via xe host-shutdown or from Xen Orchestra), the system automatically starts migrating all VMs to other hosts in the pool — which makes sense for HA.

      However, in my case, I’m integrating the hosts with a central UPS monitoring system (NUT), and during a power outage, I need to force a host to shut down immediately — without triggering VM migrations, even if HA is currently active.

      Is there any CLI command or parameter that allows a clean, immediate shutdown of a specific host without migration attempts, or any way to temporarily suppress HA’s automatic evacuation logic for a given shutdown action?

      I’m aware that disabling HA entirely (xe pool-ha-disable) before shutdown would work, but I’m looking for a faster or more direct way, ideally per-host, not affecting the whole pool.

      Any suggestions or best practices for this type of emergency power management setup?

      Thanks in advance!

      — Samuel Olavo

      posted in Hardware
      S
      samuelolavo
    • RE: NVIDIA GPU passthrough on XCP-ng 8.3 fails after reboot — UUID/PCI ID changes

      @olivierlambert

      I have a the XCP8.3 installed.
      Xen Orchestra, commit bcee5 .

      When I add it manually, the audio, for example, it asks for a reboot, but then, when I restart the server, it has another pci ID, and another ID.

      aba3b57a-fb08-4af6-9f05-3c07b4e494e8-image.png

      posted in Hardware
      S
      samuelolavo
    • RE: NVIDIA GPU passthrough on XCP-ng 8.3 fails after reboot — UUID/PCI ID changes

      @olivierlambert

      Thank you for your reply.

      I followed your instructions; however, when I passthrough the GPU NVIDIA on the XenOrchestra and he same error occurs when I reboot.

      Change the PCI and UUID of the graphics card to the one before rebooting.

      posted in Hardware
      S
      samuelolavo
    • NVIDIA GPU passthrough on XCP-ng 8.3 fails after reboot — UUID/PCI ID changes

      I’m trying to use passthrough for an NVIDIA GPU on XCP-ng 8.3.
      The host detects the GPU (lspci shows VGA + Audio), and IOMMU is enabled.

      However, whenever I apply xen-pciback.hide and reboot the host, XCP-ng generates a new internal UUID and new PCI ID for the GPU.
      As a result, I cannot even assign the GPU to a VM, because the device “changes” its reference after each reboot.

      Additional important context:

      I previously had a different GPU doing passthrough in a VM.

      That GPU was removed.

      The new GPU was installed in a different slot.

      I suspect the issues may be related to leftover metadata from the previous GPU, which prevents the new GPU from being recognized consistently for passthrough.

      Question:
      Has anyone encountered this problem? Is there a way to completely clear the old passthrough state on the host or ensure that the new GPU is recognized consistently for passthrough?

      posted in Hardware
      S
      samuelolavo
    • RE: Clarification on Creating ResourceSet via xo-cli

      @julien-f

      Hello,

      When I try to create a:

      resourceSet.create name=test-resource subjects=["d301d9ea-9e22-4480-bf40-111111111111"]' objects='["8fb06362-d8fe-598b-f819-11111111111111"]' shareByDefault=1
      

      I always get this error:

      ✖ invalid parameters
        property @./subjects: must be array
        property @./objects: must be array
      

      Also, I don't know how to specify the resource limits.

      If you can help me, I would greatly appreciate it!

      Thank you very much!

      posted in REST API
      S
      samuelolavo
    • Clarification on Creating ResourceSet via xo-cli

      Hi,

      I am trying to create a resource set using the xo-cli command with the following syntax:

      xo-cli resourceSet.create name='test' subjects='["123"]' objects='["123", "456"]' limits='{"ram":"16","disk":"200","cpu":"8"}' tags='["3321"]' networks='["321"]' shareByDefault=true
      

      Could you please confirm if this is the correct way to create a resource set in Xen Orchestra, or if any adjustments are required to ensure successful execution?

      Thank you for your assistance!

      posted in REST API
      S
      samuelolavo
    • RE: xo-cli user.create issues

      @julien-f Good afternoon, I am using Node 21, and I believe the PHP configuration is correct.

      However, is it possible to create users via REST API? And also self-service?

      posted in REST API
      S
      samuelolavo
    • RE: xo-cli user.create issues

      @olivierlambert I have already verified, and I can execute the script directly in the shell without any issues. Is it possible to create a user via the REST API? I couldn't find any documentation on this topic.

      posted in REST API
      S
      samuelolavo
    • xo-cli user.create issues

      Good afternoon, I am using the Laravel framework, but I am having a lot of difficulties creating a user via shell_exec.

      $xoCommand = [
                     'xo-cli',
                     'user.create',
                     "email=$username",
                     "password=$randomPassword",
                     "permission=none"
                 ];
                 $this->info("Executing command: " . implode(' ', $xoCommand));
      
                 $process = new Process($xoCommand);
                 $process->run();
      

      When I execute the command, it constantly returns this error in the logs:

      [2024-10-28 13:44:35] local.INFO: Output from user:create command: Executing command: xo-cli user.create email=usertest password=1234 permission=none
      Error creating user in XO: internal/process/esm_loader.js:74
          internalBinding('errors').triggerUncaughtException(
                                    ^
      
      Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'fs' imported from /usr/local/lib/node_modules/xo-cli/index.mjs
          at packageResolve (internal/modules/esm/resolve.js:664:9)
          at moduleResolve (internal/modules/esm/resolve.js:705:18)
          at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:798:11)
          at Loader.resolve (internal/modules/esm/loader.js:100:40)
          at Loader.getModuleJob (internal/modules/esm/loader.js:246:28)
          at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:47:40)
          at link (internal/modules/esm/module_job.js:46:36) {
        code: 'ERR_MODULE_NOT_FOUND'
      }
      

      Can you please help me?

      I can execute other types of commands without any problem, such as:

      $output = shell_exec('xo-cli list-objects type=VM'); for example.
      
      posted in REST API
      S
      samuelolavo