MDT

NIC 2014 – Deck and links from my ConfigMgr Community session

Coretech Blog » Kent Agerlund - Sun, 01/19/2014 - 06:01
Once again, to all who has ever contributed to the community – We salute you – keep on working and know that you are making a difference for 1000’s of IT pros “out there”. Download deck Just some of the community tools: Infrastructure and Client Management Johan Arwidmark ConfigMgr R2 Hydration Kit – http://www.deploymentresearch.com/Research/tabid/62/EntryId/113/The-Hydration-Kit-for-ConfigMgr-2012-R2-is-available-for-download.aspx Mikael […]
Categories: MDT

Ten years and counting

It’s hard to believe that I’ve been working for Microsoft for that long already – time flies.  During that time, I’ve had a few different jobs and titles: consultant, systems design engineer, software development engineer, program manager, product marketing manager.  I’ve visited customers all over the world (well, at least on five of the seven continents), given more presentations than I can possibly count (although I have quite the collection of lanyards and nametags, so that gives me a good idea), read an unimaginable amount of e-mail (and generated quite a bit myself), and written a variety of blog postings like this one.

But through that entire time, my focus has been consistent: helping enterprises deploy Windows.  Here’s to the next 10 years.

For those of you who haven’t yet deployed Windows 8.1, let’s talk :-)

Categories: MDT

Nice to Know – Software based KVM will let you use the tablet as a second screen

The Deployment Bunny - Sat, 01/18/2014 - 08:23

As a traveling consultant I spend hours and hours on hotel rooms (right now in Oslo, Norway) which means I really need to find smart ways to make day-by-day life easier. Since I’m spending “some” time wiring books, articles and other things I use a 1302 from GECHIC which is an USB powered extra screen, very light, very thin, very NICE:

But I also have a bunch of Laptops and I can use them as compute power using RDP, no problem, but what I really want is to be able to use them as an extra computer screen, with the computer power. That way I can run applications on each computer but I ‘will control them all using one laptop (The KVM Server). So on my main computer I have the lab environment, on my extra screen I have the word running and on the extra computer I can then run Outlook, Spotify and all those applications. I can do copy and paste of text between these machines, very slick, very nice.

In this case I work on my Laptop on the left side, have my 1302 screen in the middle and then I have my Surface Pro on the right side, the mouse can now be moved between all three screens

The application I use is called Synergy and you can download it from http://synergy-foss.org/


Categories: MDT

Checking Integration Services Versions with SCVMM

Virtual PC Guy's WebLog - Wed, 01/15/2014 - 13:55

I have done a number of posts about checking your integration services versions in the past (here and here for example).  But this have all been written using the in-box Hyper-V management tools.  Now that I have SCVMM up and running in my house, I thought I would give a quick run through of how to do this with SCVMM.

The fist thing to point out is that you can just see this directly in the SCVMM UI by choosing to display the VM Additions column:

You can also get this information through PowerShell by running:

Get-SCVirtualMachine | Select Name, VMAddition

(Note, in the screenshot above I am filtering the results to not include Hyper-V Replica recovery virtual machines).

Cheers,
Ben

Categories: MDT

SCVMM, Hyper-V Replica, UI and PowerShell

Virtual PC Guy's WebLog - Tue, 01/14/2014 - 13:45

Before I get started on this – I do want to be upfront about the context for this post.  In my house I am currently running Hyper-V Server 2012 R2 with Hyper-V Replica enabled.  I am then managing my environment with System Center Virtual Machine Manager 2012 R2.

