[opensuse] How to network with a VM?
Hi, I'm running GNOME on openSUSE 13.2 with all updates. Using yast, I have set up a KVM hypervisor, and installed opensuse 13.2 in a VM. Using virt-manager I can run the VM and interact with its GUI. I can open a browser in the guest and surf the net. So far so good. Now I want to SSH into the VM, and I can't figure out how to do it. sshd is running in the guest, its firewall is disabled, and its IP-address is 10.0.2.15. Yet, trying to ssh to connect to that address doesn't work. What do I need to do to be able to contact a server process in the VM from the host? Regards, Olav -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, 22 Jun 2015 22:24, Olav Reinert wrote:
Hi,
I'm running GNOME on openSUSE 13.2 with all updates.
Using yast, I have set up a KVM hypervisor, and installed opensuse 13.2 in a VM. Using virt-manager I can run the VM and interact with its GUI. I can open a browser in the guest and surf the net. So far so good.
Now I want to SSH into the VM, and I can't figure out how to do it. sshd is running in the guest, its firewall is disabled, and its IP-address is 10.0.2.15. Yet, trying to ssh to connect to that address doesn't work.
What do I need to do to be able to contact a server process in the VM from the host?
Regards, Olav
First suspect is routing on host machine, check with "ip route", is there a routing entry for your VM, or is there only the standard routing from the host machine? Second suspect is the firewall on the host machine. does a ping from host to your VM work? (Best would be posting the output of the "ip route" command) - Yamaban -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, 2015-06-22 at 22:53 +0200, Yamaban wrote:
First suspect is routing on host machine, check with "ip route", is there a routing entry for your VM, or is there only the standard routing from the host machine?
# ip route default via 10.0.1.1 dev wlp2s0 proto static metric 1024 10.0.1.0/24 dev wlp2s0 proto kernel scope link src 10.0.1.22 Seems to be a missing route, as you suggested. Do you happen to know the command to add a route between host 10.0.1.22 and guest 10.0.2.15 ?
Second suspect is the firewall on the host machine. does a ping from host to your VM work?
Even with both the host and guest firewall disabled, I'm unable to ping in either direction. Olav -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, It's more complicated from a single command. See here: http://www.linux-kvm.org/page/Networking#public_bridge how must be done. Regards, I. Petrov On Mon, 22 Jun 2015, Olav Reinert wrote:
On Mon, 2015-06-22 at 22:53 +0200, Yamaban wrote:
First suspect is routing on host machine, check with "ip route", is there a routing entry for your VM, or is there only the standard routing from the host machine?
# ip route default via 10.0.1.1 dev wlp2s0 proto static metric 1024 10.0.1.0/24 dev wlp2s0 proto kernel scope link src 10.0.1.22
Seems to be a missing route, as you suggested. Do you happen to know the command to add a route between host 10.0.1.22 and guest 10.0.2.15 ?
Second suspect is the firewall on the host machine. does a ping from host to your VM work?
Even with both the host and guest firewall disabled, I'm unable to ping in either direction. Olav
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Signed by Topal iQIcBAEBAgAGBQJViIWAAAoJEH8sJoKRFRU56WYP/3lo0H5IgAt8f4wMIr3QFRlT hE4b0MJceJCEyANSI46WwgSybgFBEEXAc0OpTzsjmOEsWhaknco9o/yxXnSgGVTE VdJPB9mSI9dVl23rJWJ3v7nS2R0z/L3lzsrUTx0oIxHzC4JzdvfcBfeWmY4MhyNE irvkL4d5itGsrqJHFwt1Z49cjfSgMUJCSg//5HO1oeJJoWUGpUXKXGOTydZhLfEU bw/P1xx42+sTHihO1PrSRVpAf7s7QIpoIcLyz5uoPdOyOMFFsk4r2kTtUoR1SiXl DmGVNONC4Tt80oxX6egRnDRfjX5HquSVrlaKPdnosUcW5RA/cVERawNw8saeZnrm Nvo42up5UM5GgtAXbqZb5w67T2G6NQREUYxHa06CCRq6q9P8AZu0depM0LCebYqm 4AbjKDygXKLomvSKQkWO0ZMQPP5bqSR4KPbiiLqXVo52UxX/vRJV8VDyrIjG7w8V F4CoNYMKj2HhBVjZqEKRqRlZNkTa4vzaM8RqAutCbtJlYtu1Y2+ew9gi0SBTBfSE dtkMiTJg+jDFxg8XWJ121sI9DvsYMf+VuQlmnkRbv+ysVggoWkv6ycbSoVvcl2oa J9ShnCS0lL9zUnkiJO2psyg+FblyL4Rd6WxiXYIgCeO32/wLASVyf+iwAB3+xHAE Qe7uaOtuBu4CmS0f0Soj =7UxK -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, Jun 22, 2015 at 11:24 PM, Olav Reinert
Hi,
I'm running GNOME on openSUSE 13.2 with all updates.
Using yast, I have set up a KVM hypervisor, and installed opensuse 13.2 in a VM. Using virt-manager I can run the VM and interact with its GUI. I can open a browser in the guest and surf the net. So far so good.
Now I want to SSH into the VM, and I can't figure out how to do it. sshd is running in the guest, its firewall is disabled, and its IP-address is 10.0.2.15. Yet, trying to ssh to connect to that address doesn't work.
What do I need to do to be able to contact a server process in the VM from the host?
10.0.2.15 is default address when using user mode networking in QEMU. In this case guest network is completely emulated inside qemu process. You can tell qemu to forward ports from host into guest; see e.g. https://en.wikibooks.org/wiki/QEMU/Networking#User_mode_networking I do not use virt-manager, so I do not know how to configure it there. Advantage of user mode is that it does not require superuser rights on host to configure (no interfaces to set up etc). -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Andrei Borzenkov
-
I. Petrov
-
Olav Reinert
-
Yamaban