m-bers / docker-virt-manager

Docker virt-manager
GNU General Public License v3.0
133 stars 29 forks source link

unable connect to remote server #8

Closed safffat closed 3 years ago

safffat commented 3 years ago

I want connect to a remote server that have multiple kvm up. but when it start it stuck on "connecting" without any error!

image

what should i do?

also i'm able to connect to that server with virt-manager but it's not available on docker-virt-manager.

docker-compose:

services: 
  virt-manager:
    image: mber5/virt-manager:latest
    restart: always
    ports:
      - 8185:80
      - 7681:7681

    environment:
      HOSTS: "['qemu+ssh://ghaderi@91.98.100.225/system']"

    volumes:
      - /home/ubuntu/.ssh/id_rsa:/root/.ssh/id_rsa:ro
m-bers commented 3 years ago

If you haven't copied your private key to the libvirt host, docker-virt-manager will ask for a password but the prompt only displays in the terminal the executable was launched from.

Did you try clicking on the terminal icon in the lower left hand corner and entering the password there?

safffat commented 3 years ago

thanks terminal password solved it.

could you update the virt-manager version too please?

safffat commented 3 years ago

i have another problem.

every time i close the virt-manager windows accidentally i should restart (stop & start) docker container and after that, the all setting include the hosts that i was added, disappear and the setting reset!

m-bers commented 3 years ago

All of the host settings (VMs, connections, etc) are held by libvirt, not virt-manager. If you need to ensure hosts are persistent, I'd recommend putting them all in the HOSTS environment variable (as in the docker-compose example) and copying your public key to each of them for ease of access without a password, then mount your private key into the container.