I am not (yet) using Hyper-V Recovery Manager (http://www.windowsazure.com/en-us/services/recovery-manager/).

Now, if you are unfamiliar with the story here.  Hyper-V Recovery Manager is our official solution for managing Hyper-V Replica with System Center.  This means that I am not doing things “by the book” right now (why?  Because there are only so many hours in the day and this is actually all stuff that I do in my spare time!).

So what is the experience if you are using Hyper-V Replica with System Center Virtual Machine Manager 2012 R2 without Hyper-V Recovery Manager?  In short, not bad.

SCVMM has no support for configuring or orchestrating Hyper-V Replica directly.  I am currently using Hyper-V manager to do that.  It does, however, detect that Hyper-V Replica has been configured and allows me to view the replication health in the SCVMM UI.  There is one annoyance I have found with this configuration:

This is a screenshot of my SCVMM console.  As you can see it has all of my virtual machines and all of their replicas.  I do not have it displayed here – but I can also add a column that shows the replication health.  Unfortunately, there is no way for me to tell which virtual machines are the primary virtual machines and which are the replicas.  Annoying. 

For the most part I can figure this out intuitively (the primary virtual machine is the one that is running!) But if I have a virtual machine that is turned off (like my TS Gateway in the above screenshot) I have not figured out how to tell the primary from the replica using the SCVMM UI.

PowerShell is much better though.

Here it is very easy to tell the virtual machines apart.  Let’s say I wanted to get the primary TS Gateway virtual machine – I would use this command:

$VM = Get-SCVirtualMachine "TS Gateway” | ?{$_.IsPrimaryVM}

Similarly, to get the replica virtual machine I would run:

$VM = Get-SCVirtualMachine "TS Gateway” | ?{$_.IsRecoveryVM}

Nice and simple.

Hopefully I will find the time to setup Hyper-V Recovery Manager soon (after updating my VPN server, setting a new blog site, getting a new mail server up and running, getting the Windows Azure pack loaded…  This may take a while!)

Cheers,
Ben

Categories: MDT

Targeting Group Policy at Hyper-V VMs

Virtual PC Guy's WebLog - Mon, 01/13/2014 - 13:21

I make heavy use of group policy in my home environment.  It makes it very easy to push out defaults to all of my various computers and virtual machines.  However, there are times when I have a setting that I only want applied to virtual machines.  Luckily this is somewhat simple to do.  You need to open the Group Policy Management console and go to the WMI Filters section.

Here you will want to create as many filters as make sense for your environment (as you can see, I have filters that divide my systems into physical and virtual as well as desktop or server).

Once you have created a filter you will want to add the following WMI filter to target virtual machines:

SELECT * FROM Win32_ComputerSystem WHERE Model = "Virtual Machine"

Finally, associate this filter with the group policy that you want applied to virtual machines in your environment.

Some quick notes:

  • This will only target Hyper-V virtual machines.  If you are using a different virtualization platform you will need to find out what model string that platform returns.
  • To create a group policy that only targets physical computers, just change the ‘=’ to ‘!=’ in the WMI query

Cheers,
Ben

Categories: MDT

Virtual Machine Stop Action in a Cluster

Virtual PC Guy's WebLog - Fri, 01/10/2014 - 13:04

One of the interesting philosophical debates on the Hyper-V team is “What is the right thing to do when a user stops a clustered virtual machine?”.  Some of us believe that if the user asked to stop the virtual machine – then we should stop the virtual machine (which is what we do by default).  But others believe that if the virtual machine is clustered, it should be restarted automatically, in order to deliver the highest uptime (this is actually what we used to do in the first release of Hyper-V).

What most people do not realize is that this is actually something that you can configure.  To do this you need to:

  1. Open the Failover Cluster Manager
  2. Go to Roles and select the virtual machine in question
  3. Change to the Resources tab at the bottom of the screen
  4. Select the Virtual Machine resource, right click on it, and select Properties
  5. Change to the Settings tab of the properties dialog
  6. Configure the Virtual machine stop action
    1. If you want the virtual machine to stay off if a user turns it off, select Take resource offline until virtual machine restarts.
    2. If you want the virtual machine to restart automatically select Mark resource as failed.

Note, no matter what setting you choose – stopping a virtual machine through the failover cluster manager will stop the virtual machine.  This setting effects what happens when someone uses Hyper-V Manager or Hyper-V PowerShell to stop a virtual machine.

Cheers,
Ben

Categories: MDT

Configuring file associations in Windows 8.1

When you are using Windows 8.1 (or Windows 8, which behaves the same way), you may notice that some file types (mapped by file extension) are opened by modern apps while others may be opened by desktop apps.  If you are a tablet user, you may not want the desktop apps; if you are a laptop or desktop user without a touch screen, you may not want the modern apps.

Fortunately, you can configure these mappings fairly easily through the PC Settings application by navigating to “Search and Apps” then “Defaults”, then click the “Choose default apps by file type” link at the bottom of the page to get to the full list of file extensions:

In this particular example, the .PDF extension is mapped to the modern Reader app, but if you click on the Reader icon you can choose from available apps:

For a desktop or non-touch laptop, you might want to choose Adobe Reader instead.  And you might make similar changes for MP3 and MP4 files, changing them from the default of “Music” and “Video”:

to instead use Windows Media Player:

You get the point:  Go through each mapping and select desktop apps for non-touch machines, modern apps for tablets and other touch-enabled computers.  (You likely won’t be able to completely make the switch from modern to desktop apps, as there are more file types supported by the newer modern apps.  But you can get close.)

Obviously configuring all of those app mappings by hand isn’t something you want to do on thousands of machines.  With previous OS releases, you needed to poke in the necessary registry entries (or carefully install apps in the correct order) to get the mappings you wanted – it worked, but it wasn’t much fun.  Starting with Windows 8, there is an easier way to do this using DISM.EXE.  Configure the mappings by hand once, then export them:

The resulting XML file has one line for each association:

And you can import them the same way:

So imagine that you need to support both touch (tablet and laptop) and non-touch systems in your environment.  You can set up a step in a deployment task sequence that conditionally imports the appropriate file mappings:

The real key here is how to make those steps conditional.  That part is a little trickier.  Fortunately, MDT 2013 (and MDT 2012 Update 1) includes an executable, IsTouchEnabled.exe, that will help.  You can add it into the task sequence to set a variable that can then be used as a condition in a subsequent step.  The end result is something that looks like this:

The first step runs IsTouchEnabled.exe and is set to continue on error (because it reports a return code of 1 if touch is enabled):

(Make sure you click the “Continue on error” checkbox on the Options tab.)  The next step then sets an IsTouchEnabled task sequence variable only if the previous step sets a return code of 1:

Then the next two steps are configured with appropriate conditions:

As always, a few notes:

  • When DISM imports these file associations, it modified the default user profile.  So any users (e.g. the local Administrator account) that already existed before the DISM command was executed will continue to have the associations that were in the OS image.
  • Why does MDT include the IsTouchEnabled executable but doesn’t use it by default?  Well, it does actually use it, but only in UDI scenarios.  This is actually a .NET application that asks Windows if it supports digitizers (by calling the GetSystemMetrics API).
  • Why not have ZTIGather set a variable using the same executable?  Then I’d have to write a script :-)  That’s overkill in this particular case, but feel free to do it if you like neat-and-tidy.
  • What happens if an app you specified isn’t present?  Not sure, try it out yourself :-)

You can read more about these DISM command line options at http://technet.microsoft.com/en-us/library/hh824855.aspx.

Categories: MDT

Migrating from Windows XP to Windows 8.1 using MDT 2013

Most people using MDT at this point have made the migration to Windows 7 and are looking at MDT 2013 to help with getting to Windows 8.1.  But there are a number of stragglers who are looking to go directly from Windows XP to Windows 8.1 (and hopefully finishing that by April 2014 when Windows XP support expires).

The challenge with this scenario is that some of the tools released as part of the ADK for Windows 8.1 don’t support Windows XP.  That includes the User State Migration Tool (version 6.3) and BOOTSECT.EXE, one of the core deployment tools used to put a new boot sector onto an existing Windows XP device so that it can boot a modern OS.

Fortunately, there are workarounds for these two challenges.  In the case of USMT, you can use the previous version from the ADK for Windows 8 to capture the user state and the new version from the ADK for Windows 8.1 to restore it.  And for BOOTSECT.EXE, you can just use the older version from the ADK for Windows 8 as it still runs on Windows XP.

So the real question then is “how do you get MDT to use these older versions,” since it only supports the ADK for Windows 8.1 and the tools included in it.  That requires a little work.  Let’s review the steps.

  1. Replace ZTIUserState.wsf in your MDT 2013 deployment share “Scripts” folder with the one from the attached zip file.  (Don’t try to put this script in any other version of MDT, older or newer.  It’s only designed for MDT 2013.  Feel free to compare the file with the original version to see the changes that I made.)
  2. Install the ADK for Windows 8 on a Windows 7 or Windows 8 system.  You only need to select two components, Deployment Tools and User State Migration tool (which will make the download much faster):
  3. Copy the USMT files from the system with the ADK for Windows 8 to the deployment share:
    XCOPY "C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\User State Migration Tool\x86" "\\SERVER\DeploymentShare$\Tools\x86\USMTX"
    XCOPY "C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\User State Migration Tool\amd64" "\\SERVER\DeploymentShare$\Tools\x64\USMTX"
  4. Make a backup copy of the existing BOOTSECT.EXE executables from the ADK for Windows 8.1 installation folders (C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\<platform>\BCDBOOT\bootsect.exe).
  5. Copy the BOOTSECT.EXE executables from the ADK for Windows 8 to the computer running MDT 2013, replacing the version from the ADK for Windows 8.1:
    COPY "C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment Tools\x86\BCDBoot\bootsect.exe" "\\Server\C$\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\x86\BCDBoot\bootsect.exe"
    COPY "C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment Tools\amd64\BCDBoot\bootsect.exe" "\\Server\C$\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\BCDBoot\bootsect.exe"
  6. Update the deployment share (which will copy the “older” BOOTSECT.EXE from the ADK folders to the deployment share when it detects that the date/time is different on the file).

