Network setup KVM guest to use eth0 as is. on CentOS
I have been setting up my KVM guests on my CentOS server and ive run into a problem with a Windows Server.
The problem cant be solved at the guest Windows side, but might be solved on the Host/kvm settings side. But ill need some help on those parts.
What I want:
Send a specific DHCP request, and get the reply to that
What I tried:
Bridge network with the settings correct in the guest -> not the desired result
Setted up eth0 on the host as desired -> get the correct DHCP reply, but at the host ofc
What I think will solve my problems with the DHCP request:
Get a DHCP request with eth0 on the host
Have the KVM Guest use that eth0 and be able to send all his requests over that port and get feedback over that port.
Some side information:
eth0 will only be used by that Guest. So it can claim eth0 if needed
ifcfg-eth0 (note that the commented out are needed for it to work like desired on host but then BRIDGE will be commented out)
Bridged networking is kind of all i have experience with with KVM, if someone could help me setting up in a way that i can get a DHCP setup on the HOST and just forward it all to the client that would be wonderfull :)
Tried IOMMU (PCI passthrough)? If you have eth0 all for your guest, you should try forwarding it via IOMMU. If the server is server hardware-wise you will probably have support for that in the chipset and CPU.
I have a Win2008 server in KVM and plain DHCP works well. I use bridging too.
Thanks for the reply,
Sadly due to older hardware trying to enable AMD-IO did not go too well :P Kernel panics and all that. But besides that, wouldnt my guest still need to make sure the dhcp request gets handled correctly then? Which is kind of the issue.
Oh. I re-read your post. Peculiar issue you have here. What is so special about this dhcp stuff anyway?
I have a win2008 set up on kvm and it works without a hitch, dhcp or not (i use bridged networking, eth0 has no config, br0 has the former eth0 config and all vms are bridged with eth0 under br0). I set them up with virt-manager (br0 is created manually).
BTW i dont use any kind of network manager program (absolutely no need for it on a desktop computer) and i use Debian Wheezy.
Aye, my DCHP is the issue here :S
What i need it for is IPTV. Under linux the Config of it is very very easy, just throw in a few lines in the ifcfg-* and then create a dhclient-* with the data i have in post 1.
Under Windows its a whole different cup of tea, to edit the dhcp request i have to edit dhcpcore.dll. Not a real issue, ive done it before. But with my only spare licence of Windows 7 Proffessional the dhcpcore.dll file is different then on all other versions of Windows 7. And this one can not be changed. -> Or at least, no one knows how.
So if only i can have my Linux Host control the DHCP request and then let my Windows Guest do the rest.
My guess is i have to set up a NAT of sorts, and then forward all data from eth0 to that virtual port on the guest. But i have no idea how to start setting up that. (dont want to mess up the rest of the server that runs perfectly & needs to be up)
Ok, ill need some more help here.
Ive solved this in a very dirty manner but it doenst work fully (which is kind of obvious).
I have the Linux host doing the dhcp requests, and the Windows guest using a fixed ip and the same mac as the Linux hosts gets from the dhcp.
This results in that a part of the requested network packages actually reaches the Windows guest. But at least it sort of works.
Now i want to make sure all packages reach the guest > how would i do that? Forward all, but dhcp, packages to the guest? can i do that with the same IP&MAC?
In the words of the infamous Jar Jar Binks: Any help here would be hot....
You have NM_CONTROLLED="yes" in your config
NetworkManager does not support bridging. NetworkManager must be disabled to use networking with the network scripts (located in the /etc/sysconfig/network-scripts/ directory).
Or as an alternative to turning off NetworkManager, add "NM_CONTROLLED=no" to the ifcfg-* scripts located in the /etc/sysconfig/network-scripts/ directory.
Please read up on setting up a Bridge.
Not to sound completely idiotic, but what part of the NM doesnt support Bridging for KVM. KVM does the actual bridge part, the host uses the br0 & br1 for its own connections.
All other connections on the br1 that i use work without issue, with NM enabled. Its just this situation that doenst work, but that has nothing to do with the Host but fully with the incapability of the Windows Guest to change its DHCP request.
|All times are GMT -5. The time now is 05:48 PM.|