[libvirt-users] Automatically assign static ipv4 via dhcp to new VMs (Tim)
Laine Stump
justsendmailnothingelse at gmail.com
Mon Oct 7 11:14:02 UTC 2013
On 10/05/2013 08:22 PM, Chandana De Silva wrote:
> You can do this with the built in dhcp server for the virtual network.
> The definition is passed to dnsmasq.
>
> ...
> <ip address="192.168.122.1" netmask="255.255.255.0">
> <dhcp>
> <range start="192.168.122.100" end="192.168.122.254" />
> <host mac="00:16:3e:e2:ed" name="foo.example.com"
> ip="192.168.122.10" />
> </dhcp>
> </ip>
> ...
but if you do this via "virsh net-edit", you will have to stop and
restart the network, thus disconnecting all currently running guests
(you'll then have to either hot-unplug/plug all those guests' network
devices, or shutdown and restart all the guests). Instead, use "virsh
net-update" (see my other reply)
More information about the libvirt-users
mailing list