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

    Acessing console on a remote VM

    Scheduled Pinned Locked Moved Xen Orchestra
    8 Posts 3 Posters 539 Views 3 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.
    • M Offline
      McHenry
      last edited by

      I am unable to access a VM console on a remote network and after researching understand that this is not possible.

      I have just found this and am not confused:
      https://xen-orchestra.com/blog/xo-console-from-everywhere/

      Is it possible to access a remote VM console via NAT?

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

        You (your browser) can access the console from everywhere IF your XO is within the same network than the host. Even if you NAT access to XO, this will work. That's very different from what you are doing (XO outside the network). It doesn't work if XO has to access a host behind a NAT.

        In that case, you need a proxy. See this blog post for more details: https://xen-orchestra.com/blog/xo-proxy-a-concrete-guide/

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          McHenry @olivierlambert
          last edited by

          @olivierlambert

          Thanks again Oliver. Following this guide:
          https://xen-orchestra.com/blog/xo-proxy-a-concrete-guide/

          Totally lost on what password to use when registering the xo-cli.

          xo-cli --register http://localhost xoa
          

          I am using the CE so not sure if this feature is blocked.

          julien-fJ 1 Reply Last reply Reply Quote 0
          • julien-fJ Offline
            julien-f Vates 🪐 Co-Founder XO Team @McHenry
            last edited by

            @McHenry You need to register with the same credentials you use to sign in the web UI.

            M 1 Reply Last reply Reply Quote 0
            • M Offline
              McHenry @julien-f
              last edited by

              @julien-f

              Thanks Julien, I tried that without success:

              root@xoavm:~# xo-cli --register http://localhost admin@admin.net
              `--register` is deprecated and will be removed in the future, use `register` subcommand instead
              
              Password: ******************************
              
              āœ– AggregateError [ECONNREFUSED]:
                  at internalConnectMultiple (node:net:1118:18)
                  at afterConnectMultiple (node:net:1685:7) {
                [errors]: [
                  Error: connect ECONNREFUSED ::1:80
                      at createConnectionError (node:net:1648:14)
                      at afterConnectMultiple (node:net:1678:16) {
                    address: '::1',
                    code: 'ECONNREFUSED',
                    errno: -111,
                    port: 80,
                    syscall: 'connect'
                  },
                  Error: connect ECONNREFUSED 127.0.0.1:80
                      at createConnectionError (node:net:1648:14)
                      at afterConnectMultiple (node:net:1678:16) {
                    address: '127.0.0.1',
                    code: 'ECONNREFUSED',
                    errno: -111,
                    port: 80,
                    syscall: 'connect'
                  }
                ],
                code: 'ECONNREFUSED'
              }
              root@xoavm:~#
              

              Using https produced a different error:

              root@xoavm:~# xo-cli --register https://localhost admin@admin.net
              `--register` is deprecated and will be removed in the future, use `register` subcommand instead
              
              Password: ******************************
              āœ– Error: self-signed certificate
                  at TLSSocket.onConnectSecure (node:_tls_wrap:1685:34)
                  at TLSSocket.emit (node:events:519:28)
                  at TLSSocket._finishInit (node:_tls_wrap:1085:8)
                  at ssl.onhandshakedone (node:_tls_wrap:871:12) {
                code: 'DEPTH_ZERO_SELF_SIGNED_CERT'
              }
              root@xoavm:~#
              
              M 1 Reply Last reply Reply Quote 0
              • M Offline
                McHenry @McHenry
                last edited by

                @McHenry

                I think I have found how to resolve the SSL issue:
                https://xen-orchestra.com/docs/configuration.html#https-and-certificates

                M 1 Reply Last reply Reply Quote 0
                • M Offline
                  McHenry @McHenry
                  last edited by McHenry

                  @julien-f

                  Thank you. I needed to get the certificates sorted. Done and working.

                  1. xo-cli registered
                  2. proxy registered

                  When registering the proxy I had to specify the IP address. Does that mean the proxy IP needs to be static?

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

                    If you proxy (or reverse proxy) any stuff, yes, you need to have a fixed address for the proxy.

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post