XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. mietek
    M
    Offline
    • Profile
    • Following 0
    • Followers 1
    • Topics 4
    • Posts 43
    • Groups 0

    mietek

    @mietek

    -5
    Reputation
    12
    Profile views
    43
    Posts
    1
    Followers
    0
    Following
    Joined
    Last Online

    mietek Unfollow Follow

    Best posts made by mietek

    • RE: XO debian 10 cloud ready VM template (cloud-init)

      FYI If you are looking for more info on the matter yourself ...

      ver: 20.2-2 of the cloud-init is still the one with the bug mentioned by @olivierlambert earlier:
      https://github.com/vatesfr/xen-orchestra/issues/4449

      There is version 20.3 awaiting to be delivered but still awaiting to be packaged:
      https://tracker.debian.org/pkg/cloud-init

      flipsa created this issue in vatesfr/xen-orchestra

      closed Cloud-init NoCloud block device has wrong dosfslabel --> cloud-init can't find datasource and exits #4449

      posted in Xen Orchestra
      M
      mietek
    • RE: xo-cli --register produces "invalid parameters" errors in xo logs

      @julien-f I have installed node LTS ver and the new xo-cli works fine:

      nodejs:
      ->     v16.20.0   (Latest LTS: Gallium)
      xo-cli:
      └── xo-cli@0.17.1
      

      Thanks for help.

      posted in Xen Orchestra
      M
      mietek
    • RE: XO debian 10 cloud ready VM template (cloud-init)

      I was able to find the reason XO is not working with cloud-init.
      XO attaches iso with the cloud-config data as additional disk xvdb and it does not work.
      But if you provide it as a cd? It will.

      That is why - as for now you will need to create your own iso and attach it as a cd-rom.
      You do that this way:

      Get your files ready (meta-data network-config user-data). My examples below:

      metadata:

      instance-id: local-nocloud
      local-hostname: myhost.example.com
      

      network-config:

      network:
        version: 1
        config:
          - type: physical
            name: eth0
            subnets:
               - type: static
                 address: 10.0.0.5/24
                 gateway: 10.0.0.254
          - type: nameserver
            address:
              - 8.8.8.8
              - 8.8.4.4
            search:
              - example.com
          
          - type: physical
            name: eth1
            subnets:
               - type: static
                 address: 192.168.0.5/24
      

      user-data:

      #cloud-config
      
      ### RUN CMD
      runcmd:
        - /usr/bin/apt -y install mc
        - /usr/bin/date >> /root/testfile
        
      # set system default user
      system_info:
        default_user:
          name: testuser
          gecos: Default Cloud User
      
      # password auth - comment out if not using passwords
      password: testpassword
      ssh_pwauth: true
      chpasswd: { expire: false }
      
      # do some package management
      #package_update: true
      packages:
       - iptraf
       - mtr
       - screen
       - net-tools
       - atop
      

      Generate iso

      genisoimage -output myiso.iso -volid cidata -joliet -rock user-data meta-data network-config
      

      Upload iso to XO
      home -> storage -> iso's -> disks -> new disk

      Prepare VM/template

      • Install Debian 10.6 with xo-tools
      • install cloud-init and cloud-initramfs-growroot
      • remove all network configuration leave just "allow-hotplug ethxxx"
        (network config will be added in /etc/network/interfaces/50-cloud-init. It will not overwrite yours)
      • shutdown the machine and create the template if you want or just restart VM.
      • DO NOT LET IT BOOT! - keep it in grub.
      • attach your iso
      • let it run

      It will do whatever you need on the machine.

      posted in Xen Orchestra
      M
      mietek
    • RE: XO templates cd image problem

      This is a great news as I will be able to have all my scripts written as of now and xo-cli in one place.
      Thanks @olivierlambert

      For those who are looking for direct instructions ... on Debian 10.x:

      # install npm:

      apt install npm
      

      # install xo-cli:

      npm install -g xo-cli
      
      posted in Xen Orchestra
      M
      mietek
    • RE: XO debian 10 cloud ready VM template (cloud-init)

      Gents [ @olivierlambert @fohdeesha], let me reply to both of you and finish this unfortunate (part of) the discussion.
      It took this drastic downturn and I am not enjoying it at all [!] as both you as well.

      Your active engaged in community forum is admirable and I mean it! (especially because of your position, Olivier).
      I was directed to XO project because of very favorable opinions about the support and robust community.

      That being said - please do not hold it against me though that I am disappointed that I received answers which were not helpful.
      You do not have to have malicious intent to do so and that is - unfortunately - my experience.
      I can see though how my post might be read this way - I could phrase it better - my bad! I am sorry - that inappropriate.

      To end up this negative chain - I respect you guys and it was not my intention to make it such a sour experience for everyone.
      If I may propose one thing though - If you reply to the post with X number of questions try to reply to all of them.
      Even if that would be just one sentence that would put requestor on the right path. That would be very appreciated.

      Going back to the cloud-init itself.
      Explanation that it caused a lot o issues in the past very well explains my experience with it and feel that I got from XO and cloud-init implementation of it.

      1. is default config for NoCloud "should" make VM responsive to it or there are some additional steps I should go through?
        (I will be going back to testing with CentOS before trying Deb 10 just to be sure I am working on something that I may expect to work)
      2. do you support or plan to support Ignition or another project that would do the trick of on-the-fly config for cloud purposes?
      3. (if you do) is there any documentation for it?

      Thanks for help and have a good one, Gents!

      posted in Xen Orchestra
      M
      mietek
    • RE: XO debian 10 cloud ready VM template (cloud-init)

      @fohdeesha : may I ask you to provide me with the answers to my questions (see above) / prequisits regarding preparing Debian 10 VM for template for cloud-init please?

      posted in Xen Orchestra
      M
      mietek
    • XO debian 10 cloud ready VM template (cloud-init)

      Gents,

      1. where can I find a debian 10 cloud ready template for XO
      2. is there a manual for creating it from scratch?

      I am trying to build customs VMs with XO but it fails to pass any config data to the new VM (created from template) probably because of configuration mistakes when preparing VM for template.

      Thanks for help

      PS. I found this but it needs to be updated for debian 10 and newer version on XO and links do not work anymore:
      https://xen-orchestra.com/blog/full-cloudinit-power-in-xenserver/

      posted in Xen Orchestra
      M
      mietek
    • RE: XO debian 10 cloud ready VM template (cloud-init)

      @olivierlambert

      1. First of all Thanks for the link to the Xen Documentation it is helpful.
      2. ".. You aren't alone in the world"
        From what I see is that you have replied to me for the first time the same day I have posted my question. Although your answered just one question regarding cloud image - nothing about creating it from scratch. Even though I continued asking about it it took you another 6 days to reply. Then when you provided me with the link to the Debian bug I found that you knew about that issue being involved in discussions about it for almost a year now.
        To summarise
      • you knew I will be struggling - because of the Debian bug
      • you never provided me with the data sources even though I asked about it explicitly
      • after that you directed me to Debian 8 manual which is irrelevant to Debian 10 (even though you knew there is a bug in Debian 10)
      • and as a cherry on the top you've told me to "google it".
      • you have provided me with the link to the Debian bug 9 days after my initial question only when I raised my concern and disappointment.

      From my point of view you were deliberately not answering my questions which just proves that you never wanted to help quite the contrary ... and this IS truly disappointing my friend!

      posted in Xen Orchestra
      M
      mietek
    • RE: XO debian 10 cloud ready VM template (cloud-init)

      Is there anyone who is able to answer my questions?

      • You are referring me to outdated, unusable and even misleading dock
        [as far I can see Xen changed cloud-init datasource from "OpenStack Config Drive" to "NoCloud" at lease as a main one:
        https://xen-orchestra.com/forum/topic/1315/cloud-init-from-templates-do-not-read-local-datasource

      • XEN documentation is unavailable [404]:
        https://xen-orchestra.com/docs/cloudinit.html

      • I hope the network issues were resolved:
        https://xcp-ng.org/forum/topic/2256/cloudinit-network-config-is-being-saved-in-the-config-drive-but-its-not-being-applied/4

      • To hear this kind of comment on the official forum is just pure gold:
        "but most of what's require to do is available on Google"

      You gents need a proper manual/documentation because as of now it's just a slipshod work.
      All of this is just so disappointing ...

      posted in Xen Orchestra
      M
      mietek

    Latest posts made by mietek

    • RE: xo-cli --register produces "invalid parameters" errors in xo logs

      @julien-f OK, server upgrade it is.
      Thanks for a prompt reply. Appreciate it.

      posted in Xen Orchestra
      M
      mietek
    • RE: xo-cli --register produces "invalid parameters" errors in xo logs

      @julien-f Hey, I am back to the original issue now:
      "message": "should not contains property ["description"]

      If there is anything I can do to not have it in logs then great, but if not
      @olivierlambert might be right that it's time to finally upgrade the server version.

      posted in Xen Orchestra
      M
      mietek
    • RE: xo-cli --register produces "invalid parameters" errors in xo logs

      Hey @julien-f, I have to get back to the issue as I had to move witn node and xo-cli to other machine and even though I have node: v16.20.0 and xo-cli: v0.17.1
      I see those errors again.
      Is there any way to have it fixed without upgrading xo-server? [ver: 5.87.0]

      posted in Xen Orchestra
      M
      mietek
    • RE: xo-cli --register produces "invalid parameters" errors in xo logs

      @julien-f I have installed node LTS ver and the new xo-cli works fine:

      nodejs:
      ->     v16.20.0   (Latest LTS: Gallium)
      xo-cli:
      └── xo-cli@0.17.1
      

      Thanks for help.

      posted in Xen Orchestra
      M
      mietek
    • RE: xo-cli --register produces "invalid parameters" errors in xo logs

      @julien-f v14.21.3

      posted in Xen Orchestra
      M
      mietek
    • RE: xo-cli --register produces "invalid parameters" errors in xo logs

      @julien-f xo-cli installation runs fine. Trying to run it fails.
      I have rolled it back to 0.14.0 and it works fine.

      posted in Xen Orchestra
      M
      mietek
    • RE: xo-cli --register produces "invalid parameters" errors in xo logs

      @julien-f
      upgrade or reinstall of xo-cli crashes now with an error:

      internal/process/esm_loader.js:74
          internalBinding('errors').triggerUncaughtException(
                                    ^
      
      Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:assert/strict
          at new NodeError (internal/errors.js:322:7)
          at Function.Module._load (internal/modules/cjs/loader.js:781:13)
          at Module.require (internal/modules/cjs/loader.js:1003:19)
          at require (internal/modules/cjs/helpers.js:107:18)
          at Object.<anonymous> (/usr/lib/node_modules/xo-cli/node_modules/http-request-plus/index.js:5:16)
          at Module._compile (internal/modules/cjs/loader.js:1114:14)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
          at Module.load (internal/modules/cjs/loader.js:979:32)
          at Function.Module._load (internal/modules/cjs/loader.js:819:12)
          at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:203:29) {
        code: 'ERR_UNKNOWN_BUILTIN_MODULE'
      

      I am not really a Java guy. What am I missing here?

      posted in Xen Orchestra
      M
      mietek
    • RE: xo-cli --register produces "invalid parameters" errors in xo logs

      @julien-f Hey, thanks for the info. Let me update the client and get back to you.

      posted in Xen Orchestra
      M
      mietek
    • xo-cli --register produces "invalid parameters" errors in xo logs

      I have written a script downloading info about the whole cluster using xo-cli.

      The simple command:

      /usr/bin/xo-cli --register --allowUnauthorized https://<web\_address> <user> <pass>
      

      even though login is successful:

      Successfully logged with <username>
      

      is producing these errors in xo logs:

      token.create
      {
        "description": "xo-cli --register"
      }
      {
        "code": 10,
        "data": {
          "errors": [
            {
              "code": null,
              "reason": "strict",
              "message": "should not contains property [\"description\"]",
              "property": "@"
            }
          ]
        },
        "message": "invalid parameters",
        "name": "XoError",
        "stack": "XoError: invalid parameters
          at Module.invalidParameters (/opt/xen-orchestra/packages/xo-common/src/api-errors.js:21:32)
          at Object.call (file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:73:18)
          at Api.callApiMethod (file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:303:19)"
      }
      

      Any tips on what is the issue and how to eliminate it spamming the logs?

      (script has to run periodically)

      posted in Xen Orchestra
      M
      mietek
    • RE: XO spawned VM from template has wrong VIF network order

      @Forza Hey - thanks for the input. It would be valid if I would reboot xcp host though. All this is happening on live xcp server which is problematic.
      It's no the end of the world but there has to be a way to debug it.
      Any tips on that?

      posted in Xen Orchestra
      M
      mietek