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

    kiu

    @kiu

    2
    Reputation
    8
    Profile views
    18
    Posts
    0
    Followers
    1
    Following
    Joined
    Last Online
    Age 26
    Website netwaze.fr
    Location Auxerre

    kiu Unfollow Follow

    Best posts made by kiu

    • RE: Xscontainer

      @stormi My bad. Ok I installed the nmap-ncat package under rockylinux and works perfectly now 🙂 Thank you 🙂

      posted in Advanced features
      kiuK
      kiu
    • RE: DevOps Megathread: what you need and how we can help!

      Hi, there,
      You would need an ansible XOA provider to be able to create virtual machines with a template like vmware does:

      - name: clone VM
           vmware_guest:
             hostname: "{{ vcenter_hostname }}"
             username: "{{ vcenter_username }}"
             password: "{{ vcenter_password }}"
             validate_certs: "{{ vcenter_validate_certs }}"
             datacenter: "{{ vcenter_datacenter }}"
             cluster: "{{ vcenter_cluster }}"
             name: SRV-NAMEVM
             folder: FOLDERTEST
             template: "{{ vm_template }}"
             networks:
               - name: LAN NETWORK
                 ip: "{{ new_ip }}"
                 netmask: "{{ netmask }}"
                 gateway: "{{ gateway }}"
                 domain: "{{ domain }}"
             wait_for_ip_address: True
             customization:
               hostname: "{{ hostname }}"
               domain: "{{ domain }}"
               dns_servers:
               - "{{ dns1 }}"
               - "{{ dns2 }}"
               dns_suffix:
               - "{{ domain }}"
             state: poweredon
      

      Same for recovering and deleting the VM from ansible :

      - name: INFO VM
            vmware_guest_info:
              hostname: "{{ vcenter_hostname }}"
              username: "{{ vcenter_username }}"
              password: "{{ vcenter_password }}"
              validate_certs: "{{ vcenter_validate_certs }}"
              datacenter: "{{ vcenter_datacenter }}"
              name: SRV-NAMEVM
            delegate_to: localhost
            register: vm_info
      
      - name: Shutdown VM...
            vmware_guest:
              hostname: "{{ vcenter_hostname }}"
              username: "{{ vcenter_username }}"
              password: "{{ vcenter_password }}"
              validate_certs: "{{ vcenter_validate_certs }}"
              datacenter: "{{ vcenter_datacenter }}"
              name: SRV-NAMEVM
              state: poweredoff
      
          - name: delete VM...
            vmware_guest:
              hostname: "{{ vcenter_hostname }}"
              username: "{{ vcenter_username }}"
              password: "{{ vcenter_password }}"
              validate_certs: "{{ vcenter_validate_certs }}"
              datacenter: "{{ vcenter_datacenter }}"
              name: SRV-NAMEVM
              state: absent
      
      posted in Infrastructure as Code
      kiuK
      kiu

    Latest posts made by kiu

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

      Hi, there,
      You would need an ansible XOA provider to be able to create virtual machines with a template like vmware does:

      - name: clone VM
           vmware_guest:
             hostname: "{{ vcenter_hostname }}"
             username: "{{ vcenter_username }}"
             password: "{{ vcenter_password }}"
             validate_certs: "{{ vcenter_validate_certs }}"
             datacenter: "{{ vcenter_datacenter }}"
             cluster: "{{ vcenter_cluster }}"
             name: SRV-NAMEVM
             folder: FOLDERTEST
             template: "{{ vm_template }}"
             networks:
               - name: LAN NETWORK
                 ip: "{{ new_ip }}"
                 netmask: "{{ netmask }}"
                 gateway: "{{ gateway }}"
                 domain: "{{ domain }}"
             wait_for_ip_address: True
             customization:
               hostname: "{{ hostname }}"
               domain: "{{ domain }}"
               dns_servers:
               - "{{ dns1 }}"
               - "{{ dns2 }}"
               dns_suffix:
               - "{{ domain }}"
             state: poweredon
      

      Same for recovering and deleting the VM from ansible :

      - name: INFO VM
            vmware_guest_info:
              hostname: "{{ vcenter_hostname }}"
              username: "{{ vcenter_username }}"
              password: "{{ vcenter_password }}"
              validate_certs: "{{ vcenter_validate_certs }}"
              datacenter: "{{ vcenter_datacenter }}"
              name: SRV-NAMEVM
            delegate_to: localhost
            register: vm_info
      
      - name: Shutdown VM...
            vmware_guest:
              hostname: "{{ vcenter_hostname }}"
              username: "{{ vcenter_username }}"
              password: "{{ vcenter_password }}"
              validate_certs: "{{ vcenter_validate_certs }}"
              datacenter: "{{ vcenter_datacenter }}"
              name: SRV-NAMEVM
              state: poweredoff
      
          - name: delete VM...
            vmware_guest:
              hostname: "{{ vcenter_hostname }}"
              username: "{{ vcenter_username }}"
              password: "{{ vcenter_password }}"
              validate_certs: "{{ vcenter_validate_certs }}"
              datacenter: "{{ vcenter_datacenter }}"
              name: SRV-NAMEVM
              state: absent
      
      posted in Infrastructure as Code
      kiuK
      kiu
    • RE: Xscontainer

      @stormi My bad. Ok I installed the nmap-ncat package under rockylinux and works perfectly now 🙂 Thank you 🙂

      posted in Advanced features
      kiuK
      kiu
    • RE: Xscontainer

      My server is up to date

      posted in Advanced features
      kiuK
      kiu
    • RE: Xscontainer

      @stormi

      Would you like to push a pool-specific public SSH key into the ~/.ssh/authorized_keys file of the specified VM and therefore authorize hosts in the pool to interact with the containers inside the VM?
      Answer y/n: 
      y
      Attempting to push the public xscontainer key to USER@IP.
      ID@IP's password: 
      Success.
      Attempting to refresh the state of the VM
      Failure diagnosis: Unable to find ncat inside the VM. Please install ncat. 
      Do you wish to retry?
      Answer y/n:
      
      posted in Advanced features
      kiuK
      kiu
    • RE: Xscontainer

      @stormi I still have the same problem, the key does not want to install and asks me if I want to try again.

      posted in Advanced features
      kiuK
      kiu
    • RE: Xscontainer

      @stormi Thanks, I just tried that and it still doesn't work 😞

      posted in Advanced features
      kiuK
      kiu
    • RE: Xscontainer

      @stormi I tried to do it but I don't think I succeeded. Could you send me a more specific doc of what you are doing?

      thanks 🙂

      posted in Advanced features
      kiuK
      kiu
    • RE: Xscontainer

      @stormi OK, thanks. I will try your solution on a small lab.

      posted in Advanced features
      kiuK
      kiu
    • RE: Xscontainer

      @olivierlambert yes 🙂

      Output to docker machine :

      [XXXX@docker ~]$ cat .ssh/authorized_keys 
      ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDkaRRvfWs0qPggPY2VW8/4n3DcjDbZPKM8w7FS418CCZn+8JvB1LNmR1vJXHr7F4k73bo/aIDQ3Lh09iWZOhYwA1nkeDwNyBexVDYiPCuA1DEbiaFuFvo+fMB5rkb9n5WucWuGCkGgwJCB/iEbQni3k0neJe6m3SzHPUJ7DYDu5agzaBjfe0eGn9NyMindLwA/0aNl5TbwYJoxvU1HSCuDXSlcPwg5xEAqs+Rx/0LBdGlu4LiAR/K/187vPRLL3mNFzlGS1peVirqAOOJjSAg0FkQFcqGW5QRNaaAuh9eYy31FCwWC+o4+qpiy/EM0yaBn9gMlBxYxxbaJW8nzJR6zZ1w7xp7fvpdPyxzFxSAYoKIgqrGGKalbTgj25yj5odrTuhvbrzv3Jlfys6RI6SGITeVWNTHT4UtODu5+EKlCQT5UG4jEAwg9Dib68zZjxmJeTBV+Kwk7hd1i2CPkAuWT6oA477qou+ezFMkvBvlphQzGfF4h2cvU81KDvmCoCl5uySGwaQytWXHocnAUusQTUXvz1poPljPXngP3TKuJuaq0QuKKddhZvm4gRe00MzQSifrqfog6bBnDyGk5nhDjEtfd8kuusmjEp+n5+0p4l2+yZxud2eia3CEIHxCusJcKRivqccPp5uOw0kOVyeTd0KOrFRhDFljckowacGF2wQ== root@xcp-ng-XXX
      [XXXX@docker ~]$ 
      

      Output to XCP machine :

      [07:53 xcp-ng-XXXX ~]# cat .ssh/known_hosts 
      192.XXX.XXX.XXX ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNJxGOt3RvDXvelRUPTYyIHmykXhfRWSEN6PXSKYUVxct8qjENHqqqAEJOrl6E5cF9orOGQfbAPjSlLwNqGUGlo=
      [07:55 xcp-ng-XXX ~]#
      
      posted in Advanced features
      kiuK
      kiu
    • RE: Xscontainer

      @olivierlambert @stormi up 🙂

      posted in Advanced features
      kiuK
      kiu