This list is by no means comprehensive, but the listed commands are the required ones to make things happen!
Assume the following:
- Intel Xeon X3220 Quad Core Server
- 8 GB of ECC RAM
- 750GB Seagate RAID 1 array
- Dual Gigabit NICs
- DVDROM Optical
- Server 2008 setup names the server: WIN-35CVS22
Once the Server 2008 Core install has been completed one will be greeted with the Logon for admin. From there:
- Out of the box the Admin password is blank. Set a new password for the local admin account that meets password complexity requirements.
- Find the new server's name:
- hostname [Assume Enter after each line]
- Rename the server to our pending production name:
- netdom RenameComputer WIN-35CVS22 /NewName:TN-CoreVS01
- shutdown -r -t 05
- Configure our partitions:
- Select Disk 0
- Create Par Primary Size=13312
- Sel Par 2 (assuming partition 1 is the system drive)
- format fs=ntfs label="SwapFile"
- assign letter=S
- Create Par Primary (no size specified as the balance will be taken)
- Sel Par 3
- format fs=ntfs label="VirtualMachines" Quick (No Quick means a long wait)
- assign letter=G
- list vol (should see optical, C:, S:, and G:)
- exit [Enter]
- Move the Swap File over to the S: partition:
- wmic computersystem where name="TN-CoreVS01" set AutomaticManagedPagefile=False
- wmic pagefileset where name=”S:\\pagefile.sys” set InitialSize=8192,MaximumSize=12288
- If the pagefileset command gives you grief, reboot, then try the command again and it should work.
- netdom Join TN-CoreVS01 /Domain:MySBSDomain.Local
/PasswordD:* (asterisk will prompt for the password)
- If the command fails, check for typos.
- MkDir VMs (name whatever you like)
- net share VirtualMachines=G:\VMs /Grant:"MySBSDomain\Domain Admins",FULL /Remark:"My Virtual Machines"
- Net Share VirtualMachines (lists all settings relevant to the share)
- bcdedit /set hypervisorlaunchtype auto
- start /w OCSetup Microsoft-Hyper-V (Case Sensitive and a restart is required)
- On another system: Download the Hyper-V current release to a network share (assume M: via logon script)
- M: (location of the Hyper-V update bits)
- CD Microsoft\Hyper-V (relevant folder for you)
- Windows6.0-KB950050-x64-Hyper-V.msu (update will run and restart)
- On the domain DHCP server setup reservations for the planned IPs needed for the 2 NICs.
- ipconfig to get the currently assigned IP addresses in relationship to the NIC name.
- netsh interface ipv4 show interfaces (note Idx number)
- For the following, hit the F3 key (DOSKey for those who remember), then the up arrow key to scroll through previously used commands to make things easier than retyping everything. Just change the relevant IP setting.
- netsh advfirewall firewall set rule name="Remote Administration (RPC-EPMAP)" new enable=yes profile=domain
- netsh advfirewall firewall set rule name="Remote Administration (NP-In)" new enable=yes profile=domain
- netsh advfirewall firewall set rule name="Remote Administration (RPC)" new enable=yes profile=domain
- netsh advfirewall firewall set rule name="remote desktop (tcp-in)" new enable=Yes profile=domain
- This is the correct syntax for this one ... not the original in the post that came from the above KB article that has been struck out. Plus, a couple of extras were needed to make things complete.
- NOTE: Check the current assigned profile and change the above profile setting as appropriate: netsh advfirewall show currentprofile
- NetSH Reference Post.
- Netsh advfirewall firewall set rule group=“Windows Firewall Remote Management” new enable=yes
- cscript c:\Windows\System32\Scregedit.wsf /ar 0
- Test by mstsc /v:TS-CoreVS01 (from a remote workstation)
Now that we have a good grasp on what commands are required to complete a Hyper-V setup on Server Core, we can place all of the above commands into a series of batch files that can be ran at each step. Some quick modifications to tailor things such as names and not leaving our domain admin password in a plain text file would be a good thing.
Batching the above command sets would reduce the amount of time required to run post OS install setup steps significantly. It would also save us from having to retype that command or hitting the F3 key to bring it back to edit it yet again! ;)
With the Hyper-V Manager we are able to create, modify, update, and delete any virtual machines associated with any Hyper-V enabled Server 2008 instance on our domain. One can also use an MMC on Vista to connect to the Server Core machine and manage its settings to some degree.
The first task post Hyper-V Manager install on Vista SP1 is to change the default directories under Hyper-V Settings for the Virtual Hard Disks folder and Virtual Machines folder (configuration file folder) to:
- Virtual Hard Disks: G:\VMs\Virtual Hard Disks
- Virtual Machines: G:\VMs\Hyper-V
- start /w slmgr.vbs -ipk ABCDE-FGHIJ-KLMNO-PQRST-UVWXY
- start /w slmgr.vbs -ato
UPDATE: Missed the Windows Networking setup step.
UPDATE 2008-09-01: Added the initial step to discover the host name, added the update Server Core step, and some minor tweaks to the commands. Updated the firewall rules to reflect the proper syntax.
UPDATE 2008-10-30: Added the Exit command for the DiskPart command set, and a link to our previous post on moving the swapfile in Server Core.
UPDATE 2009-02-20: Added the Constrained Delegation step as well as the opening up of the Windows Advanced Firewall to remote management step.
Microsoft Small Business Specialists
*All Mac on SBS posts are posted on our in-house iMac via the Safari Web browser.