Host PC has internet connection but virt-man VMs don't.
Linux - Virtualization and CloudThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So are you saying that if you don't turn your networking off on your host that your virtual machines in virt-manager do start as expected?
They will start with my host internet on but they won't have internet access unless I run
Code:
sudo adduser $USER libvirt && sudo reboot
I have 'nmcli networking off' mapped to an alias that I run whenever I want to do a lot of things that don't require me being connected to the Internet.
To be honest and this is just me thinking out loud. You should only have to run that adduser command once unless it pertains to a different user each time.
But are you saying that you turn on your host internet, run those two commands to add a user to the libvirt group and reboot your host? This then allows you to start your virtual machines which obtain and maintain a persistent network connection?
To be honest and this is just me thinking out loud. You should only have to run that adduser command once unless it pertains to a different user each time.
But are you saying that you turn on your host internet, run those two commands to add a user to the libvirt group and reboot your host? This then allows you to start your virtual machines which obtain and maintain a persistent network connection?
It doesn't matter if my networking is enabled or not when I run those commands. After running them, rebooting, enabling my host networking/internet connection, then I can access Internet on the virt-man VM's for that session. If I shutdown or reboot as normal, the Internet is again gone for the virt-man VMs. It's a mystery.
I tried that command again. This time I had the virt-man program opened (no vm open). Maybe virt-man needs to be launched and then running that temporary fix command for it to work. 💡
Update: I can confirm this. I did the temp fix command again and forgot to open Virt Man first, the same thing happened.
Last edited by linustalman; 11-14-2021 at 09:03 AM.
I never have this issue with AQEMU or GNOME Boxes - only virt-man. I wonder if there's an old config folder in my hold directory that's causing the issue? Or perhaps something to do with my wireless USB dongle?
Last edited by linustalman; 12-09-2021 at 01:20 PM.
You need to install iptables for it to work without having to manually keep setting it each time, its a dependency, and from reading your posts, you haven't actually added this;
sudo apt-get install iptables
I had this issue myself with KVM and scratched my head for while
You need to install iptables for it to work without having to manually keep setting it each time, its a dependency, and from reading your posts, you haven't actually added this;
sudo apt-get install iptables
I had this issue myself with KVM and scratched my head for while
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.