All HVM's have no internet access...SOLVED

Well guys I have big issue here. None of my Linux hvm’s have no internet access EXCEPT Win 10 PRO. My win10 pro hvm can get internet with no problem. When I look at the at each hvm network settings I see…
10.137.0.xx
255.255.255.255
10.138.10.121
10.139.1.1
10.139.1.2

My win10 PRO has the same network settings “different IP” of course and has internet…

All my Linux hvms have same network settings “different ip” of course but no internet…

When I go into my resolve.conf for my Linux hvms
Nameservers are
10.139.1.1 & 10.139.1.2

When I do my ifconfig cmds in terminal to set up IP in my Linux hvms it takes.

When I set my route/gateway cmd in terminal I get either…
-No route to host
-Bad gateway

Upon researching I find this this…

And this which is from qubes os 4.0.x

So it appears that either it is low on the
“to do list”
OR
they can’t figure out how to fix this.

So I go a step farther and check in dom0 if any of these hvm’s are connected…

sudo virsh console hvm-name

And all hvms are connected BUT they can’t get internet access…

Any of my Linux hvms, no internet…
Ubuntu
Android
Arch
OpenBSD
FreeBSD

I built them all from iso. They run great only,work just fine…
No internet!!

Does anyone have ideas or solutions???

It works for me if I manually set network settings:
IP = visible_ip from qvm-prefs myhvm
Gateway IP = visible_gateway from qvm-prefs myhvm
Network mask = 255.255.255.0
DNS = 10.139.1.1 10.139.1.2

I have never done this before, could you explain please…

I do this in dom0?

qvm prefs hvm name
qvm prefs ip =
qvm prefs Network mask=

Or do I qvm prefs hvm name then edit in terminal or nano??

O’ I see now…
Now I think I understand
Thanks

@tzwcfq your method isn’t working.
In fact your hole
qvm-prefs has the same network settings that I see in the hvm qubes setting for networking.

When I do
ifconfig xn0 10.137.0.xx broadcast 10.137.0.255 netmask 255.255.255.0 up
It takes that just fine.

When I do
route add default gw 10.138.10.121

I get
route: writing to routeing socket; Network is unreachable
add net default: gateway 10.138.10.121: Network is unreachable

This is becoming a SERIOUS pain in the ass.
Never had any issues with networking for hvm’s in 4.0.x

bug?

Seems like your gw is disposable VM so you need to change network mask to at least 255.252.0.0 (or you can just change it to 255.0.0.0) accordingly.

@tzwcfq ok, I will try and report back tonight.

@tzwcfq
All HVM’s are getting network and I am upddating as I type!!!
2 of them done!!

Thank you so much for your time and understanding…

To answer your question…it was 255.252.0.0

I spent weeks trying to figure this out and a lot of research

How do you change the network mask or gateway with qvm-prefs? I only see the ip property in the man page.

You need to set the network settings inside qube and not in dom0 qube preferences with qvm-prefs.

This does not work for me.

My settings are:
IP 10.137.0.xx
NM 255.255.255.255
GW 10.138.28.136
DNS 10.139.1.1, 10.139.1.2

No matter what I use for netmask, it doesn’t take. I also notice that the netmask value in Qubes Settings never changes. It’s always 255.255.255.255

Running Linux Mint

Try netmask 255.0.0.0, set in the HVM

Already did. Several times. The value does change within the HVM, but it is not reflected in the Qube Settings. I don’t know if that means anything or not.

EDIT: I have connection now. For some reason, setting it back the default value of 255.255.255.255 did the trick. We’ll see how long that lasts.

Sorry for necrobump but for me the steps didn’t work in the latest 4.2 release.
What I found working for me is to set the MAC address of the interface in HVM with the same as in other machines. It seems that all VMs, no matter the virtualization profile share the same MAC and if your newly installed HVM has a different MAC than setting up the ip will not work. I wrote a script that sets up my network as follows:

ip link set dev eth0 down
ip link set dev eth0 address xx:xx:xx:xx:xx:xx #to be taken from other VMs
ip link set dev eth0 up
#From here, the normal setup that you find on the docs
ip addr add 10.137.0.xxx/32 dev eth0
ip route add 10.xxx.xxx.xxx dev eth0 # gateway ip
ip route add default via 10.xxx.xxx.xx # gateway ip