LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Host PC has internet connection but virt-man VMs don't. (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/host-pc-has-internet-connection-but-virt-man-vms-dont-4175700769/)

linustalman 09-17-2021 02:21 PM

Host PC has internet connection but virt-man VMs don't.
 
Hi.

It did work before.

Does anyone know a fix?

Thanks.

Note: I should have mentioned earlier that I upgraded from Debian 10 to 11 instead of doing a clean install. Perhaps that's a cause?

John VV 09-17-2021 07:27 PM

you need to create a new bridge

I am on opensuse ( KDE) and not on Debian so as to just how you go about it ?
i do not know .

linustalman 09-18-2021 04:03 AM

I also use AQEMU and have a FreeBSD VM. It can connect to the internet without issue.

linustalman 09-18-2021 04:04 AM

Quote:

Originally Posted by John VV (Post 6285029)
you need to create a new bridge

I am on opensuse ( KDE) and not on Debian so as to just how you go about it ?
i do not know .

Hi John. I never had to create a bridge [AFAIR] when I was on Debian 10.

linustalman 09-18-2021 07:31 AM

These steps did get internet working again in virt-man, before. I tried them again and it works again.

Code:

sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils libguestfs-tools genisoimage virtinst libosinfo-bin virt-manager
Code:

sudo adduser $USER libvirt
sudo adduser $USER libvirt-qemu
sudo reboot

I just hope something doesn't again stop the internet working in VM.

linustalman 09-19-2021 12:42 AM

Upon bootup this morn, the internet is again not working in virt-man. :-(

linustalman 09-19-2021 01:05 AM

Some lines from bootup (perhaps useful?):

Sep 18 12:44:52 mypcname NetworkManager[887]: <info> [1631965492.1979] device (lo): carrier: link connected
Sep 18 12:45:10 mypcname kernel: r8169 0000:03:00.0: firmware: failed to load rtl_nic/rtl8168f-1.fw (-2)
Sep 18 12:45:10 mypcname kernel: firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
Sep 18 12:45:10 mypcname kernel: r8169 0000:03:00.0: Direct firmware load for rtl_nic/rtl8168f-1.fw failed with error -2
Sep 18 12:45:10 mypcname kernel: r8169 0000:03:00.0: Unable to load firmware rtl_nic/rtl8168f-1.fw (-2)
Sep 18 12:45:10 mypcname kernel: RTL8211E Gigabit Ethernet r8169-300:00: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=r8XYZ-300:00, irq=IGNORE)
Sep 18 12:45:10 mypcname kernel: r8169 0000:03:00.0 enp3s0: Link is Down
Sep 18 12:45:10 mypcname kernel: bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.

linustalman 09-20-2021 01:13 AM

I again ran this but it's tiresome to have to reboot just to get back the internet in virt-man.

Code:

sudo adduser $USER libvirt && sudo reboot

linustalman 09-25-2021 04:49 AM

It's strange. When I run just the part:

Code:

sudo adduser $USER libvirt
it always says

Code:

The user LS is already a member of libvirt.
I don't get why rebooting is even needed. 🤔

What's missing?

Perhaps my upgrade from Debian 10 to 11 caused issues with some config files?

linustalman 09-28-2021 06:18 AM

I solved the virt-man issue by going to synaptic and completely removing all 'qemu' and 'virt-man' packages. Then did a reboot, then went through the virt-man setup from here: https://youtu.be/2SdSiJTGKLM

Update: The issue is back.

linustalman 10-04-2021 08:25 AM

1 Attachment(s)
I can't launch a VM when networking is disabled (right click option on Network Manager system tray icon). I get this message [see image attached]. Perhaps that gives a clue?

If I re-enable networking, then I can launch the VM but must do the reboot trick mentioned earlier to actually get the internet working in the VM.

On Debian 10, I never had to have networking enabled to launch a VM - there were many times when I just wanted to do some brief task in a VM that didn't require the internet.

eashleyfl 10-05-2021 08:44 AM

In virt-manager right click on the QEMU/KVM connection to the server, choose Details->Virtual Networks. There you can set up autostart and apply. Any running VM will see the change in the network without rebooting.

linustalman 10-05-2021 08:47 AM

Quote:

Originally Posted by eashleyfl (Post 6289277)
In virt-manager right click on the QEMU/KVM connection to the server, choose Details->Virtual Networks. There you can set up autostart and apply. Any running VM will see the change in the network without rebooting.

Hi eashleyfl. That was already checked.

mredc 10-08-2021 06:23 PM

I have never had the default network enabled since I started using qemu-kvm. I chose to set the network source on the nic setting in virt-manager (host device eno1 macvtap). Could this be how your was set up? If so, could it be possible that your network adapter changed at some point? Also, I see from one of your post that your logs say that you were having some network setup problem during boot and that you may be missing some firmware. It might help to install or re-install linux-firmware.

linustalman 10-09-2021 01:30 AM

Quote:

Originally Posted by mredc (Post 6290333)
I have never had the default network enabled since I started using qemu-kvm. I chose to set the network source on the nic setting in virt-manager (host device eno1 macvtap). Could this be how your was set up? If so, could it be possible that your network adapter changed at some point? Also, I see from one of your post that your logs say that you were having some network setup problem during boot and that you may be missing some firmware. It might help to install or re-install linux-firmware.

Hi mredc. I reinstalled all packages with a 'firmware-' search in Synaptic:

firmware-linux-free
firmware-realtek
intel-microcode
ipxe-qemu
ovmf

I'll let ye know how it fares. :)


All times are GMT -5. The time now is 05:45 AM.