XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Cloud INIT Network and Hostname.

    Scheduled Pinned Locked Moved Xen Orchestra
    13 Posts 3 Posters 8.0k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Torodiesel @olivierlambert
      last edited by

      @olivierlambert 368ac75e-1d3f-4f0b-a6ee-28cfd11dc49f-image.png
      This is what I see in the templates.

      1 Reply Last reply
      Reply Quote 0
      • olivierlambertO
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Please check that your XOA is fully up-to-date 🙂 Is it correctly registered with your email from xen-orchestra.com?

        T 1 Reply Last reply
        Reply Quote 0
        • T
          Torodiesel @olivierlambert
          last edited by

          @olivierlambert I have not registered it as of now i will register it if needed.

          1 Reply Last reply
          Reply Quote 0
          • olivierlambertO
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            So it's not up to date. You need to register to be able to get the latest version, we do not rebuild an XOA after each release!

            T 1 Reply Last reply
            Reply Quote 0
            • T
              Torodiesel @olivierlambert
              last edited by

              @olivierlambert Ah i see. It shows up. Much appreciated!

              1 Reply Last reply
              Reply Quote 1
              • T
                Torodiesel
                last edited by

                So I entered the data in the custom fields. The Vm seemed to not take them. Could the way I configure the custom fields be wrong for user data and networking?

                ddba7e72-7766-4586-8702-f38e5af2f319-image.png

                I add my ssh key but i dont provide in this screen shot. Also with the hostname set as {name}%, will it pull the name set in the template of XOA?

                fohdeeshaF 1 Reply Last reply
                Reply Quote 0
                • olivierlambertO
                  olivierlambert Vates 🪐 Co-Founder CEO
                  last edited by

                  Question for @fohdeesha

                  1 Reply Last reply
                  Reply Quote 0
                  • fohdeeshaF
                    fohdeesha Vates 🪐 Pro Support Team @Torodiesel
                    last edited by fohdeesha

                    @Torodiesel the networking config should go in the network config box when deploying the template, not in the same box as the cloud-config data. Also, I see a few things wrong, including your network config having non-existent fields (you have to define a nameserver type field, then list addresses under it). Here is a known-working config. Note that you don't need to create an xcp-ng user, the templates come configured with a sudo user with the name of the OS, so for our debian template, the default sudo user is debian, just provide a key like below and you can log in as him::

                    #cloud-config
                    hostname: {name}%
                    fqdn: {name}%.localdomain.local
                    ssh_authorized_keys:
                      - ssh-rsa XXXXXXXX
                    packages:
                      - tmux
                    
                      version: 1
                      config:
                        - type: physical
                          name: eth0
                          subnets:
                            - type: static
                              address: 192.168.1.169/24
                              gateway: 192.168.1.1
                        - type: nameserver
                          address:
                            - 8.8.8.8
                            - 1.1.1.1
                          search:
                            - home.lan
                    

                    And yes, filling a field with a value of {name}% will pass along the name of the VM, whatever you have named it

                    T 1 Reply Last reply
                    Reply Quote 0
                    • T
                      Torodiesel @fohdeesha
                      last edited by

                      @fohdeesha I see. The networking you see above is just set in studio code just to have it all in one photo. I am able to get the networking to work fine. the 0/24 is just a place holder and does get changed to a IP.

                      I tried adding a SSH key to access the VM after creation and I can't seem to log in with the default ubuntu user. It does accept my key but is asking for a password after I accept the fingerprint for the server. I don't have a password set for the key so I tried making a new user and that didn't seem to work either.

                      I must be messing something up and I'm not sure what it is.

                      fohdeeshaF 1 Reply Last reply
                      Reply Quote 0
                      • fohdeeshaF
                        fohdeesha Vates 🪐 Pro Support Team @Torodiesel
                        last edited by

                        @Torodiesel Are you using the ubuntu or debian hub template? the default user included with the debian template is debian, not ubuntu :)However if you're yusing the ubuntu template, it should indeed be ubuntu. I would start from scratch and copy/paste only my example config above without networking, replacing only the key line with your public key. If that still doesn't work, you can be sure the issue is somewhere on your side (probably the keypair is corrupted, or your ssh client isn't sending the correct privkey)

                        T 1 Reply Last reply
                        Reply Quote 1
                        • T
                          Torodiesel @fohdeesha
                          last edited by Torodiesel

                          @fohdeesha Yes i can confirm user error. I was uncommenting #network in the network side and it was causing issues with my whole config. I read this in another post on the forum. Thank you for your assistance. I really appreciate the time you provided.

                          1 Reply Last reply
                          Reply Quote 1

                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                          With your input, this post could be even better 💗

                          Register Login
                          • First post
                            Last post