What J'aimerais like to do is to définissez le guests' network configuration (IP address, subnet, gateway, broadcast address) depuis le host system. The used network setup is in `bridge` mode. How can I configure le network depuis le host plutôt than configuring le client itself to a static network configuration?
If I execute:
``` virsh edit vm1
```
there is a `` block as well et J'ai essayé to configure le network interface depuis there, mais unfortunately le guest VM ne seem to use it et as such is offline to le network (since it uses automatic network configuration only)... Guest VMs are both, Linux et Windows based. Any help would be highly appreciated.
If you ne want to do tout configuration inside le guest, alors le seulement option is a DHCP server that hands out static IP addresses. If you use `bridge` mode, that will probably be certains external DHCP server. Consult its manual to find out how to serve static leases.
But at least in forward modes `nat` ou `route`, you could use libvirt's built-in `dnsmasqd` (More recent versions of libvirtd support le dnsmasq's "dhcp-hostsfile" option). Here is how:
First, find out le MAC addresses of le VMs you want to assign static IP addresses:
- kill tout dnsmasq processes that are encore alive
- démarrez le libvirtd service
Note: Il y a no way le KVM host could force a VM avec unknown OS et unknown config to use a certain network configuration. But si know know that le VM uses a certain network config protocol - say DHCP - you can can use that. Ceci est what this post assumes.
*Some* OS (e.g. certains Linux distros) aussi allow to pass network config options into le guest e.g. via le kernel command line. But that is très spécifique to le OS, et i see no advantage over le DHCP method.