LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 01-18-2016, 03:31 PM   #1
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 25;CentOS 7; Kubuntu; Debian
Posts: 860

Rep: Reputation: 37
Host Can't Guest Libvirt/KVM via SSH


I have setup a VM using virt-manager. I want to be able to access this VM from anywhere in the network and even, with the right router setup, from the outside. Rigt now the guest has the following setup:

Network Source: Host device enp3s0: macvtap
Source Mode: Bridge
Device model: virtio

I can SSH into that guest from other computers on the network, but I can't SSH from the host.

On the screen it says: "In most configurations, macvtap does not work for host to guest network communication."

OK, so that explains why I'm having an issue, but how can I fix it and still do what I want to do?

Host: Fedora 23
Guest: CentOS 7

edited to add: I googled this a bunch but a lot of how bridging worked or didn't work has changed in the last year and I can't make heads or tails of what I found online.
 
Old 01-19-2016, 11:13 AM   #2
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 25;CentOS 7; Kubuntu; Debian
Posts: 860

Original Poster
Rep: Reputation: 37
After consulting with someone it appears that there are potentially two ways to do this:

1) Leave it how it is and set up an isolated network that gives the Guest ANOTHER IP address and that's the one I use to access it with the Host. Not idea, but could be trivial if I setup the /etc/hosts file to give it an alias that's easy to remember

2) Setup a Routed Mode vibr# in libvirt and I shouldn't be using macvtap and I should be able to access the guest from the host. Disadvantage here is that it creates a new subnet with all the complications that come from that when it comes to the way most consumer hardware expects broadcasting to work for DLNA, printer sharing, etc.

In the end, it seems that #1 is probably the easiest method as it allows all machines but the host to easily access it and, in most cases, the host doesn't really need to access its guests. I most of the time I only want the host to talk to the guest so I can ssh to to more easily copy commands.

Anyway, I'd welcome any thoughts or suggestions relating to my two possible solutions.
 
Old 01-19-2016, 12:04 PM   #3
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
I use a bridge made on the host instead of the macvtap. (Device br0) The Arch wiki under qemu networking has a pretty straightforward tutorial that I used under Slackware and now Arch: should work for fedora too. See https://wiki.archlinux.org/index.php...What_is_VDE.3F
 
Old 01-19-2016, 01:10 PM   #4
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 25;CentOS 7; Kubuntu; Debian
Posts: 860

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by mostlyharmless View Post
I use a bridge made on the host instead of the macvtap. (Device br0) The Arch wiki under qemu networking has a pretty straightforward tutorial that I used under Slackware and now Arch: should work for fedora too. See https://wiki.archlinux.org/index.php...What_is_VDE.3F
In the past that broke Network Manager and other things on Fedora. I'll have to investigate if this is still the case.
 
Old 01-19-2016, 01:44 PM   #5
Doug G
Member
 
Registered: Jul 2013
Posts: 749

Rep: Reputation: Disabled
I also have a bridge on the host on a centos7 server hosting some kvm vm's. I disabled NetworkManager, used brctl to create a bridge br0, edited network scripts, and in virt-manager added the bridge to a vm. Worked fine.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Presenting logical volume from host to KVM guest. Partition within guest? batfastad Linux - Server 2 07-27-2015 03:53 PM
Problem with libvirt and iptables on a CentOS 6 KVM physical host philx66 Linux - Virtualization and Cloud 1 10-03-2012 05:18 AM
[SOLVED] KVM/libvirt - all traffic from eth0 to virtual guest ericson007 Linux - Virtualization and Cloud 3 04-02-2012 09:43 PM
libvirt/kvm: Enter passphrase during guest startup using virsh start <domain> druuna Linux - Virtualization and Cloud 0 09-29-2011 06:59 AM
KVM: run guest commands from host without SSH s7upify Linux - Virtualization and Cloud 1 08-16-2010 02:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 04:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration