You are not logged in.

#1 2020-05-24 11:31:45

tomsk
Member
Registered: 2016-12-17
Posts: 44

Guest cannot access host in KVM

Hello,

I have KVM with GPU passthrough for gaming on Linux.

This is my network setup in Virt-manager:
314PZw7.png

This is output from `ip addr` command on host (you can see that my local IP address is *.51):
imaO7KD.png

This is output from `ipconfig` and `ping` on guest (I tried to ping host, but it is unreachable as you can see, and guest has different local IP address *.178):
j10ulAJ.png

How can I make that guest will be able to see host in network?


I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint

Offline

#2 2020-05-24 11:52:48

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 374

Re: Guest cannot access host in KVM

https://wiki.libvirt.org/page/Troublesh … apHostFail

I found this by googling the information that is plainly visible on the virt-manager screeshot.

Which, btw, you probably want to get rid of.

Offline

#3 2020-05-24 11:53:14

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,537
Website

Re: Guest cannot access host in KVM

I run QEMU directly rather than via virt-manager but try de-selecting "Bridge mode", the default "user mode" networking should just work™ without any special configuration.

EDIT: and please post actual text (with code tags) rather than pictures of text.

Last edited by Head_on_a_Stick (2020-05-24 11:54:43)

Offline

#4 2020-05-24 13:21:04

tomsk
Member
Registered: 2016-12-17
Posts: 44

Re: Guest cannot access host in KVM

Thank you but I get error about firewall backend, does anybody what it means?

[tomsk@tomsk-PC ~]$ sudo virsh net-start isolated
[sudo] password for tomsk: 
error: Failed to start network isolated
error: internal error: Failed to initialize a valid firewall backend

[tomsk@tomsk-PC ~]$ sudo systemctl restart libvirtd
[tomsk@tomsk-PC ~]$ sudo virsh net-start isolated
error: Failed to start network isolated
error: internal error: Failed to initialize a valid firewall backend

[tomsk@tomsk-PC ~]$ sudo virsh net-list --all  
 Name       State      Autostart   Persistent
-----------------------------------------------
 default    inactive   no          yes
 isolated   inactive   yes         yes

[tomsk@tomsk-PC ~]$

I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint

Offline

#5 2020-05-24 15:37:34

tomsk
Member
Registered: 2016-12-17
Posts: 44

Re: Guest cannot access host in KVM

I found that it is because I didnt have packages ebtables, firewalld, dnsmasq.. I dont know why it is required, because I dont want these packages like firewalld, I like and use iptables.

but I get another error:

[tomsk@tomsk-PC ~]$ sudo virsh net-start isolated
error: Failed to start network isolated
error: internal error: Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin /usr/bin/dnsmasq --version) unexpected exit status 127: /usr/bin/dnsmasq: error while loading shared libraries: libnettle.so.8: cannot open shared object file: No such file or directory

I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint

Offline

#6 2020-05-25 11:07:18

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 5,537
Website

Re: Guest cannot access host in KVM

A soname error would suggest that you are performing partial upgrades.

Offline

#7 2020-05-26 10:24:00

tomsk
Member
Registered: 2016-12-17
Posts: 44

Re: Guest cannot access host in KVM

I tried to update by `sudo pacman -Syu`

but I get this:

error: failed to commit transaction (conflicting files)
nss: /usr/lib/p11-kit-trust.so exists in filesystem
lib32-nss: /usr/lib32/p11-kit-trust.so exists in filesystem
Errors occurred, no packages were upgraded.

I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint

Offline

#8 2020-05-26 10:34:10

progandy
Member
Registered: 2012-05-17
Posts: 3,822

Re: Guest cannot access host in KVM

I suggest you read the news items from April on https://www.archlinux.org/


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#9 2020-05-26 18:03:54

tomsk
Member
Registered: 2016-12-17
Posts: 44

Re: Guest cannot access host in KVM

Oh thank you it works now, but I have one more question, I asked and I didnt get reply.

I didnt have packages ebtables, firewalld, dnsmasq.. I dont know why it is required, because I dont want these packages like firewalld, I like and use iptables.


I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint

Offline

#10 2020-05-26 18:23:14

CoudUr
Member
Registered: 2013-04-06
Posts: 5

Re: Guest cannot access host in KVM

tomsk wrote:

Oh thank you it works now, but I have one more question, I asked and I didnt get reply.

I didnt have packages ebtables, firewalld, dnsmasq.. I dont know why it is required, because I dont want these packages like firewalld, I like and use iptables.

Hi,

It doesn't install firewalld but ebtables only .

From the command "pacman -Si libvirt" you can get this info :

Optional Deps:
ebtables: required for default NAT networking
dnsmasq: required for default NAT/DHCP for guests
ebtables: required for default NAT networking
...

Offline

#11 2020-05-26 18:56:04

tomsk
Member
Registered: 2016-12-17
Posts: 44

Re: Guest cannot access host in KVM

Ah ok, thanks so then firewalld is safe to remove, my goal is to make shareable filesystem with my Windows guest and Linux host using KVM, I ended with using FTP.

There are my listening services.

dnsmasq   39596 nobody    6u  IPv4 1171582      0t0  TCP 192.168.254.1:53 (LISTEN)
pure-ftpd 40826   root    4u  IPv4 1253839      0t0  TCP *:21 (LISTEN)
pure-ftpd 40826   root    5u  IPv6 1253840      0t0  TCP *:21 (LISTEN)

My Windows guest can see my Linux machine at address 192.168.254.1 (I can ping it), but it cannot connect to that FTP server running on Linux machine, it looks like there wasn't any FTP server running.


I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint

Offline

#12 2020-06-07 16:20:27

tomsk
Member
Registered: 2016-12-17
Posts: 44

Re: Guest cannot access host in KVM

bump


I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint

Offline

#13 2020-06-07 16:54:50

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,950

Re: Guest cannot access host in KVM

Don't do that.
CoC - Bumping


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#14 2020-06-07 17:49:23

tomsk
Member
Registered: 2016-12-17
Posts: 44

Re: Guest cannot access host in KVM

Oh I am very sorry, I didn't know that.


I use several linux distros like: Archlinux, Ubuntu, Fedora, Linux Mint

Offline

#15 2020-06-23 12:13:00

Abaddon
Member
From: Poland
Registered: 2004-05-03
Posts: 246

Re: Guest cannot access host in KVM

tomsk wrote:

Ah ok, thanks so then firewalld is safe to remove, my goal is to make shareable filesystem with my Windows guest and Linux host using KVM, I ended with using FTP.

There are my listening services.

dnsmasq   39596 nobody    6u  IPv4 1171582      0t0  TCP 192.168.254.1:53 (LISTEN)
pure-ftpd 40826   root    4u  IPv4 1253839      0t0  TCP *:21 (LISTEN)
pure-ftpd 40826   root    5u  IPv6 1253840      0t0  TCP *:21 (LISTEN)

My Windows guest can see my Linux machine at address 192.168.254.1 (I can ping it), but it cannot connect to that FTP server running on Linux machine, it looks like there wasn't any FTP server running.

It's much better to use:
9p: https://www.linux-kvm.org/page/9p_virtio
or
virtiofs: https://libvirt.org/kbase/virtiofs.html


Gnome - The weakest link!
Linux, *not* GNU/Linux!

Offline

Board footer

Powered by FluxBB