Building SharePoint 2016 development environment – Part 3 – Building a base disk to use for differencing disk.


A few years ago I wrote “Build your SharePoint 2013 development machine on Windows Server 2012” series, I mainly work in the cloud now, but as the blogs was so popular, I thought I would create a new series for the newer version of SharePoint.

You can access other parts of this post below.

Building a base disk to use for differencing disk.

Why am I using differencing disks? To build my dev environment, I need a minimum of 2 servers. An Active Directory, and a SQL & SharePoint server. You could possibly use 3 servers and separate the SQL and SharePoint out, or you might expand out SharePoint and not just use the stand alone configuration. You might add other servers in the future (You will need a beefy machine for this.) By building a base disk it will save you time in the future, Windows, the basic set up of features, updates, programs will already be on the machine, and you just need to add the extra programs you require for the given server.

What needs to go on here?

You need to put on this machine everything that you would probably want on all your virtual machines. Your list might be different to mine.

  • Windows Server 2012 R2 Standard Edition 64 bit.
  • Firefox
  • Chrome – with any extensions
  • Fiddler

Creating your Virtual Machine.

  1. Open up Hyper-V Manager
  2. Under Actions, click on New and select Virtual Machine. Click Next.
  3. Name you Virtual Machine, and your choice if you wish to store the virtual machine in a different location. (Preferably on a SSD drive)
  4. On the Specify Generation page, select Generation 2.
  5. Assign some memory, at this stage 6GB (6144mb) will be enough for installing everything. Click Next.
  6. Configure the Network to point to the External connection and click Next.
  7. Name your Virtual Hard Disk. Change the location if you wish, and I recommend creating a 400GB hard disk. (If you have room). We will split the disk inside the virtual machine into 100GB and 300GB for C and D drive. Click Next.
  8. Install Options, you can select Install an Operating system from a Boot CD/DVD-ROM and in my case I have selected the Windows Server 2012 R2 with Update (x64) Image file.

Install Windows 2012 R2 Server Standard Edition.

Inside you Hyper V manager you should now see your Virtual Machine. In my case it’s called CFBase. By right clicking on the machine you can connect to it. A window will open. You can then click the Start Button.

  1. Configure the language. Click Next
  2. Then Click Install Now.
  3. Insert your product key. Click Next.
  4. Select Windows Server 2012 R2 Standard (Server with a GUI) and then click Next.
  5. Tick I accept the license terms. Click Next.
  6. Select the Custom: Install Windows only (advanced) option.
  7. In the Where do you want to install Windows. Click New Create a new space of 102400MB. This will create a 100GB space. Accept the message that says Windows might create additional partitions for system files. You should now see Drive 0 Partition 1: Recovery, Drive 0 Partition 2, Drive 0 Partition 3, Drive 0 Partition 4 and Drive 0 Unallocated Space. Select the last one and click New, then Apply. This will set up your drive space. Select Drive 0 Partition 4 (100GB) then click Next, and Windows 2012 R2 will start installing on the 100GB drive.
  8. Once it has finished installing itself, it will ask you for a password for the Administrator. I use Pa55w0rd. Click Finish.
  9. Now you can log in. To perform Ctrl + Alt + Del in a Hyper V Machine. Press Ctrl + Alt + End.

Configuring Windows 2012 R2

  1. Once you have logged back in again the Server Manager appears. On the left hand menu, click on Local Server. This will bring up all the properties for this machine.
  2. Disable the Windows Firewall, by clicking on the Windows Firewall Public: On link.
  3. Then click the Advanced Settings on the left of the screen.
  4. On the right panel of Windows Firewall with Advanced Security, click Properties.
  5. For each Tab Profile (Domain, Private, Public) switch the Firewall state to Off. Then Click OK.
  6. Back on the Server Manager screen click the On link for IE Enchanced Security Configuration. Then turn this off for Administrators and Users. Click OK.
  7. Go back to the Start menu. Type UAC, and select settings from the right hand side. Click on Change User Account Control Settings.
  8. On the User Account Control Settings, move the slider down to the bottom. This will prevent the screen keep prompting you when an administrative task needs to be made. Click OK.
  9. Back in the Server Manager properties window for the server. Enable Remote Desktop. Click the Disabled link. Then select Allow remote connections to this computer. Click OK.
  10. Back in the Server Manager properties window for the server, Click on Windows Update Not Configured link. This will open the Windows Update Dialog.
  11. Click Let me choose my settings. Then on Choose your Windows Update settings, I always have Download updates but let me choose whether to install them. And then I tick Recommended updates. Click OK.
  12. Your server will now check for updates. Install anything that is outstanding.
    Note: You might have to repeat the check for Windows Update process a couple of times.

