Assigning fixed IP to generated VDI desktops

Bill Shirley Bill at Henagar.PolymerIndustries.biz
Wed Nov 2 23:17:01 UTC 2016


You might try getting the Windows machine to release its lease on shutdown (outside the subnet):
# https://msdn.microsoft.com/en-us/library/cc227278.aspx release-lease-on-shutdown
option space Win2k;
option Win2k.release-lease-on-shutdown  code 2 = unsigned integer 32;   # use 0 to disable, 1 to enable

and then in the pool:
     vendor-option-space Win2k;
     option Win2k.release-lease-on-shutdown  1;      # enable

Bill


On 11/1/2016 6:25 AM, Miloslav Hůla wrote:
> Hi,
>
> we are running VMware platform with virtual desktops (VDI) with Windows 7/8.1/10. We are dealing with fixed address asignment 
> by ISC DHCP Server (4.3.1-6+deb8u2 Debian Jessie) to stations generated with random MAC addresses.
>
> The basic steps are following:
>
> 1) prepare a golden image (the source Windows machine)
> 2) generate the pool of windows desktops based on the golden
>
> Let's say, we are creating a pool of 50 office desktops. We are telling to VMware: "Create office-01 to office-50 from 
> golden". The process for every new station is:
>
> a) Take golden with known MAC1 and hostname 'golden'.
> b) Clone golden. The result is a windows machine with new random MAC2, but hostname is still 'golden'.
> c) Boot up new machine and run customization scripts. The result is the hostname is changed to 'office-01'.
> d) Reboot machine (and run some other scripts)
> e) Power off the machine. It's done.
>
> We are assigning IP addresses by making classes based on host-name option matching.
>
> The problem is, that in step b) we have machine with hostname 'golden' and MAC2. So, DHCP server creates a lease for it from 
> dynamic range. Then machine reboots and have hostname 'office-01' and still MAC2 in steps c) and d). Now we need to assign 
> fixed IP by hostname, but there is already lease for it and DHCP server offers this one.
>
> My question is, is there some kind of prefences we could do? I read in manual that priorities are host, class, pool, subnet, 
> shared-network.
>
> I read in manual about "host-identifier option option-name option-data" but it is for DHCPv6. Or it is not? Because I found 
> some posts in this list pointing to DHCPv4 too.
>
> And another questions, possibly not so related. We are running separated DHCP server for VDI. And we have a two next DHCP 
> servers in fail-over mode for the rest of the network. The whole network has about 130 subnets and 100 VLANs. We would like to 
> merge VDI DHCP server with the two others. The question is, the host-name matching must work only for VDI VLAN. If I 
> understand manual correctly, class declarations are global. Could it be done by subclasses?
>
> And the last question. How DHCP server handles requests from DHCP relay? In log we can see:
>
> - via eth0
> - via eth1
> - via 10.70.0.1
>
> I guess, that server fetches current eth0 or eth1 IP addresses and match the subnets according to. Is it the same for the 
> relay? Subnet is matched by the relay IP address?
>
>
> Thank you very much and sorry for such long post. We have done some "working" configuration but every body is affraid to make 
> some change, because no one of us really knows how it works :)
>
> Kind regards, Milo
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20161102/da2193ac/attachment.html>


More information about the dhcp-users mailing list