Создание URI-адреса libvirt для перехода на другой хост

348
Jawler

У меня есть Qemu-Host с libvirtd, который правильно настроен (h0). Я могу получить доступ к этому хосту только через другую машину (c0), которая действует только как шлюз. Теперь мне нужно знать, возможно ли получить URI libvirt для подключения через ssh к c0 и оттуда через ssh к h0. Я использую virt-manager.

1

1 ответ на вопрос

0
Jakuje

Yes, it is possible. I have such setup,

Libvirt IRL: qemu+ssh://user@host/system 

And the setup password-less access to your host over your gateway, such as in ~/.ssh/config (might need more configuration for additional keys, but I recommend to have the keys store in your ssh-agent):

Host c0 Hostname real-gateway-hostname User gateway-username Host h0 HostName hostname User jjelen ProxyCommand ssh -W %h:%p c0 

First verify that you can connect using

ssh user@host 

and then "Add Connection" to your virt-manager, choose QEMU/KVM, remote host, method SSH, hostname and user as specified above. Then hit connect and you should be able to see your virtual machines.

Работал как шарм. Большое спасибо. Jawler 8 лет назад 0

Похожие вопросы