XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. jkatz
    3. Posts
    J
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 10
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Cloudbase-init on Windows

      @Andrew7

      You don't. Pretty sure there is a dialog stating this is not reversable when setting a VM as a template.

      What I do is have a source vm and then take a snapshot of it while off. Then create a vm off that snap. Can do versioning this way. Boot the new vm (from the snap), install cloudbase, copy over the cloudbase-init.conf over, shutdown, convert to template.

      I also created my own ISO with the citrix tools, cloudbase installer, and cloudbase config to make it easier.

      Making the hostname update was probably the first thing that got working. Check my cloud-config at the top. That should work. Just be sure to add those last three lines to the cloudbase config too.

      And the only file i change is cloudbase-init.conf.

      posted in Advanced features
      J
      jkatz
    • RE: Cloudbase-init on Windows

      @dinhngtu

      Didn't bother with manual sysprep anymore. I just let the installer start it.

      posted in Advanced features
      J
      jkatz
    • RE: Cloudbase-init on Windows

      @dinhngtu

      I'm testing this out on my test environment. But it have to rebuild the template as we borked the site where the templates were at.

      MS introduced some bugs in some xapps in a recent patch cycle that breaks sysprep. I noticed this when i was creating a template in our vcenter environment. I'm currently using this ISO for my template build:

      SW_DVD9_Win_Server_STD_CORE_2022_2108.31_64Bit_English_DC_STD_MLF_X23-71666.ISO

      And then not applying any patches. That works for me in vcenter, but once I apply current patches, then it will not customize anymore. Not sure if it applies here in XO, but i thought i'd throw that out there too.

      posted in Advanced features
      J
      jkatz
    • RE: Cloudbase-init on Windows

      @Andrew7
      Sounds like I'm in the same boat as you in trying to find an alternative to vmware for a fairly large deployment. And the PoC / testing will probably take around 6-12 months before we commit to any new platform. So support during the one month trial period isn't quite enough.

      I would agree that the customization specifications in vcenter are easy to use and quite polished. But I do think cloudbase-init can get the minimal job done where the hostname and ip gets configured during deployment. Then i can rely on our automation tools to take it to the end. The only stopping point right now is exposing the new MAC address to the network config as a variable. But it sounds like that is hopefully being addressed.

      Originally, i would install cloudbase, and not do the sysprep there and not shutdown. Then i would modify the cloudbase-init.conf. then sysprep manually, then shutdown. I think (been a while, but i have it written down in a onenote) this worked except for the newer OSs like 11 and 2025. So now my process is to let the cloudbase installer do the sysprep but not shutdown. I think the cloudbase sysprep does something a little different than just running it manually. Then i modify the config, then shutdown. Convert to template.

      I think for 11 I also changed the administrator user to not 'user must change password'. That may or may not be needed.

      Also, if the recovery partition is put after the primary, you'll want to nuke it so that the disk can be resized during deployment.

      If you still can't get it working, i'll revisit my steps here to verify my process. Lemme know and I'll check.

      posted in Advanced features
      J
      jkatz
    • RE: Cloudbase-init on Windows

      @onthegrid Sure!

      So with the network config above. Gotta make your own MAC address and have it match the one in the interface field when cloning the template. (Variable would be nice here.)

      Cloud config in XO:
      55ba86a2-e4cb-4d8a-b3b3-904d1bb1fa38-image.png

      Installed cloudbase with defaults. Did not run sysprep. Did not reboot. I plan to handle those IDs later. And trying to sysprep Windows 11 didn't work/broke.

      Cloudbase-init.conf:
      6f8df03b-510f-48e5-9c0a-a42de0593eef-image.png

      If i recall correctly, it was just the last three lines I changed/added. Tested on Server 2022 and Windows 11. If we do go into produciton on this platform, I'll do the other config stuff later. I just wanted to make sure I could get the OS config'd with an IP, update the hostname, and reset the administrator password.

      posted in Advanced features
      J
      jkatz
    • Licensing XO Proxy

      I was looking at the pricing page and under XO Proxy it just says 'Optional'. (along with XOSTOR)

      It's a little confusing because under the Enterprise license it says 'Complete feature access'.

      Does this mean the backup proxies are licensed separately? And if so, how much per proxy install?

      Thanks!

      posted in Backup
      J
      jkatz
    • Cloning Windows 11 with vTPM

      I'm working with a Windows 11 VM and testing out templating/deployment stuff.

      I made a Win11 VM with vTPM enabled. Installed the citrix management agent. Installed cloudbase init with defaults and did not sysprep. Sysprep kept throwing errors.
      I shut it down, took a snap and make a new vm from that snap. Then turned that vm into a template. Same process that i did with 2022. And no problems there.
      Went to make a new VM in XO from this template and right at the end i get this error:

      VTPM_MAX_AMOUNT_REACHED

      To finally get it to work, I had to turn off the vTPM device option when cloning the VM. Even though the UI puts up a warning that the VM needs this device and the OS will probably not boot.
      Funny thing is... after the VM was done cloning, the vTPM device was indeed there and with a new UID. And the VM booted just fine.

      So is XO trying to stuff a second vTPM (max amount?) into the clone rather than remove the old one from the template first?

      Thanks,
      jonathan

      posted in Management
      J
      jkatz
    • Cloudbase-init on Windows

      I've been working on getting Windows deployments (2022 in particular) to customize with Cloudbase-init.

      So far I have it:

      • Updating the hostname
      • Updating the administrator account's password
      • Running a command
      • And configuring the NIC with a static IP when supplied with the MAC address.

      If I don't supply the MAC in the network config, then cloudbase-init throws a bunch of errors in the log looking for the address and does not set the static IP. It doesn't make sense as their doc states that the field is optional. But seems to be necessary to find the NIC.

      So to make it work, I need to specify a MAC address in XO when creating the VM. And then paste that into the network config yaml.

      So is there a template variable for MAC like there is for {name} and {index} ? And if not... can we get one?

      The working network config:
      network:
      version: 1
      config:
      - type: physical
      name: eth0
      mac_address: "56:a7:01:38:75:3f"
      subnets:
      - type: static
      address: 192.168.1.3/24
      gateway: 192.168.1.1
      dns_nameservers:
      - 192.168.1.2
      dns_search:
      - company.name

      Or am I just doing it wrong?

      Thanks!
      jonathan

      posted in Advanced features
      J
      jkatz
    • RE: REST auth in Postman

      @Danp Yup, that will do it. Thanks. No longer pulling out my hair. 🙂

      posted in REST API
      J
      jkatz
    • REST auth in Postman

      I'm trying to use Postman to test out these REST calls to XO and am having trouble setting up the authentication token cookie.

      This works in the command line:
      curl -b authenticationToken=IJqaWKJGHL9pHv64lRLa-5QH-xG-YC9wzctfv3rypm4 https://server.company.name/rest/v0/vms

      But in Postman I keep geeting 401 Unauthorized. So it seems I'm not setting up the token cookie correctly.
      829a62cc-a0cf-47ac-bf55-f4eefcc30d8a-image.png

      The format of the cookie text correct? And/or what should be used for the domain? Or do i put the ip of the xo server there? Path? I've tried a lot of variations, but still no luck.

      Thanks,
      jonathan

      posted in REST API
      J
      jkatz