Disable the Shutdown Event tracker

  1. Open the start menu and type gpedit.msc. Click on the program to open it.
  2. In Group Policy Editor, navigate to Computer Configuration\Administrative Templates\System, open the Display Shutdown Event Tracker policy, and set it to Disabled.

    Now when you shut down you shouldn’t see the Shutdown tracker appear.

Enabling the Desktop Experience

  1. Open up the Server Manager.
  2. On the right of the screen click Mange > Add Roles and Features
  3. Click Next.
  4. Ensure Role-based or Feature-based installation is selected. Click Next.
  5. On Select destination server click Next.
  6. On Select server roles click Next.
  7. On Select features. Expand User Interfaces and infrastructure (Installed) and tick Desktop Experience. Add the addition features that it requires. Click Next.
  8. Click Install.
  9. Restart the Server.

Getting the Sound to work within your Virtual Machine.

With Hyper V in Windows 10, there is an enhanced session.

By running in enhanced mode, hovering over the speaker Icon in the task bar, it will state that Audio Service isn’t running. Right click it, and select sounds. A dialog will then pop up and ask if you want the audio service to be enabled. Click Yes.

The speaker icon will no longer have a red cross over it. And you should be able to hear sound through your VM if you enter the machine by using enhanced mode, or via a remote desktop connection.

Formatting the second drive.

If you take a look in explorer, you will only see a C:\ drive which should have 149GB. However we created a 400GB disk, and spilt it into 150GB and 250GB. We need to format the second disk.

  1. In Server Manager, in the top right corner, select Tools > Computer Management.
  2. In the Computer Management window, in the left hand pane, under storage, select Disk Management
  3. First thing I will do, is change the CD-ROM drive from D: to E: just so I can have a C and D drive as hard disk.
    1. Right click CD-ROM 0 at the bottom of the screen. Select Change Drive Letter and Path.
    2. On the dialog, click the Change button.
    3. Assign the new drive letter as E. Click OK.
    4. Click Yes to the warning message.
  4. Now we will format the 250GB drive.
    1. At the bottom, on Disk 0 row, at the end you should see 250.00 GB RAW. Right click this and select Format
    2. Put a name is the Volume label if you wish. I’m going to delete mine, and then leave everything as it is. Click OK.
    3. Assuming you have clicked on the correct area, click OK to the Format dialog warning.
    4. After the formatting has completed, right click on the area again, and this time, select Change Drive Letter and Paths.
    5. On the dialog, click Add.
    6. Ensure that D is assigned. Then click OK.
    7. Your explorer window will now show a C, D and E drive.

Extra Stuff to install.

Now you can install any additional software that you want to be available on every virtual machine you build. Below is a list of items I’m installing, you might have more.

Setting up the menu

If you currently look at your menu you will notice that everything is everywhere. You can click and drag tiles and position them in more logical sections. By moving them between other sections you can create new sections.

By clicking on the bottom right of the menu screen there is a minus icon. By clicking this, you will zoom out. Then by right clicking a section you can then name it.

I organised my menu to look like below screen shot. You might prefer a different layout, or have other programs to add.

Sysprep the machine.

As I have already written a blog on Sysprepping a machine while keeping the Menu the same after sysprep follow the following blog. Windows 8 and Windows Server 2012 Start Screen is Reset when Sysprep

Once you have completed the above post of Sysprep while keeping the Start menu. Do not turn on your Virtual Machine again. If you do it will start the Sysprep process. At this point, go to where the base hard drive is for the Virtual Machine, and set it to Read Only.

Advertisements