LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Virt Manager KVM/QEMU Networking (https://www.linuxquestions.org/questions/fedora-35/virt-manager-kvm-qemu-networking-4175700172/)

mangdedi 09-04-2021 02:16 AM

Virt Manager KVM/QEMU Networking
 
hi, i am using fedora 34 and I am happy. I did install virtualization using Virt-Manager KVM/QEMU. I did install Win7 as guest OS. As defualt the network was use NAT, I can browse internet from the guest. I want to test cliet-server application between them. I can ping guest from the host but what is the host ip address?

Rickkkk 09-04-2021 04:26 PM

Quote:

Originally Posted by mangdedi (Post 6281459)
hi, i am using fedora 34 and I am happy. I did install virtualization using Virt-Manager KVM/QEMU. I did install Win7 as guest OS. As defualt the network was use NAT, I can browse internet from the guest. I want to test cliet-server application between them. I can ping guest from the host but what is the host ip address?

I'm not 100% sure I'm understanding your question, but I believe you may have to use bridged networking on your guest for it to be able to see its host as a different IP address. NAT basically lets the guest use the host's IP address over your LAN. Bridged will assign it a distinct IP address of its own on your LAN.

Hope this helps.

Cheers - Rick.

mangdedi 09-05-2021 04:44 AM

Quote:

Originally Posted by Rickkkk (Post 6281623)
I'm not 100% sure I'm understanding your question, but I believe you may have to use bridged networking on your guest for it to be able to see its host as a different IP address. NAT basically lets the guest use the host's IP address over your LAN. Bridged will assign it a distinct IP address of its own on your LAN.

Hope this helps.

Cheers - Rick.

Thank you for quick reply and sorry for the unclear question.
I did before using virtualbox in Windows using NAT and it work also with bridge. I did googling and looks like i have to follow your suggestion to setup bridge networking. I tried to search on google, it seems that there are many methods for this, I tried one of them by creating a script file but it didn't work, instead my network manager stopped and my fedora boot was slow. Can you show me a step by step tutorial how to setup bridge networking on fedora 34? Please advice

ps: bear with me, I am not a PRO linux user

regards
dedi bin mulyadin

Rickkkk 09-05-2021 08:52 AM

Quote:

Originally Posted by mangdedi (Post 6281773)
Thank you for quick reply and sorry for the unclear question.
I did before using virtualbox in Windows using NAT and it work also with bridge. I did googling and looks like i have to follow your suggestion to setup bridge networking. I tried to search on google, it seems that there are many methods for this, I tried one of them by creating a script file but it didn't work, instead my network manager stopped and my fedora boot was slow. Can you show me a step by step tutorial how to setup bridge networking on fedora 34? Please advice

ps: bear with me, I am not a PRO linux user

regards
dedi bin mulyadin

Hi mangdedi,

The configuration of NAT or bridged networking takes place in the hypervisor on the host, in your case, since you're using libvirt / KVM / QEMM, it would be in Virt Manager. I'm more of a Virtualbox user and only dabbled a bit with libvirt / KVM / QEMM a bit several years ago. If I recall correctly, though, it was fairly intuitive for someone who was used to virtualization in general as well as Virtualbox's management interface. There shouldn't be any need for creating scripts or the like, and, this is important, you're not actually modifying anything on your Fedora host itself - only in the configuration of your Windows 7 guest in Virt Manager.

So ... long story to say that I can't give you a step by step without either reinstalling libvirt etc. .. or researching it myself. I believe you should be able to go from here. That said, here is some general advice :

Look for the section in Virt Manager where you configure the Windows 7 guest's networking. The choice between NAT, bridged, and any other choices, should be fairly easy to understand. After you have configured it with bridged networking, start the guest and it essentially uses a virtual ethernet adapter to which your DHCP server will assign an IP address, distinct from that of the host. Your guest is essentially just using the host's network adapter as a "bridge" to your LAN and DHCP server, hence the name of the option.

I hope this helps - please let us know. If you really do require a step by step even after researching on your own, perhaps one of the other members here that still use libvirt / KVM / QEMM can assist.

berndbausch 09-05-2021 12:14 PM

Quote:

Originally Posted by mangdedi (Post 6281459)
I can ping guest from the host but what is the host ip address?

In a default setup, 192.168.122.1. Or more generally, same network as guest, but a 1 as the last octet.

mangdedi 09-15-2021 11:13 AM

Quote:

Originally Posted by Rickkkk (Post 6281808)
Hi mangdedi,

The configuration of NAT or bridged networking takes place in the hypervisor on the host, in your case, since you're using libvirt / KVM / QEMM, it would be in Virt Manager. I'm more of a Virtualbox user and only dabbled a bit with libvirt / KVM / QEMM a bit several years ago. If I recall correctly, though, it was fairly intuitive for someone who was used to virtualization in general as well as Virtualbox's management interface. There shouldn't be any need for creating scripts or the like, and, this is important, you're not actually modifying anything on your Fedora host itself - only in the configuration of your Windows 7 guest in Virt Manager.

So ... long story to say that I can't give you a step by step without either reinstalling libvirt etc. .. or researching it myself. I believe you should be able to go from here. That said, here is some general advice :

Look for the section in Virt Manager where you configure the Windows 7 guest's networking. The choice between NAT, bridged, and any other choices, should be fairly easy to understand. After you have configured it with bridged networking, start the guest and it essentially uses a virtual ethernet adapter to which your DHCP server will assign an IP address, distinct from that of the host. Your guest is essentially just using the host's network adapter as a "bridge" to your LAN and DHCP server, hence the name of the option.

I hope this helps - please let us know. If you really do require a step by step even after researching on your own, perhaps one of the other members here that still use libvirt / KVM / QEMM can assist.


I am sorry for late posting/reply...
I see there is a bridge option, I tried to put enp0s31f6 as the Device name as well as wlp58s0 but I can not even start the guest with this option. I tried virbr0 and the guest running but it seem more or like NAT seetings.

I wonder what to put in the Device name column

regards
mangdedi

mangdedi 09-15-2021 11:23 AM

Quote:

Originally Posted by berndbausch (Post 6281851)
In a default setup, 192.168.122.1. Or more generally, same network as guest, but a 1 as the last octet.

Thanks for replying

I ping 192.168.122.1 from guest and it works. I start XAMPP server in the host, but I can not browse https://192.168.122.1/dashboard from the guest.

Please advice

regards
mangdedi


All times are GMT -5. The time now is 04:11 PM.