A few comments on this setup:

  • You might ask why the USMT files are being copied into the USMTX folder.  Well, there are two parts to that:
  • MDT 2013 puts USMT 6.3 into the USMT 5 folder.  This is a carry-over from MDT 2012 Update 1.  While MDT was updated to pull the new USMT 6.3 from the ADK, it didn’t change where it put it.  Hence, it reused the USMT5 folder for USMT 6.3.
  • The ZTIUserState.wsf script uses the last character of the folder name (e.g. “5” from a folder named “USMT5” or “X” from a folder named “USMTX”) in various places.  Painfully obvious after I initially tried to use “USMT5.0” as the old version and things didn’t work right.  (I’d like to blame someone else for that logic, but it’s quite possible that I wrote it that way…)
  • You might also ask why you can’t just copy the BOOTSECT.EXE executable into the deployment share directly.  This is because MDT is smart enough to recopy the file from the ADK folder any time it changes in size or timestamp.  So if you don’t replace the version in the ADK folder, you’ll find the file gets overwritten with the newer one and breaks things again.
  • I’ve only tried this with Lite Touch deployments.  The ZTIUserState.wsf script is also used with MDT-created UDI task sequences in ConfigMgr 2012 R2, performing an offline USMT capture.  In that scenario, the script uses whatever USMT package was configured in the task sequence; it doesn’t select one dynamically based on the original OS.  So you would likely need to do some different work to get this to work.  See the ConfigMgr blog at http://blogs.technet.com/b/configmgrteam/archive/2013/09/12/how-to-migrate-user-data-from-win-xp-to-win-8-1-with-system-center-2012-r2-configmgr.aspx for more information on the general approach needed there.  (You would have to consciously replace the ZTIUserState.wsf script in the MDT toolkit files package anyway to get it to use this new script.  The steps above will only affect the Lite Touch deployments from the deployment share that you update.)
  • The attached ZTIUserState.wsf will only work with MDT 2013 – I have no idea if it will work with previous versions of MDT, but then again previous versions don’t support Windows 8.1 anyway so there’s really no need to try.  I would also not suggest trying to use this script with any newer versions of MDT either.  (Fortunately Windows XP will be unsupported before a new version of MDT would be released anyway.)
  • If by chance you are using MDT on an x86 OS instead of an x64 OS, you’ll need to change the “Program Files (x86)” path to just “Program Files” in the above steps.

Remember, if you are still running Windows XP, you’re running out of time – April is right around the corner…

Categories: MDT

Disabling VM heartbeat monitoring for a clustered VM

Virtual PC Guy's WebLog - Thu, 01/09/2014 - 13:04

A Microsoft support engineer recently contacted me with an interesting problem.  They were working with a customer who had an application that was having problems.  They had been trying to diagnose the problem – and had gotten to the point where they had decided that they wanted to get a crash dump from the virtual machine and analyze it.

The problem they were then hitting was that the virtual machine was clustered, and whenever they would try to gather a crash dump, Windows Failover Clustering would detect that the guest operating system had crashed and would restart the virtual machine on another node in the cluster.

Normally, this is exactly what you want to happen.  But in this case it was a problem.

Fortunately, there is a relatively simple way to disable this specific functionality.  What you need to do is:

  1. Open the Failover Cluster Manager
  2. Go to Roles and select the virtual machine in question
  3. Change to the Resources tab at the bottom of the screen
  4. Select the Virtual Machine resource, right click on it, and select Properties
  5. Change to the Settings tab of the properties dialog
  6. Uncheck Enable heartbeat monitoring for the virtual machine and click OK

You should be careful about changing this setting though.  As once you do, clustering will no longer respond to actual guest operating crashes either.

Cheers,
Ben

Categories: MDT

Virtual Machines not shutting down on host shutdown in Windows Server 2012 R2

Virtual PC Guy's WebLog - Wed, 01/08/2014 - 13:04

