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

    Posts

    Recent Best Controversial
    • RE: cloud-init ssh key works but not user config

      Ok i figured it out. Seems like you need to have a valid or empty Network Config. When using the default commented out config it will not work. If i empty the Network Config field or uncomment all the lines it will work as expected.


      Following works

      User Config

      #cloud-config
      hostname: testmachine2
      ssh_authorized_keys:
        - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA...
      packages:
        - xe-guest-utilities
      

      Network Config

      network:
        version: 1
        config:
        - type: physical
          name: eth0
          subnets:
            - type: dhcp
      

      Following does not work

      User Config

      #cloud-config
      hostname: testmachine2
      ssh_authorized_keys:
        - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA...
      packages:
        - xe-guest-utilities
      

      Network Config

      #network:
      #  version: 1
      #  config:
      #  - type: physical
      #    name: eth0
      #    subnets:
      #      - type: dhcp
      
      posted in Xen Orchestra
      patrikwmP
      patrikwm
    • cloud-init ssh key works but not user config

      Hi!

      Im have problems with cloud-init Custom config. SSH Key works but not Custom Config.

      1. Download focal-server-cloudimg-amd64.ova from
        https://cloud-images.ubuntu.com/focal/current/
      2. Import it in Xen Orchestra (xo-server 5.79.5, xo-web 5.82.0)
      3. Convert the imported ova vm to template.
      4. Create VM from the template with Install Settings "SSH Key" and my ssh key.
      5. VM boots and i can ssh to the machine with user: ubuntu and my SSH key.
      6. mount /dev/xvdb /mnt/ and copy /mnt/user-data
      #cloud-config
      hostname: ubuntu-focal-20.04-cloudimg
      ssh_authorized_keys:
        - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABA....
      
      1. Create new VM from the template with Install Settings "User Config" and the config I copied from /mnt/user-data
      2. VM boots and i can NOT login with user: ubuntu and my SSH key.

      So what is missing from the User Config that is in the SSH Key cloud-init?

      Best regards,
      Patrik

      posted in Xen Orchestra
      patrikwmP
      patrikwm