View previous topic :: View next topic |
Author |
Message |
mooxxx1 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Jul 2023 Posts: 3
|
Posted: Wed Jul 19, 2023 3:32 am Post subject: [SOLVED]qemu/virt-manager failed to start virtual network |
|
|
Cant start virtual network
Code: | virsh net-start default
error: Failed to start network default
error: failed to enable IP forwarding: No such file or directory |
virt-manager output:
Code: | Could not start virtual network 'default': failed to enable IP forwarding: No such file or directory
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/device/netlist.py", line 208, in _check_network_is_running
netobj.start()
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
ret = fn(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/virt-manager/virtManager/object/network.py", line 69, in start
self._backend.create()
File "/usr/lib/python3.11/site-packages/libvirt.py", line 3547, in create
raise libvirtError('virNetworkCreate() failed')
libvirt.libvirtError: failed to enable IP forwarding: No such file or directory |
Code: | sysctl net.ipv4.ip_forward
sysctl: cannot stat /proc/sys/net/ipv4/ip_forward: No such file or directory |
Last edited by mooxxx1 on Wed Jul 19, 2023 1:34 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alamahant Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 23 Mar 2019 Posts: 3950
|
Posted: Wed Jul 19, 2023 9:23 am Post subject: |
|
|
Welcome to Gentoo!
Try
Code: |
echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/ip_forward.conf
sysctl -p /etc/sysctl.d/ip_forward.conf
|
Is your kernel configured for networking?
I am not sure if you need it for ip forwarding but for sure you need a full network stack with iptables and all for libvirt.
Have you installed libvirt?
You need libvirt for virt-manager.
Qemu is not enough. _________________
![Smile :)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mooxxx1 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Jul 2023 Posts: 3
|
Posted: Wed Jul 19, 2023 12:53 pm Post subject: |
|
|
alamahant wrote: | Welcome to Gentoo!
Try
Code: |
echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/ip_forward.conf
sysctl -p /etc/sysctl.d/ip_forward.conf
|
Is your kernel configured for networking?
I am not sure if you need it for ip forwarding but for sure you need a full network stack with iptables and all for libvirt.
Have you installed libvirt?
You need libvirt for virt-manager.
Qemu is not enough. |
Same error:
Code: | echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/ip_forward.conf
sysctl -p /etc/sysctl.d/ip_forward.conf
sysctl: cannot stat /proc/sys/net/ipv4/ip_forward: No such file or directory |
Quote: | Is your kernel configured for networking? | I am using minimal kernel config and my network is working fine except for this. When I ran Code: | virsh net-start default | the first time it showed that I am missing a kernel module so I checked the wiki and enabled some parameters, recompiled the kernel and now it shows only "failed to enable IP forwarding". I guess maybe there is some kernel parameters that I missed or some use flags.
Quote: | Have you installed libvirt? | Yes, with these use flags
Code: | app-emulation/libvirt-9.5.0:0/9.5.0::gentoo USE="libvirtd qemu udev virt-network -apparmor -audit -bash-completion -caps -dtrace -firewalld -fuse -glusterfs -iscsi -iscsi-direct -libssh -libssh2 -lvm -lxc -nfs -nls -numa (-openvz) -parted -pcap -policykit -rbd -sasl (-selinux) -test -verify-sig -virtualbox -wireshark-plugins -xen -zfs" |
and iptables
Code: | net-firewall/iptables-1.8.9:0/1.8.3::gentoo USE="(split-usr) -conntrack -netlink -nftables -pcap -static-libs" |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
grknight Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
Joined: 20 Feb 2015 Posts: 2005
|
Posted: Wed Jul 19, 2023 1:19 pm Post subject: |
|
|
Is CONFIG_PROC_SYSCTL disabled in the kernel? This option will be necessary for ip_forward to exist. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mooxxx1 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Jul 2023 Posts: 3
|
Posted: Wed Jul 19, 2023 1:33 pm Post subject: |
|
|
grknight wrote: | Is CONFIG_PROC_SYSCTL disabled in the kernel? This option will be necessary for ip_forward to exist. |
Yes it was disabled. I recompiled the kernel and now everything works. Thanks. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|