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

    Posts

    Recent Best Controversial
    • RE: DevOps Megathread: what you need and how we can help!

      @bufanda said in DevOps Megathread: what you need and how we can help!:

      Backup management with the Terraform provider would be a great feature. Maybe also for an upcoming ansible module. I always struggle to find the right backup for a VM since I grouped them in logical groups. So one Backup may handle multiple VMs and Sometimes it would be just easier to edit some IaC then the GUI, especially when I destroy a VM, I always forget to check if Backups exists.

      @nathanael-h said in DevOps Megathread: what you need and how we can help!:

      @bufanda I think we'll be able to add backup support to Terraform when 1. the provider will use the new Rest API, and 2. when this API will offer endpoints for backups management. I took note. (This won't be done in minutes 😉 )
      About Ansible, it'll depends also if/when we start work on it.

      +1 to the backup management through Terraform. It would be great to be able to manage backup jobs and sequences through Terraform.

      posted in Infrastructure as Code
      B
      BMeach
    • RE: DevOps Megathread: what you need and how we can help!

      It nice to be able to create a schedule or have some way of automatically cleaning up VM templates within XO/XCP-NG with the ability to set a retention policy like backups.

      For example, we have a GitHub workflow that runs daily, weekly, and monthly to create base Ubuntu/Windows server images with the latest updates, those templates have a tag with the build date. We then leverage those templates through other pipelines to test k3s cluster updates with the Terraform provider.

      Currently I have not been able to find any automated task within XO or XCP-NG without external systems. As of current I go in daily and clean up templates that exceeds our desired retention policy (similar to our backup retention policy). I would also like to note that we also have the Vates VMS Enterprise plan through my work account.

      I would also love to see some more work on the Packer provider, mainly with the XVA builder. We have our base Ubuntu templates but would like to be able to take that template and then make another template on top of it with the k3s binary installed for example to prevent having to download and install the binary or other tooling on each VM in a cluster using Terraform or Ansible.

      Lastly it would be nice to have some more frequent updates to the Terraform provider. I am aware that there are updates still being pushed to the main branch but the last release was published on Mar 20, 2024.

      posted in Infrastructure as Code
      B
      BMeach
    • RE: XO Packer template disk issues

      @olivierlambert I think I have found a fix on the Packer side like you were talking about. I have the templates working being built from the "Ubuntu Focal Fossa 20.04" default template. I created a pull request here let me know what you think, this is my first excursion with golang 🙂

      posted in Xen Orchestra
      B
      BMeach
    • RE: XO Packer template disk issues

      Update 1

      I rebuilt my template with all of the exact same settings but instead of cloning from the "Ubuntu Focal Fossa 20.04" default template within XO, I told Packer to clone from the "Other install media" default template. Doing that now makes XO show the cloudinit settings when creating a vm from the Packer generated template. I dont know why changing what template im cloning from changes the results but I think this is still a issue that needs to be fixed. To me it seems like its a disconnect somewhere between Packer and XO. On one side or the other its applying some parameters or not applying some parameters thats needed to see the existing disk. Any ideas?

      Debug Logs

      For clarity im attaching the same debug info that I did for the other two templates. The new template that I created has a name label of "ubuntu-2004-server-test-golden-v2023.01" and a UUID of "42d967db-44f9-8ba5-37b7-2a09da8b5b7e"

      xe template-param-list uuid=<templateUUID>

      ubuntu-2004-server-test-golden-v2023.01

      xe template-param-list uuid=42d967db-44f9-8ba5-37b7-2a09da8b5b7e

      uuid ( RO)                                  : 42d967db-44f9-8ba5-37b7-2a09da8b5b7e
                                  name-label ( RW): ubuntu-2004-server-test-golden-v2023.01
                            name-description ( RW): Version: v2023.01 | Built on: 2023-01-11 00:33 UTC | Built by: HashiCorp Packer 1.8.5
                                user-version ( RW): 1
                               is-a-template ( RW): true
                         is-default-template ( RW): false
                               is-a-snapshot ( RO): false
                                 snapshot-of ( RO): <not in database>
                                   snapshots ( RO): 
                               snapshot-time ( RO): 19700101T00:00:00Z
                               snapshot-info ( RO): 
                                      parent ( RO): <not in database>
                                    children ( RO): 
                           is-control-domain ( RO): false
                                 power-state ( RO): halted
                               memory-actual ( RO): <not in database>
                               memory-target ( RO): 0
                             memory-overhead ( RO): 37748736
                           memory-static-max ( RW): 4294967296
                          memory-dynamic-max ( RW): 4294967296
                          memory-dynamic-min ( RW): 4294967296
                           memory-static-min ( RW): 4294967296
                            suspend-VDI-uuid ( RW): <not in database>
                             suspend-SR-uuid ( RW): <not in database>
                                VCPUs-params (MRW): 
                                   VCPUs-max ( RW): 2
                            VCPUs-at-startup ( RW): 2
                      actions-after-shutdown ( RW): Destroy
                        actions-after-reboot ( RW): Restart
                         actions-after-crash ( RW): Restart
                               console-uuids (SRO): 
                                         hvm ( RO): false
                                    platform (MRW): timeoffset: 1; device-model: qemu-upstream-compat; viridian: false; nx: true; pae: true; apic: true; acpi: 1
                          allowed-operations (SRO): changing_NVRAM; changing_dynamic_range; changing_shadow_memory; changing_static_range; migrate_send; provision; destroy; export; clone; copy
                          current-operations (SRO): 
                          blocked-operations (MRW): 
                         allowed-VBD-devices (SRO): 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; 125; 126; 127; 128; 129; 130; 131; 132; 133; 134; 135; 136; 137; 138; 139; 140; 141; 142; 143; 144; 145; 146; 147; 148; 149; 150; 151; 152; 153; 154; 155; 156; 157; 158; 159; 160; 161; 162; 163; 164; 165; 166; 167; 168; 169; 170; 171; 172; 173; 174; 175; 176; 177; 178; 179; 180; 181; 182; 183; 184; 185; 186; 187; 188; 189; 190; 191; 192; 193; 194; 195; 196; 197; 198; 199; 200; 201; 202; 203; 204; 205; 206; 207; 208; 209; 210; 211; 212; 213; 214; 215; 216; 217; 218; 219; 220; 221; 222; 223; 224; 225; 226; 227; 228; 229; 230; 231; 232; 233; 234; 235; 236; 237; 238; 239; 240; 241; 242; 243; 244; 245; 246; 247; 248; 249; 250; 251; 252; 253; 254
                         allowed-VIF-devices (SRO): 1; 2; 3; 4; 5; 6
                              possible-hosts ( RO): 016d3cac-76dc-438f-89e3-5fe3bda1fc4b; 38e90b77-028c-4f5a-9b62-1b9e5c252ee8
                                 domain-type ( RW): hvm
                         current-domain-type ( RO): <not in database>
                             HVM-boot-policy ( RW): BIOS order
                             HVM-boot-params (MRW): order: cd; firmware: bios
                       HVM-shadow-multiplier ( RW): 1.000
                                   PV-kernel ( RW): 
                                  PV-ramdisk ( RW): 
                                     PV-args ( RW): 
                              PV-legacy-args ( RW): 
                               PV-bootloader ( RW): 
                          PV-bootloader-args ( RW): 
                         last-boot-CPU-flags ( RO): vendor: GenuineIntel; features: 
                            last-boot-record ( RO): ''
                                 resident-on ( RO): <not in database>
                                    affinity ( RW): <not in database>
                                other-config (MRW): base_template_name: Other install media; import_task: OpaqueRef:02ba17a5-f1c4-4bdd-826b-a980c3d89869; mac_seed: dea90f6d-ee36-57a5-60fd-bef7554ce70b; install-methods: cdrom
                                      dom-id ( RO): -1
                             recommendations ( RO): <restrictions><restriction field="memory-static-max" max="137438953472"/><restriction field="vcpus-max" max="32"/><restriction field="has-vendor-device" value="false"/><restriction field="supports-bios" value="yes"/><restriction field="supports-uefi" value="yes"/><restriction field="supports-secure-boot" value="yes"/><restriction max="255" property="number-of-vbds"/><restriction max="7" property="number-of-vifs"/></restrictions>
                               xenstore-data (MRW): vm-data/mmio-hole-size: 268435456; vm-data: 
                  ha-always-run ( RW) [DEPRECATED]: false
                         ha-restart-priority ( RW): 
                                       blobs ( RO): 
                                  start-time ( RO): <unknown time>
                                install-time ( RO): <unknown time>
                                VCPUs-number ( RO): <not in database>
                           VCPUs-utilisation (MRO): 
                                  os-version (MRO): name: Ubuntu 20.04.5 LTS; uname: 5.4.0-136-generic; distro: ubuntu; major: 20; minor: 04
                          PV-drivers-version (MRO): major: 6; minor: 6; micro: 80; build: 0
          PV-drivers-up-to-date ( RO) [DEPRECATED]: false
                                      memory (MRO): 
                                       disks (MRO): 
                                        VBDs (SRO): 7bf8749b-16a5-5b0a-3351-1271396ecd49
                                    networks (MRO): 0/ip: 172.18.20.218; 0/ipv4/0: 172.18.20.218; 0/ipv6/0: fe80::90f2:61ff:fe17:8221
                         PV-drivers-detected ( RO): false
                                       other (MRO): shutdown: ; platform-feature-xs_reset_watches: 1; platform-feature-multiprocessor-suspend: 1; has-vendor-device: 0; feature-vcpu-hotplug: 1; feature-suspend: 1; feature-reboot: 1; feature-poweroff: 1; feature-balloon: 1
                                        live ( RO): true
                  guest-metrics-last-updated ( RO): 20230111T00:44:17Z
                         can-use-hotplug-vbd ( RO): unspecified
                         can-use-hotplug-vif ( RO): unspecified
                    cooperative ( RO) [DEPRECATED]: true
                                        tags (SRW): 
                                   appliance ( RW): <not in database>
                           snapshot-schedule ( RW): <not in database>
                            is-vmss-snapshot ( RO): false
                                 start-delay ( RW): 0
                              shutdown-delay ( RW): 0
                                       order ( RW): 0
                                     version ( RO): 0
                               generation-id ( RO): 
                   hardware-platform-version ( RO): 0
                           has-vendor-device ( RW): false
                             requires-reboot ( RO): false
                             reference-label ( RO): other-install-media
                                bios-strings (MRO): bios-vendor: Xen; bios-version: ; system-manufacturer: Xen; system-product-name: HVM domU; system-version: ; system-serial-number: ; baseboard-manufacturer: ; baseboard-product-name: ; baseboard-version: ; baseboard-serial-number: ; baseboard-asset-tag: ; baseboard-location-in-chassis: ; enclosure-asset-tag: ; hp-rombios: ; oem-1: Xen; oem-2: MS_VM_CERT/SHA1/bdbeb6e0a816d43fa6d3fe8aaef04c2bad9d3e3d
      

      xe vbd-list | grep <templateUUID> -B1 -A2

      ubuntu-2004-server-test-golden-v2023.01

      xe vbd-list | grep 42d967db-44f9-8ba5-37b7-2a09da8b5b7e -B1 -A2

      uuid ( RO)             : 7bf8749b-16a5-5b0a-3351-1271396ecd49
                vm-uuid ( RO): 42d967db-44f9-8ba5-37b7-2a09da8b5b7e
          vm-name-label ( RO): ubuntu-2004-server-test-golden-v2023.01
               vdi-uuid ( RO): 5c9214b3-231f-4b5c-ab96-7c1bdbbb6117
      

      xe vbd-param-list uuid=<template-VBD-UUID>

      ubuntu-2004-server-test-golden-v2023.01

      xe vbd-param-list uuid=7bf8749b-16a5-5b0a-3351-1271396ecd49

      uuid ( RO)                        : 7bf8749b-16a5-5b0a-3351-1271396ecd49
                           vm-uuid ( RO): 42d967db-44f9-8ba5-37b7-2a09da8b5b7e
                     vm-name-label ( RO): ubuntu-2004-server-test-golden-v2023.01
                          vdi-uuid ( RO): 5c9214b3-231f-4b5c-ab96-7c1bdbbb6117
                    vdi-name-label ( RO): Packer-disk
                allowed-operations (SRO): attach
                current-operations (SRO): 
                             empty ( RO): false
                            device ( RO): xvda
                        userdevice ( RW): 0
                          bootable ( RW): false
                              mode ( RW): RW
                              type ( RW): Disk
                       unpluggable ( RW): false
                currently-attached ( RO): false
                        attachable ( RO): true
                      storage-lock ( RO): false
                       status-code ( RO): 0
                     status-detail ( RO): 
                qos_algorithm_type ( RW): 
              qos_algorithm_params (MRW): 
          qos_supported_algorithms (SRO): 
                      other-config (MRW): 
                       io_read_kbs ( RO): <unknown>
                      io_write_kbs ( RO): <unknown>
      

      xe vdi-param-list uuid=<template-VDI-UUID>

      ubuntu-2004-server-test-golden-v2023.01

      xe vdi-param-list uuid=5c9214b3-231f-4b5c-ab96-7c1bdbbb6117

      uuid ( RO)                    : 5c9214b3-231f-4b5c-ab96-7c1bdbbb6117
                    name-label ( RW): Packer-disk
              name-description ( RW): 
                 is-a-snapshot ( RO): false
                   snapshot-of ( RO): <not in database>
                     snapshots ( RO): 
                 snapshot-time ( RO): 19700101T00:00:00Z
            allowed-operations (SRO): generate_config; update; forget; destroy; snapshot; resize; copy; clone
            current-operations (SRO): 
                       sr-uuid ( RO): 4d3961af-db6d-480c-e8bf-086f2c8c9dfc
                 sr-name-label ( RO): m3i-nfs-vm-data-ssd
                     vbd-uuids (SRO): 7bf8749b-16a5-5b0a-3351-1271396ecd49
               crashdump-uuids (SRO): 
                  virtual-size ( RO): 10737418240
          physical-utilisation ( RO): 24064
                      location ( RO): 5c9214b3-231f-4b5c-ab96-7c1bdbbb6117
                          type ( RO): User
                      sharable ( RO): false
                     read-only ( RO): false
                  storage-lock ( RO): false
                       managed ( RO): true
           parent ( RO) [DEPRECATED]: <not in database>
                       missing ( RO): false
                  is-tools-iso ( RO): false
                  other-config (MRW): content_id: 10d4bc7b-9d36-ce3b-83a0-3c4baed0c8e1; temp: temp
                 xenstore-data (MRO): 
                     sm-config (MRO): 
                       on-boot ( RW): persist
                 allow-caching ( RW): false
               metadata-latest ( RO): false
              metadata-of-pool ( RO): <not in database>
                          tags (SRW): 
                   cbt-enabled ( RO): false
      

      Edit: added debug logs

      posted in Xen Orchestra
      B
      BMeach
    • XO Packer template disk issues

      To provide some background I was talking with @olivierlambert over on ddelnano's Discord about an issue I was having with the cloudinit options not showing up in XO on any templates I made with the XenServer packer.io builder made by ddelnano.

      xcp-ng / xen orchestra setup

      • XCP-NG Hosts
        • 3x Dell r630's
        • XCP-NG Version: XCP-ng 8.2.1
        • Build Number: release/yangtze/master/58
      • Xen Orchestra
        • Using this install script
        • commit f95a2
        • xo-server 5.107.4
        • xo-web 5.108.0
        • 4 vcpu's, 8G RAM, 2 VIFS (one to mgmt net, the other to the storage net), 25G disk

      What im trying to do

      Im trying to have packer run every month via a CI/CD pipeline to generate a golden vm template every month. My goal for the template is to have it "cloudinit ready" so I can use it in my Terraform configs to provision workload vm's. I also want Packer to use Ansible to install basic system monitoring utilities such as netdata and any other necessary packages for example the xe-guest-utilities.

      Where I am right now

      Right now I have got Packer working up to a degree, I can create the template completely fine. I have gotten Packer to run my ansible playbooks on the host and have also used the file provisioner and shell provisioner to test installing packages and moving files onto the template vm. Where I am stuck though is getting the cloudinit options to show up inside of XO. I have validated multiple times that my vm template has a disk attached to it and if I create a vm from the Packer generated template I get the options shown below

      Screenshot_20230110_041357.png

      As you can see the disk from the template is there for sure under the name "Packer-disk" but I still get prompted to insert a iso/dvd instead of prompting me for a ssh key or cloudinit config which by my understanding it should show those feilds if there is a disk in the template which there is but thats obviously not working. If I continue and create the vm with the options as shown below it boots into a fully installed ubuntu 20.04 os and is configured just like it should be with the ansible playbooks, shell provisioner, and file provisioner taking affect and working perfectly. The issue is there is no cloudinit disk which leaves the cloudinit config in the os "broken" due to there being nothing for cloudinit's nocloud or configdrive datasource to read.

      Screenshot_20230110_041927.png

      Troubleshooting

      The first thing that I did to troubleshoot is I downloaded the Ubuntu 20.04 cloudimg ova file and imported it into XO through the VM import utility in the web console. I then immediately turned it into a template and tried to create a vm from that and that showed all of the cloudinit options as expected.

      The template has a name label of "ubuntu-focal-20.04-cloudimg" and the template UUID is "d1d97fd9-4d01-39cb-f5b8-e34c3a97ccc8". I then wanted to compare the template parameters so I went and looked for my Packer generated template, it has a name label of "ubuntu-2004-server-golden-v2023.01" and a UUID of "422081e2-6b73-f642-fc82-6cba4313a9da". From there I then went out and got the following data that has been posted in the Debug Logs Section, a list of the template parameters, a list of vbd's attached to each template, a list of the vbd's parameters, and a list of the vdi parameters.

      Ive only been using the XCP-NG and XO platform for about 5-6 months so I am sorry if there is somewhat obvious diagnostic data missing, let me know and im happy to gather any information needed to resolve this issue. From my limited knowledge this seems like its somehow related to XO not seeing the attached disk on the template or the Packer plugin not setting some parameters that are required for XO to see the attached disk when converting to a template. If anyone has any suggestions or any ways to help me out it would be very appreciated.

      Debug Logs

      xe template-param-list uuid=<templateUUID>

      ubuntu-focal-20.04-cloudimg

      xe template-param-list uuid=d1d97fd9-4d01-39cb-f5b8-e34c3a97ccc8

      uuid ( RO)                                  : d1d97fd9-4d01-39cb-f5b8-e34c3a97ccc8
                                  name-label ( RW): ubuntu-focal-20.04-cloudimg
                            name-description ( RW): Ubuntu Linux (64-bit)
                                user-version ( RW): 1
                               is-a-template ( RW): true
                         is-default-template ( RW): false
                               is-a-snapshot ( RO): false
                                 snapshot-of ( RO): <not in database>
                                   snapshots ( RO): 
                               snapshot-time ( RO): 19700101T00:00:00Z
                               snapshot-info ( RO): 
                                      parent ( RO): <not in database>
                                    children ( RO): 
                           is-control-domain ( RO): false
                                 power-state ( RO): halted
                               memory-actual ( RO): <not in database>
                               memory-target ( RO): 0
                             memory-overhead ( RO): 12582912
                           memory-static-max ( RW): 1073741824
                          memory-dynamic-max ( RW): 1073741824
                          memory-dynamic-min ( RW): 1073741824
                           memory-static-min ( RW): 1073741824
                            suspend-VDI-uuid ( RW): <not in database>
                             suspend-SR-uuid ( RW): <not in database>
                                VCPUs-params (MRW): 
                                   VCPUs-max ( RW): 2
                            VCPUs-at-startup ( RW): 2
                      actions-after-shutdown ( RW): Destroy
                        actions-after-reboot ( RW): Restart
                         actions-after-crash ( RW): Restart
                               console-uuids (SRO): 
                                         hvm ( RO): false
                                    platform (MRW): timeoffset: 0; nx: true; acpi: 1; apic: true; pae: true; hpet: true; viridian: true
                          allowed-operations (SRO): changing_NVRAM; changing_dynamic_range; changing_shadow_memory; changing_static_range; migrate_send; provision; destroy; export; clone; copy
                          current-operations (SRO): 
                          blocked-operations (MRW): 
                         allowed-VBD-devices (SRO): 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; 125; 126; 127; 128; 129; 130; 131; 132; 133; 134; 135; 136; 137; 138; 139; 140; 141; 142; 143; 144; 145; 146; 147; 148; 149; 150; 151; 152; 153; 154; 155; 156; 157; 158; 159; 160; 161; 162; 163; 164; 165; 166; 167; 168; 169; 170; 171; 172; 173; 174; 175; 176; 177; 178; 179; 180; 181; 182; 183; 184; 185; 186; 187; 188; 189; 190; 191; 192; 193; 194; 195; 196; 197; 198; 199; 200; 201; 202; 203; 204; 205; 206; 207; 208; 209; 210; 211; 212; 213; 214; 215; 216; 217; 218; 219; 220; 221; 222; 223; 224; 225; 226; 227; 228; 229; 230; 231; 232; 233; 234; 235; 236; 237; 238; 239; 240; 241; 242; 243; 244; 245; 246; 247; 248; 249; 250; 251; 252; 253; 254
                         allowed-VIF-devices (SRO): 1; 2; 3; 4; 5; 6
                              possible-hosts ( RO): 016d3cac-76dc-438f-89e3-5fe3bda1fc4b; 38e90b77-028c-4f5a-9b62-1b9e5c252ee8
                                 domain-type ( RW): hvm
                         current-domain-type ( RO): <not in database>
                             HVM-boot-policy ( RW): BIOS order
                             HVM-boot-params (MRW): order: cdn
                       HVM-shadow-multiplier ( RW): 1.000
                                   PV-kernel ( RW): 
                                  PV-ramdisk ( RW): 
                                     PV-args ( RW): 
                              PV-legacy-args ( RW): 
                               PV-bootloader ( RW): 
                          PV-bootloader-args ( RW): 
                         last-boot-CPU-flags ( RO): 
                            last-boot-record ( RO): ''
                                 resident-on ( RO): <not in database>
                                    affinity ( RW): <not in database>
                                other-config (MRW): mac_seed: 7fa98bf1-ff15-c50a-0ea4-92d46cee2e3a; vgpu_pci: ; base_template_name: Other install media; install-methods: cdrom
                                      dom-id ( RO): -1
                             recommendations ( RO): <restrictions><restriction field="memory-static-max" max="137438953472" /><restriction field="vcpus-max" max="32" /><restriction property="number-of-vbds" max="255" /><restriction property="number-of-vifs" max="7" /><restriction field="has-vendor-device" value="false" /></restrictions>
                               xenstore-data (MRW): 
                  ha-always-run ( RW) [DEPRECATED]: false
                         ha-restart-priority ( RW): 
                                       blobs ( RO): 
                                  start-time ( RO): <unknown time>
                                install-time ( RO): <unknown time>
                                VCPUs-number ( RO): <not in database>
                           VCPUs-utilisation (MRO): 
                                  os-version (MRO): <not in database>
                          PV-drivers-version (MRO): <not in database>
          PV-drivers-up-to-date ( RO) [DEPRECATED]: <not in database>
                                      memory (MRO): <not in database>
                                       disks (MRO): <not in database>
                                        VBDs (SRO): 6d154703-7f69-d72d-cbab-b62be607b65b
                                    networks (MRO): <not in database>
                         PV-drivers-detected ( RO): <not in database>
                                       other (MRO): <not in database>
                                        live ( RO): <not in database>
                  guest-metrics-last-updated ( RO): <not in database>
                         can-use-hotplug-vbd ( RO): <not in database>
                         can-use-hotplug-vif ( RO): <not in database>
                    cooperative ( RO) [DEPRECATED]: true
                                        tags (SRW): 
                                   appliance ( RW): <not in database>
                           snapshot-schedule ( RW): <not in database>
                            is-vmss-snapshot ( RO): false
                                 start-delay ( RW): 0
                              shutdown-delay ( RW): 0
                                       order ( RW): 0
                                     version ( RO): 0
                               generation-id ( RO): 0:0
                   hardware-platform-version ( RO): 0
                           has-vendor-device ( RW): false
                             requires-reboot ( RO): false
                             reference-label ( RO): 
                                bios-strings (MRO): 
      

      ubuntu-2004-server-golden-v2023.01

      xe template-param-list uuid=422081e2-6b73-f642-fc82-6cba4313a9da

      uuid ( RO)                                  : 422081e2-6b73-f642-fc82-6cba4313a9da
                                  name-label ( RW): ubuntu-2004-server-golden-v2023.01
                            name-description ( RW): Version: v2023.01 | Built on: 2023-01-10 22:00 UTC | Built by: HashiCorp Packer 1.8.5
                                user-version ( RW): 1
                               is-a-template ( RW): true
                         is-default-template ( RW): false
                               is-a-snapshot ( RO): false
                                 snapshot-of ( RO): <not in database>
                                   snapshots ( RO): 
                               snapshot-time ( RO): 19700101T00:00:00Z
                               snapshot-info ( RO): 
                                      parent ( RO): <not in database>
                                    children ( RO): 
                           is-control-domain ( RO): false
                                 power-state ( RO): halted
                               memory-actual ( RO): <not in database>
                               memory-target ( RO): 0
                             memory-overhead ( RO): 37748736
                           memory-static-max ( RW): 4294967296
                          memory-dynamic-max ( RW): 4294967296
                          memory-dynamic-min ( RW): 4294967296
                           memory-static-min ( RW): 4294967296
                            suspend-VDI-uuid ( RW): <not in database>
                             suspend-SR-uuid ( RW): <not in database>
                                VCPUs-params (MRW): 
                                   VCPUs-max ( RW): 2
                            VCPUs-at-startup ( RW): 2
                      actions-after-shutdown ( RW): Destroy
                        actions-after-reboot ( RW): Restart
                         actions-after-crash ( RW): Restart
                               console-uuids (SRO): 
                                         hvm ( RO): false
                                    platform (MRW): timeoffset: 1; device-model: qemu-upstream-compat; viridian: false; nx: true; pae: true; apic: true; acpi: 1
                          allowed-operations (SRO): changing_NVRAM; changing_dynamic_range; changing_shadow_memory; changing_static_range; migrate_send; provision; destroy; export; clone; copy
                          current-operations (SRO): 
                          blocked-operations (MRW): 
                         allowed-VBD-devices (SRO): 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; 125; 126; 127; 128; 129; 130; 131; 132; 133; 134; 135; 136; 137; 138; 139; 140; 141; 142; 143; 144; 145; 146; 147; 148; 149; 150; 151; 152; 153; 154; 155; 156; 157; 158; 159; 160; 161; 162; 163; 164; 165; 166; 167; 168; 169; 170; 171; 172; 173; 174; 175; 176; 177; 178; 179; 180; 181; 182; 183; 184; 185; 186; 187; 188; 189; 190; 191; 192; 193; 194; 195; 196; 197; 198; 199; 200; 201; 202; 203; 204; 205; 206; 207; 208; 209; 210; 211; 212; 213; 214; 215; 216; 217; 218; 219; 220; 221; 222; 223; 224; 225; 226; 227; 228; 229; 230; 231; 232; 233; 234; 235; 236; 237; 238; 239; 240; 241; 242; 243; 244; 245; 246; 247; 248; 249; 250; 251; 252; 253; 254
                         allowed-VIF-devices (SRO): 1; 2; 3; 4; 5; 6
                              possible-hosts ( RO): 016d3cac-76dc-438f-89e3-5fe3bda1fc4b; 38e90b77-028c-4f5a-9b62-1b9e5c252ee8
                                 domain-type ( RW): hvm
                         current-domain-type ( RO): <not in database>
                             HVM-boot-policy ( RW): BIOS order
                             HVM-boot-params (MRW): order: cd; firmware: bios
                       HVM-shadow-multiplier ( RW): 1.000
                                   PV-kernel ( RW): 
                                  PV-ramdisk ( RW): 
                                     PV-args ( RW): 
                              PV-legacy-args ( RW): 
                               PV-bootloader ( RW): 
                          PV-bootloader-args ( RW): 
                         last-boot-CPU-flags ( RO): vendor: GenuineIntel; features: 
                            last-boot-record ( RO): ''
                                 resident-on ( RO): <not in database>
                                    affinity ( RW): <not in database>
                                other-config (MRW): base_template_name: Ubuntu Focal Fossa 20.04; import_task: OpaqueRef:1373f40a-13bb-4749-b314-546a6513ce1e; mac_seed: d16763c1-691e-ac82-01fe-056877eb0b75; disks: <provision><disk bootable="true" device="0" size="10737418240" sr="" type="system"/></provision>; install-methods: cdrom,nfs,http,ftp; linux_template: true                                dom-id ( RO): -1
                             recommendations ( RO): <restrictions><restriction field="memory-static-max" max="1649267441664"/><restriction field="vcpus-max" max="32"/><restriction field="has-vendor-device" value="false"/><restriction field="allow-gpu-passthrough" value="1"/><restriction field="allow-vgpu" value="1"/><restriction field="allow-network-sriov" value="1"/><restriction field="supports-bios" value="yes"/><restriction field="supports-uefi" value="no"/><restriction field="supports-secure-boot" value="no"/><restriction max="255" property="number-of-vbds"/><restriction max="7" property="number-of-vifs"/></restrictions>
                               xenstore-data (MRW): vm-data/mmio-hole-size: 268435456; vm-data: 
                  ha-always-run ( RW) [DEPRECATED]: false
                         ha-restart-priority ( RW): 
                                       blobs ( RO): 
                                  start-time ( RO): <unknown time>
                                install-time ( RO): <unknown time>
                                VCPUs-number ( RO): <not in database>
                           VCPUs-utilisation (MRO): 
                                  os-version (MRO): name: Ubuntu 20.04.5 LTS; uname: 5.4.0-136-generic; distro: ubuntu; major: 20; minor: 04
                          PV-drivers-version (MRO): major: 6; minor: 6; micro: 80; build: 0
          PV-drivers-up-to-date ( RO) [DEPRECATED]: false
                                      memory (MRO): 
                                       disks (MRO): 
                                        VBDs (SRO): 455a4d18-37d7-0083-3123-868ee0ec832f
                                    networks (MRO): 0/ip: 172.18.20.217; 0/ipv4/0: 172.18.20.217; 0/ipv6/0: fe80::8cc3:15ff:fe81:ce1b
                         PV-drivers-detected ( RO): false
                                       other (MRO): shutdown: ; platform-feature-xs_reset_watches: 1; platform-feature-multiprocessor-suspend: 1; has-vendor-device: 0; feature-vcpu-hotplug: 1; feature-suspend: 1; feature-reboot: 1; feature-poweroff: 1; feature-balloon: 1
                                        live ( RO): true
                  guest-metrics-last-updated ( RO): 20230110T22:11:48Z
                         can-use-hotplug-vbd ( RO): unspecified
                         can-use-hotplug-vif ( RO): unspecified
                    cooperative ( RO) [DEPRECATED]: true
                                        tags (SRW): 
                                   appliance ( RW): <not in database>
                           snapshot-schedule ( RW): <not in database>
                            is-vmss-snapshot ( RO): false
                                 start-delay ( RW): 0
                              shutdown-delay ( RW): 0
                                       order ( RW): 0
                                     version ( RO): 0
                               generation-id ( RO): 
                   hardware-platform-version ( RO): 0
                           has-vendor-device ( RW): false
                             requires-reboot ( RO): false
                             reference-label ( RO): ubuntu-20.04
                                bios-strings (MRO): bios-vendor: Xen; bios-version: ; system-manufacturer: Xen; system-product-name: HVM domU; system-version: ; system-serial-number: ; baseboard-manufacturer: ; baseboard-product-name: ; baseboard-version: ; baseboard-serial-number: ; baseboard-asset-tag: ; baseboard-location-in-chassis: ; enclosure-asset-tag: ; hp-rombios: ; oem-1: Xen; oem-2: MS_VM_CERT/SHA1/bdbeb6e0a816d43fa6d3fe8aaef04c2bad9d3e3d
      

      xe vbd-list | grep <templateUUID> -B1 -A2

      ubuntu-focal-20.04-cloudimg

      xe vbd-list | grep d1d97fd9-4d01-39cb-f5b8-e34c3a97ccc8 -B1 -A2

      uuid ( RO)             : 6d154703-7f69-d72d-cbab-b62be607b65b
                vm-uuid ( RO): d1d97fd9-4d01-39cb-f5b8-e34c3a97ccc8
          vm-name-label ( RO): ubuntu-focal-20.04-cloudimg
               vdi-uuid ( RO): db3b06bf-d292-4a00-b916-c496b9de8aa5
      

      ubuntu-2004-server-golden-v2023.01

      xe vbd-list | grep 422081e2-6b73-f642-fc82-6cba4313a9da -B1 -A2

      uuid ( RO)             : 455a4d18-37d7-0083-3123-868ee0ec832f
                vm-uuid ( RO): 422081e2-6b73-f642-fc82-6cba4313a9da
          vm-name-label ( RO): ubuntu-2004-server-golden-v2023.01
               vdi-uuid ( RO): 9c1403bb-fde9-415f-9ae1-9511b84a60bb
      

      xe vbd-param-list uuid=<template-VBD-UUID>

      ubuntu-focal-20.04-cloudimg

      xe vbd-param-list uuid=6d154703-7f69-d72d-cbab-b62be607b65b

      uuid ( RO)                        : 6d154703-7f69-d72d-cbab-b62be607b65b
                           vm-uuid ( RO): d1d97fd9-4d01-39cb-f5b8-e34c3a97ccc8
                     vm-name-label ( RO): ubuntu-focal-20.04-cloudimg
                          vdi-uuid ( RO): db3b06bf-d292-4a00-b916-c496b9de8aa5
                    vdi-name-label ( RO): Hard Disk 1
                allowed-operations (SRO): attach
                current-operations (SRO): 
                             empty ( RO): false
                            device ( RO): 
                        userdevice ( RW): 0
                          bootable ( RW): false
                              mode ( RW): RW
                              type ( RW): Disk
                       unpluggable ( RW): false
                currently-attached ( RO): false
                        attachable ( RO): true
                      storage-lock ( RO): false
                       status-code ( RO): 0
                     status-detail ( RO): 
                qos_algorithm_type ( RW): 
              qos_algorithm_params (MRW): 
          qos_supported_algorithms (SRO): 
                      other-config (MRW): 
                       io_read_kbs ( RO): <unknown>
                      io_write_kbs ( RO): <unknown>
      

      ubuntu-2004-server-golden-v2023.01

      xe vbd-param-list uuid=455a4d18-37d7-0083-3123-868ee0ec832f

      uuid ( RO)                        : 455a4d18-37d7-0083-3123-868ee0ec832f
                           vm-uuid ( RO): 422081e2-6b73-f642-fc82-6cba4313a9da
                     vm-name-label ( RO): ubuntu-2004-server-golden-v2023.01
                          vdi-uuid ( RO): 9c1403bb-fde9-415f-9ae1-9511b84a60bb
                    vdi-name-label ( RO): Packer-disk
                allowed-operations (SRO): attach
                current-operations (SRO): 
                             empty ( RO): false
                            device ( RO): xvda
                        userdevice ( RW): 0
                          bootable ( RW): false
                              mode ( RW): RW
                              type ( RW): Disk
                       unpluggable ( RW): false
                currently-attached ( RO): false
                        attachable ( RO): true
                      storage-lock ( RO): false
                       status-code ( RO): 0
                     status-detail ( RO): 
                qos_algorithm_type ( RW): 
              qos_algorithm_params (MRW): 
          qos_supported_algorithms (SRO): 
                      other-config (MRW): 
                       io_read_kbs ( RO): <unknown>
                      io_write_kbs ( RO): <unknown>
      

      xe vdi-param-list uuid=<template-VDI-UUID>

      ubuntu-focal-20.04-cloudimg

      xe vdi-param-list uuid=db3b06bf-d292-4a00-b916-c496b9de8aa5

      uuid ( RO)                    : db3b06bf-d292-4a00-b916-c496b9de8aa5
                    name-label ( RW): Hard Disk 1
              name-description ( RW): No description
                 is-a-snapshot ( RO): false
                   snapshot-of ( RO): <not in database>
                     snapshots ( RO): 
                 snapshot-time ( RO): 19700101T00:00:00Z
            allowed-operations (SRO): generate_config; update; forget; destroy; snapshot; resize; copy; clone
            current-operations (SRO): 
                       sr-uuid ( RO): 4d3961af-db6d-480c-e8bf-086f2c8c9dfc
                 sr-name-label ( RO): m3i-nfs-vm-data-ssd
                     vbd-uuids (SRO): 6d154703-7f69-d72d-cbab-b62be607b65b
               crashdump-uuids (SRO): 
                  virtual-size ( RO): 10737418240
          physical-utilisation ( RO): 24064
                      location ( RO): db3b06bf-d292-4a00-b916-c496b9de8aa5
                          type ( RO): User
                      sharable ( RO): false
                     read-only ( RO): false
                  storage-lock ( RO): false
                       managed ( RO): true
           parent ( RO) [DEPRECATED]: <not in database>
                       missing ( RO): false
                  is-tools-iso ( RO): false
                  other-config (MRW): content_id: 3429ce87-38f3-c3ac-ac9a-ed373355c24f
                 xenstore-data (MRO): 
                     sm-config (MRO): vhd-parent: e949503d-018c-4630-9dc8-56354fe93340
                       on-boot ( RW): persist
                 allow-caching ( RW): false
               metadata-latest ( RO): false
              metadata-of-pool ( RO): <not in database>
                          tags (SRW): 
                   cbt-enabled ( RO): false
      

      ubuntu-2004-server-golden-v2023.01

      xe vdi-param-list uuid=9c1403bb-fde9-415f-9ae1-9511b84a60bb

      uuid ( RO)                    : 9c1403bb-fde9-415f-9ae1-9511b84a60bb
                    name-label ( RW): Packer-disk
              name-description ( RW): 
                 is-a-snapshot ( RO): false
                   snapshot-of ( RO): <not in database>
                     snapshots ( RO): 
                 snapshot-time ( RO): 19700101T00:00:00Z
            allowed-operations (SRO): generate_config; update; forget; destroy; snapshot; resize; copy; clone
            current-operations (SRO): 
                       sr-uuid ( RO): 4d3961af-db6d-480c-e8bf-086f2c8c9dfc
                 sr-name-label ( RO): m3i-nfs-vm-data-ssd
                     vbd-uuids (SRO): 455a4d18-37d7-0083-3123-868ee0ec832f
               crashdump-uuids (SRO): 
                  virtual-size ( RO): 10737418240
          physical-utilisation ( RO): 24064
                      location ( RO): 9c1403bb-fde9-415f-9ae1-9511b84a60bb
                          type ( RO): User
                      sharable ( RO): false
                     read-only ( RO): false
                  storage-lock ( RO): false
                       managed ( RO): true
           parent ( RO) [DEPRECATED]: <not in database>
                       missing ( RO): false
                  is-tools-iso ( RO): false
                  other-config (MRW): content_id: 3958b983-1b38-ebb2-55d3-e76a137524ca; temp: temp
                 xenstore-data (MRO): 
                     sm-config (MRO): 
                       on-boot ( RW): persist
                 allow-caching ( RW): false
               metadata-latest ( RO): false
              metadata-of-pool ( RO): <not in database>
                          tags (SRW): 
                   cbt-enabled ( RO): false
      

      Edit: formatting

      posted in Xen Orchestra
      B
      BMeach
    • RE: XCP-NG / XO Packer Plugin

      @olivierlambert Thanks for reaching out so quickly, is the API at a state where it would be stable enough to start to develop a plugin around it? Or is it in the backlog due to the constantly changing API

      posted in Development
      B
      BMeach
    • XCP-NG / XO Packer Plugin

      Apologies if this is the wrong category but I am currently using the "XenServer packer.io builder" forked by ddelnano which according to the hashicorp docs says "This is a fork of the original, and recommended by the developers of XCP-NG". Just curious if there were any plans to have the vates team contribute or maintain the plugin? I'm very grateful for the work that ddelnano has put in, it just seems like over the past couple months there hasn't been much activity on the management side of the repo and would hate to see it go down the same path of the original repo. I also saw there was some talk about creating a completely new plugin using the XO API by @olivierlambert. I would be more than happy to contribute some time to the project. I just personally don't know the status of the XO API or the future of the existing plugin and didn't want to devote time to something that is going to be forgotten about. I would love to see this maybe even be a community effort like others have talked about in the past and like how the terraform plugin was made.

      Sorry for the wall of text but any advice would be greatly appreciated as I am currently migrating all of our hypervisors to xcp and would like to approach the new infrastructure from a IaC standpoint as much as possible.

      posted in Development
      B
      BMeach