Just wanted to let everyone know of a fix for Hyper-V that was included in the November 2013 update rollup for Windows Server 2012 R2 (http://support.microsoft.com/kb/2887595).

The fix in question (http://support.microsoft.com/kb/2896800) applies to Hyper-V servers that:

  • Are not part of a cluster
  • Have had the virtual machine automatic stop action changed from save state to shutdown

Without this fix Hyper-V will turn off a virtual machine (instead of cleanly shutting it down) when the physical computer is shutdown.  With this fix the virtual machine will now be shutdown correctly.

Cheers,
Ben

Categories: MDT

Automatic Virtual Machine Activation in Windows Server 2012 R2

Virtual PC Guy's WebLog - Tue, 01/07/2014 - 13:04

Automatic virtual machine activation is an easy to miss, but really handy feature in Windows Server 2012 R2.

One of the primary reasons why people buy Windows Server Datacenter today is because it gives them license to run an unlimited number of Windows Server instances inside of virtual machines.  However, you have still needed to manage Windows keys when doing this in the past.

Automatic virtual machine activation means that this is no longer necessary – Windows Server inside a virtual machine is now able to activate against Windows in the host operating system, if it is running an activated version of Windows Server Datacenter.

You can read all about this feature here:

http://technet.microsoft.com/en-us/library/dn303421.aspx

One important thing to know is that if you are installing Windows in a virtual machine, on a system that supports automatic virtual machine activation, and you get asked for a product key – you should use one of the AVMA keys.  They are as follows:

Edition AVMA key Windows Server 2012 R2 Datacenter Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW Windows Server 2012 R2 Standard DBGBW-NPF86-BJVTX-K3WKJ-MTB6V Windows Server 2012 R2 Essentials K2XGM-NMBT3-2R6Q8-WF2FK-P36R2

Cheers,
Ben

Categories: MDT

OS Deployment – Out Of Band install of Windows Server 2012 R2 Using MDT,WDS and PowerShell (Part 1–Getting the Hardware info)

The Deployment Bunny - Mon, 01/06/2014 - 15:17

This is post refers to this post http://deploymentbunny.com/2013/12/29/os-deployment-oob-install-of-windows-server-2012-r2-using-mdtwds-and-powershell/

Out of Band or Bare Metal installation requires information regarding the hardware, that is no surprise. We need to to be able to define settings that can be retried from the hardware. In many/most client deployment scenarios I see people using the MAC Address or, Serial Number but I use the GUID number. When it comes to server they don’t really have one NIC and when it comes to Hyper-V that MAC address will be more or less removed since the machine in most cases is turning the NICs into switches and then virtual NICs will be on top of that, so GUID number is better. All “normal” brands have that, at least with new server hardware. In this case I’m deploying HP Servers and they have iLO which is basically an other name for IPMI. In the case of iLO it is rather easy to access that information, you don’t even need to be authenticated, all the information we need is there (http://deploymentbunny.com/2013/12/18/nice-to-know-getting-hardware-infoilo-data-using-native-powershell-and-no-need-for-credentials/)

By reading the XML data in turn it into an object it is rather easy to use the data in PowerShell.

Below you can see the part we use to grab that data.

/mike


Categories: MDT

Local VM Management on Hyper-V Server with FreeRDP

Virtual PC Guy's WebLog - Mon, 01/06/2014 - 13:04

A couple of weeks ago I blogged about the Veeam RDP virtual appliance for Remote Management of Hyper-V Server.  Since then I have been inundated with questions, opinions and information about different solutions for managing a Hyper-V server.  I have been spending some time looking at the various options – and one of my favorites has been FreeRDP.

To give some more context – if you are using the free version of Hyper-V Server (you can download it from here: http://technet.microsoft.com/en-us/evalcenter/dn205299.aspx) you can use the Hyper-V management tools remotely from a full installation of Windows.  But if you login locally to the server all you have is PowerShell.

Now, you can do almost everything through PowerShell.  Almost.  The one thing you cannot do is interact with a virtual machine directly.  Luckily – FreeRDP is a simple project that, amongst other things, supports connecting to Hyper-V virtual machines.

To test this out – I created a new Hyper-V Server – and attempted to create and configure the server without using any remote management tools.  After doing the initial server configuration – I used PowerShell to create a virtual switch:

get-netadapter | new-vmswitch -name "Virtual Switch" -AllowManagementOS $true

(Note, my server only had a single network adapter – so I cheated and made this command simple).

Then I created and started a virtual machine:

New-VM -Name "Test 1" -MemoryStartupBytes 1GB -Generation 1 -BootDevice LegacyNetworkAdapter -Path "C:\VMs\Test 1" -SwitchName "Virtual Switch" -NewVHDPath "C:\VMs\Test 1\VHD.vhdx" -NewVHDSizeBytes 40GB

Start-VM "Test 1"

Now we come to the part where I usually need to use a remote management solution.  I downloaded a Windows version of FreeRDP from here: http://www.cloudbase.it/freerdp-for-windows-nightly-builds/ and copied it to C:\FreeRDP on my Hyper-V Server.  To use FreeRDP to connect to a virtual machine – you need to know the virtual machine ID number.  To get this I ran:

Get-VM "Test 1" | Select ID

Which gave me a virtual machine ID of a0a23c9b-11ec-4740-82c5-2e0cf55674f4 (you will get a different one for your virtual machines). Then I  ran:

C:\FreeRDP\wfreerdp.exe /v:localhost:2179 /vmconnect:a0a23c9b-11ec-4740-82c5-2e0cf55674f4

Which worked!

However, I wanted a more elegant solution than this.  So I decided to write a script Cmdlet that would allow me to just provide the virtual machine name that I wanted to connect to:

function Start-VMConnect {   [CmdletBinding()] param ( # CMDLet takes a single parameter of VMNames. # Can be single or plural, can come from the pipeline.   [Parameter(Mandatory=$True,ValueFromPipeline=$True)]$VMnames )   begin { # Path to the binary for FreeRDP   $FreeRDPPath = "C:\FreeRDP\wfreerdp.exe" }   process { foreach ($VMname in $VMnames) { if ($pscmdlet.ShouldProcess($VMname)) { # Get the ID of the virtual machine # If a VM object has been provided - grab the ID directly # Otherwise, try and get the VM object and get the ID from there   if ($VMname.GetType().name -eq "VirtualMachine") {$VMID = $VMname.ID} else {$VMID = (get-vm $VMname | Select -first 1).ID}   # Start FreeRDP start-process $FreeRDPPath -ArgumentList "/v:localhost:2179 /vmconnect:$($VMID)" } } }   end {} }

This Cmdlet (Start-VMConnect) takes either a virtual machine name or a virtual machine object and then connects to it with FreeRDP.  As this is actually a script Cmdlet – you need to use Import-Module to load it:

Once it is loaded you can just use Start-VMConnect and connect to the virtual machine:

Very cool!  I liked this option most of everything I tried – as it was the smallest / lightest weight solution that solved all the problems that I had.

Thanks to Alessandro Pilotti, from Cloudbase Solutions, who gave me the pointers to this solution.

Cheers,
Ben

P.S. Here is a copy of my script Cmdlet:

Categories: MDT

PowerShell is King – Building a Reference Image Factory

The Deployment Bunny - Mon, 01/06/2014 - 07:41

In the world of deployment a reference image is where all begins, basically we take the ISO/WIM from the vendor, install it, tweak it, patch it and on the other side we now a have a customized reference image that is more suitable for our needs. This applies to both clients and servers. There are two ways of doing this, the correct way and the incorrect way. The correct way is repeatable and as automated as possible. This blog is about the correct way and how to automate it just a bit more then usual. You can of coarse modify the script so it will do more, for example upload the images to the correct destination.

Acknowledgement goes to: What do I need to get this working?

Step 1: Set up Microsoft Deployment Toolkit 2013 on a server

Step 2: Import Operating Systems, applications and create your task sequences

Step 3: Install Windows Server 2012 R2 (or Windows 8.1) with Hyper-V as your “creator”

Step 4: Download the script and enjoy the show

Note:
  • The script is designed to run on the Hyper-V machine, but it is possible to run this remote either using Remote-Sessions or defining –Computer on every Commands that relates to Hyper-V
  • The Solution is tested on Windows Server 2012 R2 with MDT 2013 and ADK 8.1 BUT should work just fine on Windows 8.1
How does the script work?

The PowerShell module has a couple of functions

New-AutoGenRefImages

This function will connect to your MDT server, grab the boot ISO, read all TaskSequences from Task Sequences\REF

And for each of them build a VM with the same name as the task sequence. When they are all built it will power them on one by one, booting from the ISO and then run the task sequence that corresponds to the name of the the VM. So if you have a TS with the ID of RW81.x86, it will build a VM with that name and run the TS with that ID on that VM.

You might ask your self how that is done?. I’m not using the database, not using GUID number or Mac’s. The main reason is that I want a solution with as little dependencies as possible, so it will work anytime at any customer (almost). Instead I’ loading the drivers for KVP (Key Value Pair Exchange) in WinPE, I grab the name of the VM before the customsettings.ini is read using a userexit script in bootstrap.ini so I have a Property called VMNameAlias wich then is used to control the deployment process, a neat solution IMHO (more on that later)

Remove-AutoGenRefImages

This function will destroy and remove all VMs, it does this by getting all task sequence ID’s from the MDT server, and find corresponding VM’s and then destroy and clean up.

New-RefImage

This is a manual process, you now need to KNOW the Task Sequence ID, since that is a validation in the CMDLET

Remove-RefImage

Also a manual process, it will destroy/delete/cleanup whatever VMname you type in, not NO questions, it just deletes them, so don’t type in DC01 or something like that.

Get-RefTaskSequence

A simple CMDLET that lists all task sequences that are in the \REF folder in MDT

The Details

Download the Scripts from here: http://sdrv.ms/1hqoJIh

Download devcon.exe from here: http://support.microsoft.com/kb/311272/en-us

Modify ImageFactoryV2.xml

This is my sample XML file and you need to modify it so it will work in your environment.

<Settings>
    <DeploymentShare>\\SRVHOST555\MDTBuildLab$</DeploymentShare>
    <HyperVHost>SRVHOST555</HyperVHost>
    <HyperVHostNetwork>UplinkSwitch</HyperVHostNetwork>
    <HyperVStorage>E:\VMs</HyperVStorage>
    <HyperVISOFolder>E:\ISO</HyperVISOFolder>
    <HardwareProfile>MDT 2010 Profile</HardwareProfile>
    <TaskSequenceFolder>MDT:\Task Sequences\REF</TaskSequenceFolder>
    <StartUpRAM>2</StartUpRAM>
    <VLANID>0</VLANID>
    <VHDSize>60</VHDSize>
</Settings>

Modify bootstrap.ini

Bootstrap.ini needs some modification (besides being silent). You need to add the following:

In text:

[Settings]
Priority=Default

[Default]
DeployRoot=\\SRVHOST555\MDTBuildLab$
UserDomain=NETWORK
UserID=Administrator
UserPassword=Password02
SkipBDDWelcome=YES
SubSection=ISVM-%IsVM%

[ISVM-True]
UserExit=LoadKVPInWinPE.vbs

This will load a userexit script that installs the driver for KVP and create a fake services that will allow it to load.

Modify customsettings.ini

You need to modify customsettings.ini so it will read in the values from the KVP correctly

In text:

[Settings]
Priority=Init,Default
Properties=VMNameAlias

[Init]
UserExit=ReadKVPData.vbs
VMNameAlias=#SetVMNameAlias()#

[Default]
TaskSequenceID=%VMNameAlias%

You need to add the Property VMNameAlias under the Settings Section

You need to create a new Section called Init that runs the UserExit

You need to set the TaskSequenceID to match the returned value from the UserExit script

Modify the boot image:

You need to make sure that those two scripts are added correctly and we also need the driver for KVP. One easy way is to use the “Extra” folder feature in MDT, whatever you put in that folder will end up on the boot image.

My deployment share is located in

E:\MDTBuildLab

so I created a folder called

E:\MDTBuildLab\Extra

In that Folder I two folders, Deploy and KVP. In the folder Deploy I have a subfolder called Scripts.

Like this:

Content of the KVP folder:

In the KVP folder you need to add the driver for KVP, and that you can do by searching for VMGuest.iso on your Hyper-V host, it is in C:\Windows\System32, mount that is and extract the drivers.

The driver you need is in the support\x86\Windows6.x-HyperVIntegrationServices-x86.cab and the folder is namned x86_wvmic.inf_31bf3856ad364e35_6.3.9600.16385_none_968283a5680527fe

(read Keith Garners blog for details, Note: In Keith’s blog it is 64 bit, I’m using the 32 bit driver, since I boot from the x86 boot image. Therefore the name is different of course.)

You also need to store devcon.exe in that folder

When you got them, it should look like this in the folder

Content of the Deploy\Scripts folder

In this folder you store the LoadKVPinWinPE.vbs script

Like this:

Update the BootImage:

In the Boot Image setting for WinPE, for the setting called Extra directory to add, browse to your folder, apply, update boot image.

The Scripts:

LoadKVPInWinPE.vbs

Mainly “borrowed” from Keith’s blog, just modified to use devcon.exe instead the method suggested by Keith

option explicit

function UserExit(sType,Swhen,Sdetail,bSkip)
    oLogging.CreateEntry "USEREXIT:ModelAliasExit.vbs started: " & sType & " " & sWhen & " " & sDetail, LogTypeInfo

    If ucase(oEnvironment.Item("ISVM")) = "TRUE" and oEnvironment.Item("OSVERSION") = "WinPE" then

        oLogging.CreateEntry "Load the Integration Components", LogTypeInfo
        oUtility.RunWithConsoleLogging "\KVP\devcon.exe /r install \KVP\wvmic.inf vmbus\{242ff919-07db-4180-9c2e-b86cb68c8c55}"
        CreateFakeService "TermService", "Remote Desktop Service", "FakeService.exe"
        GetObject("winmgmts:root\cimv2").Get("Win32_Service.Name=’vmickvpexchange’").StartService()
        oUtility.SafeSleep 10000
        LoadVariablesFromHyperV

    End if

    ‘ Write back an unique number to the host to let them know that the variables have been loaded.
    oUtility.RegWrite "HKLM\SOFTWARE\Microsoft\Virtual Machine\Auto\HydrationGuestStatus","eb471002-58aa-473a-850f-7b626613055f"

    Userexit=success

end function

‘ ———————————————————

Function CreateFakeService (sName,sDisplayName,sPathName )

    Dim objService
    Dim objInParam

    ‘ Obtain the definition of the Win32_Service class.
    Set objService = GetObject("winmgmts:root\cimv2").Get("Win32_Service")

    ‘ Obtain an InParameters object specific to the Win32_Service.Create method.
    Set objInParam = objService.Methods_("Create").inParameters.SpawnInstance_()

    ‘ Add the input parameters.
    objInParam.Properties_.item("Name") = sName
    objInParam.Properties_.item("DisplayName") = sDisplayName
    objInParam.Properties_.item("PathName") = sPathName
    objInParam.Properties_.item("ServiceType") = 16
    objInParam.Properties_.item("ErrorControl") = 0
    objInParam.Properties_.item("StartMode") = "Manual"
    objInParam.Properties_.item("DesktopInteract") = False

    ‘ Execute the method and obtain the return status.
    CreateFakeService = objService.ExecMethod_("Create", objInParam).ReturnValue

End function

Function LoadVariablesFromHyperV

    Dim objReg
    Dim aSubValues
    Dim aValues
    Dim SubVal

    oLogging.CreateEntry "Has MDT Environment Variables in Integration Components.", LogTypeInfo
    Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
    objReg.EnumValues &H80000002, "SOFTWARE\Microsoft\Virtual Machine\External", aSubValues, aValues

    If isArray(aSubValues) then
        For Each SubVal in aSubValues
            oLogging.CreateEntry "Found Key: [" & SubVal & "]", LogTypeInfo
            oEnvironment.Item(SubVal) = oUtility.RegRead("HKLM\SOFTWARE\Microsoft\Virtual Machine\External\" & SubVal)
        Next
    End if

End Function

ReadKVPData.vbs

‘//—————————————————————————-
‘// Version: 1.0 – Jan 04, 2013 – Mikael Nystrom
‘// Twitter @mikael_nystrom
‘// Blog http://deploymentbunny.com
‘// This script is provided "AS IS" with no warranties, confers no rights and
‘// is not supported by the author
‘//—————————————————————————-
‘ //           
‘ // Usage:     Modify CustomSettings.ini similar to this:
‘ //              [Settings]
‘ //              Priority=SetAlias, Default
‘ //              Properties=VMNameAlias
‘ //
‘ //              [SetAlias]
‘ //              VMNameAlias=#SetVMNameAlias()#
‘ // ***** End Header *****

Function UserExit(sType, sWhen, sDetail, bSkip)

    oLogging.CreateEntry "UserExit: started: " & sType & " " & sWhen & " " & sDetail, LogTypeInfo
    UserExit = Success

End Function

Function SetVMNameAlias()
    oLogging.CreateEntry "UserExit: Running function SetVMNameAlias ", LogTypeInfo
    SetVMNameAlias = ""
    SetVMNameAlias = oShell.RegRead("HKLM\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters\VirtualMachineName")
    oLogging.CreateEntry "UserExit: SetVMNameAlias has been set to " & SetVMNameAlias, LogTypeInfo
    oLogging.CreateEntry "UserExit: Departing…", LogTypeInfo
End Function

ImageFactoryV2.psm1

<#
.Synopsis
   Short description
.DESCRIPTION
   Long description
.EXAMPLE
   Example of how to use this cmdlet
.EXAMPLE
   Another example of how to use this cmdlet
.INPUTS
   Inputs to this cmdlet (if any)
.OUTPUTS
   Output from this cmdlet (if any)
.NOTES
   General notes
.COMPONENT
   The component this cmdlet belongs to
.ROLE
   The role this cmdlet belongs to
.FUNCTIONALITY
   The functionality that best describes this cmdlet
#>
<#
.Synopsis
   Short description
.DESCRIPTION
   Long description
.EXAMPLE
   Example of how to use this cmdlet
.EXAMPLE
   Another example of how to use this cmdlet
#>
# Read Settings from XML
[xml]$Global:Settings = Get-Content .\ImageFactoryV2.xml
$Global:DeploymentShare = $Global:Settings.Settings.DeploymentShare
$Global:StartUpRAM = 1024*1024*1024*$Global:Settings.Settings.StartUpRAM
$Global:VHDSize = 1024*1024*1024*$Global:Settings.Settings.VHDSize
$Global:SWitchName = $Global:Settings.Settings.HyperVHostNetwork
$Global:VMLocation = $Global:Settings.Settings.HyperVStorage
$Global:HyperVISOFolder = $Global:Settings.Settings.HyperVISOFolder
$Global:TaskSequenceFolder = $Global:Settings.Settings.TaskSequenceFolder
$Global:VLANID = $Global:Settings.Settings.VLANID

function New-AutoGenRefImages{
    Process
    {

    #Connect to MDT:
    Add-PSSnapIn Microsoft.BDD.PSSnapIn -ErrorAction Stop
    Remove-PSDrive MDT -ErrorAction SilentlyContinue
    $Null = New-PSDrive -Name MDT -PSProvider MDTProvider -Root $Global:DeploymentShare -Force
    $MDTSettings = Get-ItemProperty MDT:
    $ISO = $MDTSettings.’Boot.x86.LiteTouchISOName’

    #Check if ISO exists
    $ISOFileExist = Test-Path "$($Global:DeploymentShare)\Boot\$($ISO)"  -ErrorAction SilentlyContinue
        If($ISOFileExist -like ‘False’){
        Write-Host "Unable to find ISO, exit"
        BREAK
        }

    #Create Folders
    $Null = New-Item -Path $HyperVISOFolder -ItemType Directory -Force -ErrorAction SilentlyContinue

    #Copy the BootImage from MDTServer to Hyper-VHost
    Copy-Item "$($Global:DeploymentShare)\Boot\$($ISO)" $Global:HyperVISOFolder\ -Container -Force -ErrorAction Stop

    #Check if ISO exists
    $ISOFileExist = Test-Path ($Global:HyperVISOFolder + "\" + $ISO) -ErrorAction Stop
        If($ISOFileExist -like ‘False’){
        Write-Host "Unable to find ISO, exit"
        BREAK
        }

    #Check if VMSwitch on host exists
    $VMSwitchExist = Get-VMSwitch -Name $Global:SWitchName -ErrorAction SilentlyContinue
        If($VMSwitchExist.Name -ne $Global:SWitchName){
        Write-Host "Unable to find VMSwitch, exit"
        BREAK
        }

    #Create the VMs
    $RefTS = Get-ChildItem $Global:TaskSequenceFolder -Recurse
        Foreach($TS in $RefTS){

        #Set VMName to ID
        $VMName = $TS.ID

        #Check if VM exists
        $VMexist = Get-VM -Name $VMName -ErrorAction SilentlyContinue
            If($VMexist.Name -like $VMName){
            Write-Host "VM already exist, exit"
            BREAK
            }

        $VM = New-VM –Name $VMname –MemoryStartupBytes $Global:StartUpRAM -SwitchName $Global:SWitchName -NewVHDPath "$Global:VMLocation\$VMName\Virtual Hard Disks\$VMName.vhdx" -NewVHDSizeBytes $Global:VHDSize -Path $Global:VMLocation
        Add-VMDvdDrive -VM $VM -Path ($Global:HyperVISOFolder + "\" + $ISO)

        #Set
        Get-VM -Name $VMName | Set-VMProcessor -CompatibilityForMigrationEnabled $True
        Get-VM -Name $VMName | Set-VMProcessor -Count 2
            If($Global:VLANID -notlike "0"){
            Get-VM -Name $VMName | Get-VMNetworkAdapter | Set-VMNetworkAdapterVlan -Access -VlanId $VLANID
            }
        }
        Foreach($TS in $RefTS){
        #Set VMName to ID
        $VMName = $TS.ID
        $VM = Get-VM -Name $VMName
        $VM | Start-VM
        Start-Sleep "10"
        while($VM.State -like "Running"){
        Write-Output "Waiting for $VMName to finish."
        Start-Sleep "120"}
        Write-Output "$VMName is done, checking for more"
        }
    }
}
function Remove-AutoGenRefImages{
    Process
    {

    #Connect to MDT:
    $Null = Add-PSSnapIn Microsoft.BDD.PSSnapIn -ErrorAction SilentlyContinue
    Remove-PSDrive MDT -ErrorAction SilentlyContinue
    $Null = New-PSDrive -Name MDT -PSProvider MDTProvider -Root $Global:DeploymentShare -Force
    $MDTSettings = Get-ItemProperty MDT:
    $ISO = $MDTSettings.’Boot.x86.LiteTouchISOName’

        #Remove the VMs
        $RefTS = Get-ChildItem $Global:TaskSequenceFolder -Recurse
        Foreach($TS in $RefTS){

            #Set VMName to ID
            $VMName = $TS.ID

            #Check if VM exists
            $VMexist = Get-VM -Name $VMName -ErrorAction SilentlyContinue
            If($VMexist.Name -like $VMName){
            Write-Host "Removing $VMName"
            $VMToRemove = Get-VM -Name $VMName
            $FolderPath = $VMToRemove.path
            if($VMToRemove.state -like "Running"){Stop-VM $VMToRemove -Force}
            $VMToRemove | Remove-VM -Force
            $FolderPath | Remove-Item -Force -Recurse
            }
        }
    }
}
function New-RefImage{
    [CmdletBinding()]
    [OutputType([int])]
    Param
    (
        [Parameter(Mandatory=$false,
        ValueFromPipeline=$true,
        ValueFromPipelineByPropertyName=$true,
        ValueFromRemainingArguments=$false,
        Position=0)]
        [String]
        $TaskSequenceID
    )
   
    Process
    {

    #Connect to MDT:
    Add-PSSnapIn Microsoft.BDD.PSSnapIn -ErrorAction Stop
    Remove-PSDrive MDT -ErrorAction SilentlyContinue
    $Null = New-PSDrive -Name MDT -PSProvider MDTProvider -Root $Global:DeploymentShare -Force
    $MDTSettings = Get-ItemProperty MDT:
    $ISO = $MDTSettings.’Boot.x86.LiteTouchISOName’

    #Check if ISO exists
    $ISOFileExist = Test-Path "$($Global:DeploymentShare)\Boot\$($ISO)"  -ErrorAction SilentlyContinue
        If($ISOFileExist -like ‘False’){
        Write-Host "Unable to find ISO, exit"
        BREAK
        }

    #Create Folders
    $null = New-Item -Path $HyperVISOFolder -ItemType Directory -Force -ErrorAction SilentlyContinue

    #Copy the BootImage from MDTServer to Hyper-VHost
    Copy-Item "$($Global:DeploymentShare)\Boot\$($ISO)" $Global:HyperVISOFolder\ -Container -Force -ErrorAction Stop

    #Check if ISO exists
    $ISOFileExist = Test-Path ($Global:HyperVISOFolder + "\" + $ISO) -ErrorAction Stop
        If($ISOFileExist -like ‘False’){
        Write-Host "Unable to find ISO, exit"
        BREAK
        }

    #Check if VMSwitch on host exists
    $VMSwitchExist = Get-VMSwitch -Name $Global:SWitchName -ErrorAction SilentlyContinue
        If($VMSwitchExist.Name -ne $Global:SWitchName){
        Write-Host "Unable to find VMSwitch, exit"
        BREAK
        }

    #Check if VM exists
    $VMexist = Get-VM -Name $VMName -ErrorAction SilentlyContinue
        If($VMexist.Name -like $VMName){
        Write-Host "VM already exist, exit"
        BREAK
        }

    $VM = New-VM –Name $TaskSequenceID –MemoryStartupBytes $Global:StartUpRAM -SwitchName $Global:SWitchName -NewVHDPath "$Global:VMLocation\$TaskSequenceID\Virtual Hard Disks\$TaskSequenceID.vhdx" -NewVHDSizeBytes $Global:VHDSize -Path $Global:VMLocation
    Add-VMDvdDrive -VM $VM -Path ($Global:HyperVISOFolder + "\" + $ISO)

    #Set
    Get-VM -Name $TaskSequenceID | Set-VMProcessor -CompatibilityForMigrationEnabled $True -VM $VM

    #Set
    Get-VM -Name $TaskSequenceID | Set-VMProcessor -Count 2

    #Set
        If($VLANID -notlike "0"){
        Get-VM -Name $TaskSequenceID | Get-VMNetworkAdapter | Set-VMNetworkAdapterVlan -Access -VlanId $VLANID
        }

    }

}
function Remove-RefImage{
    [CmdletBinding()]
    [OutputType([int])]
    Param
    (
        [Parameter(Mandatory=$false,
        ValueFromPipeline=$true,
        ValueFromPipelineByPropertyName=$true,
        ValueFromRemainingArguments=$false,
        Position=0)]
        [String]
        $VMName
    )
    Process
    {

    #Check if VM exists
    $VMexist = Get-VM -Name $VMName -ErrorAction SilentlyContinue
        If($VMexist.Name -like $VMName){
        Write-Host "Removing $VMName"
        $VMToRemove = Get-VM -Name $VMName
        $FolderPath = $VMToRemove.path
        if($VMToRemove.state -like "Running"){Stop-VM $VMToRemove -Force}
        $VMToRemove | Remove-VM -Force
        $FolderPath | Remove-Item -Force -Recurse
        }
    }
}
function Get-RefTaskSequence{
    Process
    {

    #Connect to MDT:
    Add-PSSnapIn Microsoft.BDD.PSSnapIn -ErrorAction Stop
    Remove-PSDrive MDT -ErrorAction SilentlyContinue
    $Null = New-PSDrive -Name MDT -PSProvider MDTProvider -Root $Global:DeploymentShare -Force
    $MDTSettings = Get-ItemProperty MDT:
    $ISO = $MDTSettings.’Boot.x86.LiteTouchISOName’

        #Get TS
        $RefTS = Get-ChildItem $Global:TaskSequenceFolder -Recurse
        Foreach($TS in $RefTS){
            New-Object PSObject -Property @{
            TaskSequenceID = $TS.ID
            Name = $TS.Name
            Comments = $TS.Comments
            Version = $TS.Version
            Enabled = $TS.enable
            LastModified = $TS.LastModifiedTime
            }
        }
    }
}

Export-ModuleMember -function *

/mike


Categories: MDT

Error enrolling Apple MAC OS X 10.9.1 client in Configuration Manager 2012 R2

Coretech Blog » Kent Agerlund - Sun, 01/05/2014 - 06:26
Been spending a few good hours trying to get the super enterprise friendly operating system Apple Mac OS X 10.9.1 (In Denmark we really use irony a lot!). There a some good blog post on how to configure MAC support that I advice you all to follow and if you are working with latest version […]
Categories: MDT

In the LAB–HP Proliant Microserver Gen 8–From G1610T to i5-3470T

The Deployment Bunny - Sun, 01/05/2014 - 02:46

The HP Proliant Microserver Gen 8 is one of the best LAB server for Hyper-V, Private-Cloud, System Center, Windows Server since it has dual network adapters AND a full blown iLO 4, so we can do all kinds of in-bound and out-of-band monitoring. It also support IPMI so it is possible to test and play with bare metal deployment in SCVMM 2012 (R2). But it lacks a bit of performance around the CPU. It comes with the Intel G1610T or Intel G2020T, but since it has a standard 1155 socket and it is of course possible to change the CPU, however this s of course NOT SUPPORTED by HP.

There are a couple of CPUs you can change into (since is a 1155 socket) but basically it comes down to either the “server” version Intel Xeon E3-1230 v2 or the “desktop” version Intel Core i5-3470T. You can look for yourself here to see the difference http://www.cpu-world.com/Compare/490/Intel_Core_i5_i5-3470T_vs_Intel_Xeon_E3-1230_v2.html. My choice was the desktop version, just because I wanted to try that (could not find anyone that had tried it). I think the Intel Xeon E3-1230 v2 is a better choice, but just for fun I wanted to test it. You can compare the Intel I5 3470T with the original G2020T here http://www.cpu-world.com/Compare/466/Intel_Core_i5_i5-3470T_vs_Intel_Pentium_Dual-Core_G2020T.html. The I5 has Hyper-Threading, Intel VT-d and Turbo Boost (plus some more stuff) and and slightly higher CPU speed, but it consumes the same amount of power 35 Watt, so it is a bit more “safe” then the Xeon E3 that consumes 69 Watt (TDP). I do recommend this excellent post to read before you even consider doing anything at all. http://homeservershow.com/forums/index.php?/topic/6596-hp-microserver-gen8-processor-faq/

There are some posts out there that shows how to change the CPU, just remember to get thermal paste before you start, also if you had any form of warranty, which is gone by the wind when you do this…

Here is guide on how to change the CPU http://b3n.org/installed-xeon-e3-1230v2-in-gen8-hp-microserver/

This is how it looks in iLO after replacing the CPU.

This is how it looks in Windows Server 2012 R2 after replacing the CPU.

/mike


Categories: MDT

SCVMM 2012 R2 – Error 2912 NO_PARAM when using Hyper-V Replica

Virtual PC Guy's WebLog - Fri, 01/03/2014 - 13:04

Another early issue that I hit when using System Center Virtual Machine Manager in my home deployment was that a number of operations would generate this error message:

It took a fair bit of investigation to figure out what was happening here – but the end result was that, in my case, there was a conflict happening between BITS and Hyper-V Replica.

I had configured Hyper-V Replica to use certificate based authentication over port 443.  SCVMM had also configured BITS to use certificate based authentication over port 443.  The result was that whenever SCVMM tried to use BITS to transfer a file – it would fail.

Fortunately – both BITS and Hyper-V Replica allow you to change the port that they use.  In my case I decided to change the port used by Hyper-V Replica from 443 to 444.  You can do this under the Hyper-V Settings:

Once I made this change – everything started working correctly.

Cheers,
Ben

Categories: MDT

OSD for Linux Imaging? Yes, really.

Steve Rachui's Manageability blog - Thu, 01/02/2014 - 16:29
!!!!!!!!!!!!!!!!!!!!!! ! DISCLAIMER ! !!!!!!!!!!!!!!!!!!!!!! So first things first. ConfigMgr task sequencing in no way, shape or form has been tested for imaging Linux. There is no in built support for Linux and if you choose to leverage task...(read more)
Categories: MDT

SCVMM 2012 R2 and Alternate Credentials

Virtual PC Guy's WebLog - Thu, 01/02/2014 - 14:04

A little while ago I updated my home installation to run Windows Server 2012 R2.  This provided the perfect opportunity to deploy System Center Virtual Machine Manager (SCVMM) in my home.  Overall this has been a great thing to do – but there have been some teething issues for me.

In my house I make heavy use of alternate credentials.  My desktop user account (Benjamin) is not an administrator on any of my servers.  I have a second account (David) that I use exclusively for server management.  When I first setup the remote management tools for SCVMM it looked like it would work perfectly for me – as it immediately asked if I wanted to specify alternate credentials:

This allowed me to connect successfully and interact with my Hyper-V servers.  However, attempting to connect to a virtual machine console would always fail with the following error message:

I suspected that the SCVMM management console was still using my “Benjamin” account for the virtual machine console access.  To test this I changed the SCVMM console shortcut to use “runas”.  To do this, I found the shortcut:

Opened its properties and changed the target from:

"C:\Program Files\Microsoft System Center 2012 R2\Virtual Machine Manager\bin\VmmAdminUI.exe"

To:

C:\Windows\System32\cmd.exe /c runas /savecred /user:ARMSTRONG\David "C:\Program Files\Microsoft System Center 2012 R2\Virtual Machine Manager\bin\VmmAdminUI.exe"

This time when I started it I did not specify credentials – and everything worked correctly:

Cheers,
Ben

Categories: MDT

Pages