Tuesday, November 12, 2013

How to build a System Center Virtual Machine Manager 2012 R2 lab - part 2

While in the previous post I described the topology of this System Center Virtual Machine Manager 2012 R2 lab, in this post I will detail the steps required to deploy the one and only Active Directory Domain Controller.



Launch VMWare Workstation and fire the installation of the first virtual machine. When selecting the operating system, choose Windows Server 2012 (for evident reasons R2 hasn't been included in this list yet):

Keep the default network configuration to NAT so that Workstation will take care of setting up an internal DHCP. Since you are installing your lab on a single PC, you want to keep the OS memory footprint as low as possible. That’s why you will install this VM in Server Core mode (without a GUI). There are many articles on the Net explaining the advantages of Core over GUI. Here's some good references for you to read:
The initial virtual machine must be configured with 1 single processor and 2 GB of memory (you will reduce the amount of RAM at the end of the installation).
Boot on the Windows 2012 R2 iso image and once the installation has completed, log on the first time, change your password and there you’ll be facing a true old style windows:

Choose option 15 to exit to the command line and fire up Powershell.

Start the VMWare Tools installation for improved interaction and performance:


Restart the VM to make the VMWare drivers effective then start Powershell again.
Proceed with the configuration of the network adapter. For the moment it gets an IP from the internal DHCP. Take note of the IP address of the built-in VMWare default gateway and DNS server. It should be something like x.x.x.2. Then run this script to set a fixed IP address:
Get-NetAdapter -Name Ethernet0 | % {
   $_ | Set-NetIPInterface -Dhcp Disabled
   $_ | New-NetIPAddress 192.168.134.10 -PrefixLength 24 -DefaultGateway 192.168.134.2
}
Here's the output you will get from this command:
IPAddress         : 192.168.134.10
InterfaceIndex    : 12
InterfaceAlias    : Ethernet0
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 24
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Tentative
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore

IPAddress         : 192.168.134.10
InterfaceIndex    : 12
InterfaceAlias    : Ethernet0
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 24
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Invalid
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : PersistentStore
I really love the power of those *netadapter cmdlets that come with Powershell 4.0 and miss them each time I move to a server that has Powershell 3.0 or Powershell 2.0 or no Powershell at all (yes, I still have some...)!
Ok. The next step is renaming the server to an appropriate name:
Rename-Computer –NewName LAB2013DC01 –Restart
The server will restart. A quick check with Get-WMIObject will return the new name:
Get-WmiObject -Class win32_computersystem

Domain              : WORKGROUP
Manufacturer        : VMware, Inc.
Model               : VMware Virtual Platform
Name                : LAB2013DC01
PrimaryOwnerName    : Windows User
TotalPhysicalMemory : 2146942976
In the next post you are going to promote this VM to Domain Controller using Powershell and you will unleash all the power inside the ADDSDeployment module. Are you ready?

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...