{"id":1208,"date":"2009-02-08T19:31:46","date_gmt":"2009-02-08T18:31:46","guid":{"rendered":"http:\/\/www.itwriting.com\/blog\/1208-mixing-hyper-v-domain-controller-and-dhcp-server.html"},"modified":"2009-02-08T19:31:46","modified_gmt":"2009-02-08T18:31:46","slug":"mixing-hyper-v-domain-controller-and-dhcp-server","status":"publish","type":"post","link":"https:\/\/www.itwriting.com\/blog\/1208-mixing-hyper-v-domain-controller-and-dhcp-server.html","title":{"rendered":"Mixing Hyper-V, Domain Controller and DHCP server"},"content":{"rendered":"<p>My <a href=\"http:\/\/www.itwriting.com\/blog\/1206-hands-on-with-hyper-v-its-brilliant.html\" target=\"_blank\">one-box Windows server infrastructure<\/a> is working fine, but I ran into a little problem with DHCP. I\u2019d decided to have the host operating system run not only Hyper-V, but also domain services, including Active Directory, DNS and DHCP. I\u2019m not sure this is best practice. Sander Berkouwer has a useful <a href=\"http:\/\/blogs.dirteam.com\/blogs\/sanderberkouwer\/archive\/2008\/08\/13\/active-directory-in-hyper-v-environments-part-1.aspx\" target=\"_blank\">couple<\/a> of <a href=\"http:\/\/blogs.dirteam.com\/blogs\/sanderberkouwer\/archive\/2008\/08\/14\/active-directory-in-hyper-v-environments-part-2.aspx\" target=\"_blank\">posts<\/a> in which he explains first that making the host OS a domain controller is poor design:<\/p>\n<blockquote>\n<p>From an architectural point of view this is not a desired configuration. From this point of view you want to separate the virtualization and platforms from the services and applications. This way you&#8217;re not bound to a virtualization product, a platform, certain services or applications. Microsoft&#8217;s high horse from an architectural point of view is the <strong>One Server, One Server Role<\/strong> thought, in which one server role per server platform gets deployed. No need for a WINS server anymore? Simply shut it down&#8230;<\/p>\n<\/blockquote>\n<p>Next, he goes on to explain the pitfalls of having your DC in a VM:<\/p>\n<blockquote>\n<p>Virtualizing a Domain Controller reintroduces possibilities to mess up the Domain Controller in ways most of the Directory Services Most Valuable Professionals (MVPs) and other Active Directory enthusiasts have been fixing since the dawn of Active Directory.<\/p>\n<\/blockquote>\n<p> He talks about problems with time synchronization, backup and restore, saved state (don\u2019t do it), and possible replication errors. His preference after all that:<\/p>\n<blockquote>\n<p>In a Hyper-V environment I recommend placing one Domain Controller per domain outside of your virtualized platform and making this Domain Controller a Global Catalog. (especially in environments with Microsoft Exchange).<\/p>\n<\/blockquote>\n<p>Sounds good, except that for a tiny network there are a couple of other factors. First, to avoid running multiple servers all hungry for power. Second, to make best user of limited resources on a single box. That means either risking running a Primary Domain Controller (PDC) on a VM (perhaps with the strange scenario of having the host OS joined to the domain controlled by one of its VMs), or risking making the host OS the PDC. I\u2019ve opted for the latter for the moment, though it would be fairly easy to change course. I figure it could be good to have a VM as a backup domain controller for disaster recovery in the scenario where the host OS would not restore, but the VMs would \u2013 belt and braces within the confines of one server.<\/p>\n<p>One of the essential services on a network is DHCP, which assigns IP numbers to computers. There must be one and only one on the network (unless you use static addresses everywhere, which I hate). So I disabled the existing DCHP server, and added the DHCP server role to the new server.<\/p>\n<p>It was not happy. No IP addresses were served, and the error logged was 1041:<\/p>\n<blockquote>\n<p>The DHCP service is not servicing any DHCPv4 clients because none of the active network interfaces have statically configured IPv4 addresses, or there are no active interfaces.<\/p>\n<\/blockquote>\n<p>Now, this box has two real NICs (one for use by ISA), which means four virtual NICs after Hyper-V is installed. The only one that the DHCP server should see is the virtual NIC for the LAN, which is configured with a static address. So why the error?<\/p>\n<p>I\u2019m <a href=\"http:\/\/www.eggheadcafe.com\/software\/aspnet\/32161871\/hyperv-breaks-dhcp--104.aspx\" target=\"_blank\">not the first<\/a> to run into this problem. Various solutions are proposed, including fitting an additional NIC just for DHCP. However, <a href=\"http:\/\/social.technet.microsoft.com\/Forums\/en-US\/winserverhyperv\/thread\/8004c699-1a22-4f33-9fcd-7271bfcaf74e\/#page:2\" target=\"_blank\">this one<\/a> worked for me. <\/p>\n<blockquote>\n<p>I simply changed the mask on the desired interface from 255.255.255.0 to 255.255.0.0, saved it, then changed it back.&#160; Suddenly the interface appeared in the DHCP bindings.<\/p>\n<\/blockquote>\n<p>Strange I know. The configuration afterwards was the same as before, but the DHCP server now runs fine. Looks like a bug to me.<\/p>\n<div class=\"wlWriterEditableSmartContent\" id=\"scid:0767317B-992E-4b12-91E0-4F059A8CECA8:fd2d9cd1-6ff9-4c3d-b6a5-7413d71bd2f3\" style=\"padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px\">Technorati tags: <a href=\"http:\/\/technorati.com\/tags\/dhcp\" rel=\"tag\">dhcp<\/a>, <a href=\"http:\/\/technorati.com\/tags\/hyper-v\" rel=\"tag\">hyper-v<\/a>, <a href=\"http:\/\/technorati.com\/tags\/windows\" rel=\"tag\">windows<\/a>, <a href=\"http:\/\/technorati.com\/tags\/server+2008\" rel=\"tag\">server 2008<\/a>, <a href=\"http:\/\/technorati.com\/tags\/domain+controller\" rel=\"tag\">domain controller<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>My one-box Windows server infrastructure is working fine, but I ran into a little problem with DHCP. I\u2019d decided to have the host operating system run not only Hyper-V, but also domain services, including Active Directory, DNS and DHCP. I\u2019m not sure this is best practice. Sander Berkouwer has a useful couple of posts in &hellip; <a href=\"https:\/\/www.itwriting.com\/blog\/1208-mixing-hyper-v-domain-controller-and-dhcp-server.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Mixing Hyper-V, Domain Controller and DHCP server<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55,92,97],"tags":[],"class_list":["post-1208","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-virtualization","category-windows"],"_links":{"self":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/1208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/comments?post=1208"}],"version-history":[{"count":0,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/posts\/1208\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/media?parent=1208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/categories?post=1208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itwriting.com\/blog\/wp-json\/wp\/v2\/tags?post=1208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}