<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>John Howard - Senior Program Manager in the Hyper-V team at Microsoft : Information</title><link>http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx</link><description>Tags: Information</description><dc:language>en-GB</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Explaining the Hyper-V authorization model, part five</title><link>http://blogs.technet.com/jhoward/archive/2009/10/09/Explaining-the-hyper-v-authorization-model-part-five.aspx</link><pubDate>Fri, 09 Oct 2009 21:51:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3285891</guid><dc:creator>jhoward</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3285891.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3285891</wfw:commentRss><description>&lt;P mce_keep="true"&gt;Hyper-V uses a role based authorisation model for access checks. This series of articles takes a look at the model; defines the available primitives; and walks through a couple of examples. (I actually wrote most of this many months ago – only finally found the time to post it up!).&lt;IMG src="http://blogpics.dyndns.org/2009-oct-azman-5.jpg" mce_src="http://blogpics.dyndns.org/2009-oct-azman-5.jpg"&gt;&lt;/P&gt;
&lt;P&gt;Quick links: &lt;A href="http://blogs.technet.com/jhoward/archive/2009/08/31/explaining-the-hyper-v-authorization-model-part-one.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/08/31/explaining-the-hyper-v-authorization-model-part-one.aspx"&gt;Part1&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/02/explaining-the-hyper-v-authorization-model-part-two.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/02/explaining-the-hyper-v-authorization-model-part-two.aspx"&gt;Part 2&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/09/explaining-the-hyper-v-authorization-model-part-three.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/09/explaining-the-hyper-v-authorization-model-part-three.aspx"&gt;Part 3&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/18/explaining-the-hyper-v-authorization-model-part-four.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/18/explaining-the-hyper-v-authorization-model-part-four.aspx"&gt;Part 4&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This post describes a change to the authorisation model in Hyper-V for Windows Server 2008 R2. If you recall from part one, I mentioned that there are 33 operations defined in AZMan for Windows Server 2008, and 34 operations for Windows Server 2008 R2.&lt;/P&gt;
&lt;P&gt;The new operation has ID 355, ‘Allow Virtual Machine Snapshot’.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12E7B/azman-5-1_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12E7B/azman-5-1_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-5-1 border=0 alt=azman-5-1 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12E7B/azman-5-1_thumb.jpg" width=404 height=436 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12E7B/azman-5-1_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;Why (to me) is this useful? Have you ever been confronted with a screen such as the following where you want to make Hyper-V Manager the foreground application, but accidentally hit the ‘Snapshot’ action in the MMC? I assure you, I have, several times. &lt;/P&gt;
&lt;P&gt;The problem with accidentally hitting that action is that you could now find your production virtual machine using a differencing disk, with reduced performance (at least in v1 – not the case in R2), or the possibility of physical disk space running out. Further, to merge the changes back to the parent VHD so that a differencing disk is no longer being used, you need to delete the snapshot, shut down the virtual machine, wait for the merge to complete and then restart the VM. This is particularly painful when the VM in question is your ISA server for outbound Internet connectivity, or your Exchange server your clients (wife and children in my case) are using for email? &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12E7B/azman-5-2_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12E7B/azman-5-2_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-5-2 border=0 alt=azman-5-2 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12E7B/azman-5-2_thumb.jpg" width=412 height=608 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12E7B/azman-5-2_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In part six, I’ll look at a solution that I personally use at home on my Windows Server 2008 R2 production environment that builds on what’s been learnt so far to ensure that I can’t accidentally snapshot critical production VMs, but am able to snapshot test VMs to my hearts delight. &lt;BR&gt;&lt;BR&gt;Cheers, &lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3285891" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008+R2/default.aspx">Windows Server 2008 R2</category></item><item><title>Explaining the Hyper-V authorization model, part four</title><link>http://blogs.technet.com/jhoward/archive/2009/09/18/explaining-the-hyper-v-authorization-model-part-four.aspx</link><pubDate>Fri, 18 Sep 2009 22:29:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3281995</guid><dc:creator>jhoward</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3281995.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3281995</wfw:commentRss><description>&lt;P&gt;Hyper-V uses a role based authorisation model for access checks. This series of articles takes a look at the model; defines the available primitives; and walks through a couple of examples. (I actually wrote most of this series many months ago – only finally found the time to post it up!).&lt;IMG src="http://blogpics.dyndns.org/2009-sep-azman-4.jpg" mce_src="http://blogpics.dyndns.org/2009-sep-azman-4.jpg"&gt;&lt;/P&gt;
&lt;P&gt;Quick links: &lt;A href="http://blogs.technet.com/jhoward/archive/2009/08/31/explaining-the-hyper-v-authorization-model-part-one.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/08/31/explaining-the-hyper-v-authorization-model-part-one.aspx"&gt;Part1&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/02/explaining-the-hyper-v-authorization-model-part-two.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/02/explaining-the-hyper-v-authorization-model-part-two.aspx"&gt;Part 2&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/09/explaining-the-hyper-v-authorization-model-part-three.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/09/explaining-the-hyper-v-authorization-model-part-three.aspx"&gt;Part 3&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/18/explaining-the-hyper-v-authorization-model-part-four.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/18/explaining-the-hyper-v-authorization-model-part-four.aspx"&gt;Part 4&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In parts two and three, I walked through a specific scenario. However, you’re probably asking after having read them how I knew what operations are needed, and when, and in what scope. Well, luckily I can walk across the corridor and speak to our development team. Obviously this isn’t practical for most of you reading this, but there are, of course other ways of discovering which access checks are failing. A great resource recently published on Technet is &lt;A href="http://technet.microsoft.com/en-us/library/dd282980(WS.10).aspx" mce_href="http://technet.microsoft.com/en-us/library/dd282980(WS.10).aspx"&gt;http://technet.microsoft.com/en-us/library/dd282980(WS.10).aspx&lt;/A&gt;. However, there’s a sneakier way….&amp;nbsp; Let’s take a step back through part three, and delete the role assignment and role definition “Service Access” I created to cause a deliberate access check failure.&lt;/P&gt;
&lt;P&gt;Next, I turned on auditing for object access. (I’m ignoring the fact that local policy may be over-ridden by group policy in a domain environment – this walkthrough so far is entirely on a workgroup configuration). Start the Local Security Policy snap-in under Administrative tools, and navigate to Security Settings/Local Policies/Audit Policy and change to auditing Success and Failure.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12CE5/azman-4-1_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12CE5/azman-4-1_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-4-1 border=0 alt=azman-4-1 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12CE5/azman-4-1_thumb.jpg" width=407 height=219 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12CE5/azman-4-1_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;Once done, log back on as user Joe or John and start Hyper-V Manager to validate the user gets the familiar ‘You do not have the required permission to complete this task.’ message. &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12CE5/azman-4-2_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12CE5/azman-4-2_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-4-2 border=0 alt=azman-4-2 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12CE5/azman-4-2_thumb.jpg" width=414 height=178 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12CE5/azman-4-2_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now log on as a user with local admin rights and start the event viewer.&amp;nbsp; Select the Security log under Windows Logs, and optionally apply a filter for just events 4665-4667 (actually just 4666 is probably enough).&lt;/P&gt;
&lt;P&gt;What you’ll see is the following Audit Failure message for event ID 4666: Joe failed an access check to operation Read Service Configuration (operation ID 100) in scope “blank” (ie the default scope).&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12CE5/azman-4-3_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12CE5/azman-4-3_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-4-3 border=0 alt=azman-4-3 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12CE5/azman-4-3_thumb.jpg" width=418 height=382 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_12CE5/azman-4-3_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;So with that knowledge, it’s easy to debug issues in authorisation models that you develop. &lt;BR&gt;&lt;BR&gt;In the next part of this series, I’ll look through a really useful change in Windows Server 2008 R2 (and Microsoft Hyper-V Server 2008 R2) which leads me in to a walkthrough in part six of an authorisation policy example I use on my home servers. &lt;BR&gt;&lt;BR&gt;Cheers, &lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3281995" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>Explaining the Hyper-V authorization model, part three </title><link>http://blogs.technet.com/jhoward/archive/2009/09/09/explaining-the-hyper-v-authorization-model-part-three.aspx</link><pubDate>Thu, 10 Sep 2009 04:52:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3280244</guid><dc:creator>jhoward</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3280244.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3280244</wfw:commentRss><description>&lt;P&gt;Hyper-V uses a role based authorisation model for access checks. This series of articles takes a look at the model; defines the available primitives; and walks through a couple of examples. (I actually wrote most of this series many months ago – only finally found the time to post it up!).&lt;IMG src="http://blogpics.dyndns.org/2009-sep-azman-3.jpg" mce_src="http://blogpics.dyndns.org/2009-sep-azman-3.jpg"&gt; &lt;BR&gt;&lt;BR&gt;Quick links: &lt;A href="http://blogs.technet.com/jhoward/archive/2009/08/31/explaining-the-hyper-v-authorization-model-part-one.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/08/31/explaining-the-hyper-v-authorization-model-part-one.aspx"&gt;Part1&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/02/explaining-the-hyper-v-authorization-model-part-two.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/02/explaining-the-hyper-v-authorization-model-part-two.aspx"&gt;Part 2&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/09/explaining-the-hyper-v-authorization-model-part-three.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/09/explaining-the-hyper-v-authorization-model-part-three.aspx"&gt;Part 3&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/18/explaining-the-hyper-v-authorization-model-part-four.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/18/explaining-the-hyper-v-authorization-model-part-four.aspx"&gt;Part 4&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/02/explaining-the-hyper-v-authorization-model-part-two.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/02/explaining-the-hyper-v-authorization-model-part-two.aspx"&gt;part two&lt;/A&gt;, I started creating the scenario of separating the view two users have when opening Hyper-V Manager so that they only see their own VMs. To do that, I created two VM Scopes, one for each user, and moved the users’ VMs to the required VM scopes. I mentioned that some more steps were still required. This part of the series walks through those steps. &lt;BR&gt;&lt;BR&gt;The first part of the additional steps I’ve pretty well covered to death in my remote management of Hyper-V series. As my two users, John and Joe are not local administrators; they need to be granted explicit access to WMI namespaces (and Distributed COM Users if managing remotely). By far the easiest way to achieve this is using &lt;A href="http://code.msdn.microsoft.com/HVRemote" mce_href="http://code.msdn.microsoft.com/HVRemote"&gt;HVRemote&lt;/A&gt;. (Note, I’m assuming you’re following best practice, and using remote management as the server is running Hyper-V Server, the standalone SKU, or a Server Core installation of Windows Server 2008/2008 R2.) &lt;/P&gt;
&lt;P&gt;From an elevated command prompt when logged on as a local administrator, run &lt;BR&gt;&lt;IMG src="http://blogpics.dyndns.org/2009-sep-azman-3.jpg" mce_src="http://blogpics.dyndns.org/2009-sep-azman-3.jpg"&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;cscript hvremote.wsf /add:john &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;(Use /add:domain\account if the Hyper-V machine is domain joined)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-1_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-1_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-3-1 border=0 alt=azman-3-1 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-1_thumb.jpg" width=405 height=365 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-1_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;If you look at the output carefully, note the line that says “Adding john to AZMan role Administrator” near the bottom. Apart from a typo I need to correct in a future version, what HVRemote has done is add john to the ‘Administrator’ role assignment in the default scope.&amp;nbsp; This is simply a limitation in HVRemote. At the time of writing, HVRemote cannot cope with VM Scopes.&amp;nbsp; (In fact it is hard coded to always update the role assignment called ‘Administrator’ in the default scope – on my big list and will be covered in the future).&lt;/P&gt;
&lt;P&gt;If John and Joe are now administrators in the default scope, we’ve not performed any separation as administrators in the default scope can view all VMs. There are two ways to resolve this. Either we update policy using Authorisation Manager to undo the generalisation HVRemote has made here, or use a parameter available in HVRemote when adding the account.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Method 1&lt;/U&gt; Use Authorisation Manager &lt;BR&gt;&lt;BR&gt;Select the Role Assignment ‘Administrator’ in the root scope to find the user which has been added. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-2_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-2_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-3-2 border=0 alt=azman-3-2 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-2_thumb.jpg" width=407 height=234 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-2_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;Right click on the user and choose delete (or simply hit the delete key) &lt;/P&gt;
&lt;P&gt;&lt;U&gt;Method 2&lt;/U&gt; Use a parameter to hvremote &lt;BR&gt;&lt;BR&gt;*Caveat this may not work in future releases – it does as of version 0.7 though. &lt;BR&gt;&lt;BR&gt;From an elevated command prompt when logged on as a local administrator, run &lt;BR&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;cscript hvremote.wsf /add:john /noazman&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;(Use /add:domain\account if the Hyper-V machine is domain joined)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-3_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-3_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-3-3 border=0 alt=azman-3-3 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-3_thumb.jpg" width=394 height=358 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-3_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you compare this output to the previous hvremote output, notice there is no role assignment update in AZMan.&lt;/P&gt;
&lt;P&gt;The last part to get our user separation in place require a little thought to get your head around, and a little knowledge of the Hyper-V design.&lt;/P&gt;
&lt;P&gt;We have a service called VMMS (Virtual Machine Management Service).&amp;nbsp; There are two operations in our authorisation model which are required to be able to perform operations on the VMMS. VMMS always performs its access checks for these operations in the default scope.&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;The operations are&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Read Service Configuration, and&lt;/LI&gt;
&lt;LI&gt;Reconfigure Service&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;What this means is that the users I’m separating, John and Joe, must be authorized to these operations in the default scope. It is not sufficient to just have them an ‘administrator’ in the VM Scope. Based on our knowledge from the previous parts, this is easily achieved:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a Role Definition ‘Service Access’ containing the two operations in the default scope&lt;/LI&gt;
&lt;LI&gt;Create a Role Assignment ‘Service Access’ linked to the ‘Service Access’ role definition in the default scope&lt;/LI&gt;
&lt;LI&gt;Add John and Joe to the role assignment ‘Service Access’ in the default scope&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;BR&gt;Authorisation manager should look like the following when done:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-4_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-4_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-3-4 border=0 alt=azman-3-4 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-4_thumb.jpg" width=412 height=296 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-4_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-5_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-5_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-3-5 border=0 alt=azman-3-5 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-5_thumb.jpg" width=406 height=368 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-5_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;All that remains validate the configuration is to log on as those users and start Hyper-V Manager (or use Hyper-V Manager remotely in the case of a server core or Microsoft Hyper-V Server installation).&lt;/P&gt;
&lt;P&gt;Here, I’m logged on as John&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-6_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-6_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-3-6 border=0 alt=azman-3-6 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-6_thumb.jpg" width=404 height=287 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-6_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;And here, I’m logged on as Joe&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-7_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-7_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-3-7 border=0 alt=azman-3-7 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-7_thumb.jpg" width=410 height=273 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_1298B/azman-3-7_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;So that works as expected. With the information so far, I hope I’ve provided everything you need to enable you to build a model which makes sense for your own unique implementation. It’s a question of sitting down and working through how to map your organisational needs into authorisation model primitives.&amp;nbsp; There is no single right answer which fits everyone, so building a mapping is not something I can help you with! &lt;BR&gt;&lt;BR&gt;In the next part of this series, I’ll take a look at how you could debug issues with a custom authorisation model you develop. &lt;BR&gt;&lt;BR&gt;Cheers, &lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3280244" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008+R2/default.aspx">Windows Server 2008 R2</category></item><item><title>Explaining the Hyper-V authorization model, part two</title><link>http://blogs.technet.com/jhoward/archive/2009/09/02/explaining-the-hyper-v-authorization-model-part-two.aspx</link><pubDate>Wed, 02 Sep 2009 21:22:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3278620</guid><dc:creator>jhoward</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3278620.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3278620</wfw:commentRss><description>&lt;P&gt;Hyper-V uses a role based authorisation model for access checks. This series of articles takes a look at the model; defines the available primitives; and walks through a couple of examples. (I actually wrote most of this series many months ago – only finally found the time to post it up!).&lt;IMG src="http://blogpics.dyndns.org/2009-sep-azman-2.jpg" mce_src="http://blogpics.dyndns.org/2009-sep-azman-2.jpg"&gt;&lt;/P&gt;
&lt;P&gt;Quick links: &lt;A href="http://blogs.technet.com/jhoward/archive/2009/08/31/explaining-the-hyper-v-authorization-model-part-one.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/08/31/explaining-the-hyper-v-authorization-model-part-one.aspx"&gt;Part1&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/02/explaining-the-hyper-v-authorization-model-part-two.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/02/explaining-the-hyper-v-authorization-model-part-two.aspx"&gt;Part 2&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/09/explaining-the-hyper-v-authorization-model-part-three.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/09/explaining-the-hyper-v-authorization-model-part-three.aspx"&gt;Part 3&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/18/explaining-the-hyper-v-authorization-model-part-four.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/18/explaining-the-hyper-v-authorization-model-part-four.aspx"&gt;Part 4&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/jhoward/archive/2009/08/31/explaining-the-hyper-v-authorization-model-part-one.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/08/31/explaining-the-hyper-v-authorization-model-part-one.aspx"&gt;Part one&lt;/A&gt; provided information on the primitives available in the AZMan model and looked at the out-of-box Hyper-V configuration. Building on that information, part two takes a deeper look at scopes. &lt;/P&gt;
&lt;P&gt;In part one, I talked about the top level scope (aka root or default scope) as the place where global policy is defined. I mentioned that you can also define more constrained scopes and place virtual machines in those scopes.&lt;/P&gt;
&lt;P&gt;The first question to answer is “How can you create a ‘Virtual Machine’ scope?”.&amp;nbsp; Scopes exist at an application level. You can either right-click on an application to create a new scope, as shown in the screenshot below, or use a script if you prefer automation (as I do). (If you’re interested in the specifics of API calls, take a look at &lt;A href="http://msdn.microsoft.com/en-us/library/aa375769(VS.85).aspx)" mce_href="http://msdn.microsoft.com/en-us/library/aa375769(VS.85).aspx)"&gt;http://msdn.microsoft.com/en-us/library/aa375769(VS.85).aspx)&lt;/A&gt;.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-1_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-1_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=azman-2-1 border=0 alt=azman-2-1 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-1_thumb.jpg" width=401 height=391 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-1_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that the script is the barest minimum – obviously I would recommend you make something more resilient for general use. &lt;BR&gt;Save the following code as “CreateScope.vbs”. &lt;/P&gt;&lt;PRE&gt;&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;' Make sure the script &lt;SPAN style="COLOR: #0000ff"&gt;is&lt;/SPAN&gt; passed a scope to create
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;szScope = wscript.arguments.named("&lt;SPAN style="COLOR: #8b0000"&gt;scope&lt;/SPAN&gt;")
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt; szScope = "&lt;SPAN style="COLOR: #8b0000"&gt;&lt;/SPAN&gt;" &lt;SPAN style="COLOR: #0000ff"&gt;then&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;    wscript.echo "&lt;SPAN style="COLOR: #8b0000"&gt;CreateScope /scope:&amp;lt;name&amp;gt;&lt;/SPAN&gt;"
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;    wscript.quit
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;end&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;if&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;' Need to have an object referencing the store
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;set&lt;/SPAN&gt; oAuthStore = _
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   &lt;SPAN style="COLOR: #0000ff"&gt;CreateObject&lt;/SPAN&gt;("&lt;SPAN style="COLOR: #8b0000"&gt;AZRoles.AZAuthorizationStore&lt;/SPAN&gt;")
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;' Initialise the store so that we can update it
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;oAuthStore.Initialize 0, _
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   "&lt;SPAN style="COLOR: #8b0000"&gt;msxml://C:\ProgramData\Microsoft\Windows\" &amp;amp; _
&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;   "&lt;SPAN style="COLOR: #8b0000"&gt;Hyper-V\InitialStore.xml&lt;/SPAN&gt;"
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;' Open the Hyper-V services &lt;SPAN style="COLOR: #0000ff"&gt;application&lt;/SPAN&gt; &lt;SPAN style="COLOR: #0000ff"&gt;in&lt;/SPAN&gt; the store
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;Set&lt;/SPAN&gt; oApplication = _
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;    oAuthStore.OpenApplication("&lt;SPAN style="COLOR: #8b0000"&gt;Hyper-V services&lt;/SPAN&gt;")
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;' Create a new scope
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;Set&lt;/SPAN&gt; oNewScope = _
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;    oApplication.CreateScope2(szScope)
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;' Submit it to the store
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffffff; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;oNewScope.Submit&lt;/PRE&gt;&lt;/PRE&gt;
&lt;P&gt;To create a scope called “My test VM scope”, from an elevated command prompt, type&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2 face="Courier New"&gt;cscript createscope.vbs /scope:“My test VM scope” &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-2_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-2_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-2-2 border=0 alt=azman-2-2 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-2_thumb.jpg" width=412 height=126 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-2_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you already have the Authorisation Manager MMC open after walking through part one, you need to reload the authorisation store by right-clicking on InitialStore.xml in the treeview on the left and selecting Reload. If the Authorisation Manager MMC is not open, open it now and load InitialStore.xml. &lt;/P&gt;
&lt;P&gt;When you expand out the tree, you’ll see that a new scope called “My test VM scope” has been created: &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-3_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-3_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-2-3 border=0 alt=azman-2-3 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-3_thumb.jpg" width=416 height=225 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-3_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;You can also see that a “VM Scope” has the same primitives available under it as the “Default” Scope – Groups, Role Definitions, Task Definitions and Role Assignments.&amp;nbsp; You can use the MMC to create role definitions; assign operations to role definitions; create role assignments; link role assignments to role definitions; and assign accounts to role assignments at both the default scope level and at the VM Scope level. &lt;BR&gt;&lt;/P&gt;
&lt;TABLE border=1 cellSpacing=0 cellPadding=2 width=400&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=400&gt;&lt;EM&gt;Side note: &lt;BR&gt;&lt;BR&gt;Personally, to avoid confusion, I would avoid using role definitions in a VM scope unless you really need to keep a role definition so specific that is has to be tied to a particular VM scope. There is little reason to not create all the role definitions at the default scope level.&amp;nbsp; &lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;&lt;BR&gt;At this point, you probably have a question: “Why would I need a ‘Virtual Machine’ scope?” And a great question it is, too. To answer it, let’s consider the following simple scenario: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR&gt;You have a shared Hyper-V machine. It is used by two users called “John” and “Joe”.&amp;nbsp; Both John and Joe have a single VM of theirs on that server called “Johns VM” and “Joes VM” respectively. &lt;/P&gt;
&lt;P&gt;You want the system configured so that John cannot even see that Joe is a user or has VMs on that machine, and visa-versa. John must be able to perform all operations on his virtual machine, and Joe must be able to perform all operations on his virtual machine. Neither Joe or John should be administrators on the physical machine. &lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Without virtual machine scopes, this is not possible. Let’s work through how you would configure that scenario. I’m going to start with the blank InitialStore.xml again for this. Using CreateScope.vbs, create scopes called “Johns VM Scope” and “Joes VM Scope”. Reload InitialStore.xml in Authorisation Manager. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-4_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-4_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-2-4 border=0 alt=azman-2-4 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-4_thumb.jpg" width=393 height=242 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-4_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;Within each of these new VM scopes, I’ll now use Authorisation Manager to create a new role assignment called ‘Administrator’ (not to be confused with the default scope role assignment ‘Administrator’ – AZMan permits role assignments with the same name in different scopes), and link it to the default scope ‘Administrator’ role definition.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Right-click “Role Assignments” under the VM scope and choose New Role Assignment…&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-5_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-5_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-2-5 border=0 alt=azman-2-5 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-5_thumb.jpg" width=385 height=420 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-5_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the dialog, select the role definition ‘Administrator’ in the default scope(called ‘Where Defined: Application’ in the UI) by checking it, then hit OK. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-6_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-6_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-2-6 border=0 alt=azman-2-6 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-6_thumb.jpg" width=397 height=261 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-6_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;The tree view should look something like this: &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-7_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-7_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-2-7 border=0 alt=azman-2-7 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-7_thumb.jpg" width=208 height=268 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-7_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;The next step is to put “John” into the Administrator role assignment in the VM Scope ‘John’s VMs” and to put “Joe” into the Administrators role assignment in the VM Scope ‘Joe’s VMs”. To do this, right-click the newly added role assignment and choose Assign Users and Groups, then From Windows and Active Directory. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-8_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-8_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-2-8 border=0 alt=azman-2-8 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-8_thumb.jpg" width=403 height=137 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-8_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;After making the necessary changes, your policy store should look like the following: &lt;BR&gt;&lt;BR&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-9_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-9_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-2-9 border=0 alt=azman-2-9 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-9_thumb.jpg" width=410 height=378 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-9_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Important to remember and note is that neither John or Joe are local administrators on the machine. Let’s take a step forward and assume that John and Joe have already created a virtual machine. In the screenshot below, I’m logged on as the local administrator. Remember that built in administrators are administrators in the default scope in the default policy store, and hence can see both virtual machines. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-10_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-10_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-2-10 border=0 alt=azman-2-10 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-10_thumb.jpg" width=408 height=198 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-10_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;The magic sauce needed to make the separation is to move Joes VM into the scope ‘Joes VM Scope’ and move Johns VM into the scope ‘Johns VM Scope’. Now as much as I write my own scripts for just about everything, there are certain times where it makes no sense to reinvent the wheel. If you download &lt;A href="http://blogs.technet.com/alipka/archive/2008/07/02/off-topic-things-and-some-hyper-v-goodies-resources-backup-and-azman-scope-scripts.aspx" mce_href="http://blogs.technet.com/alipka/archive/2008/07/02/off-topic-things-and-some-hyper-v-goodies-resources-backup-and-azman-scope-scripts.aspx"&gt;BackupVMsAndScopeScripts.zip&lt;/A&gt; and expand the files, there is a script called SetScope.vbs &lt;/P&gt;
&lt;P&gt;Run the script: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face="Courier New"&gt;cscript setscope.vbs “Johns VM” “Johns VM Scope”&lt;/FONT&gt; &lt;/LI&gt;
&lt;LI&gt;and &lt;FONT size=2 face="Courier New"&gt;cscript setscope.vbs “Joes VM” “Joes VM Scope” &lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;FONT size=2 face="Courier New"&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;You’ll get a big spew of output from each command. I’ll leave it an exercise for the reader to modify the script to their needs or develop their own. You want to look at the very last bit of the output which will say “0” if the update succeeded. &lt;/FONT&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-11_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-11_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-2-11 border=0 alt=azman-2-11 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-11_thumb.jpg" width=408 height=161 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_11CB9/azman-2-11_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;That’s it from a VM configuration standpoint, but there are still some nuances which needs resolving before John and Joe can use Hyper-V Manager to get their custom view of only their VMs.&amp;nbsp; As it’s involves several steps, I’ll cover this in part three. &lt;BR&gt;&lt;BR&gt;Cheers, &lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3278620" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008+R2/default.aspx">Windows Server 2008 R2</category></item><item><title>Explaining the Hyper-V authorization model, part one</title><link>http://blogs.technet.com/jhoward/archive/2009/08/31/explaining-the-hyper-v-authorization-model-part-one.aspx</link><pubDate>Tue, 01 Sep 2009 05:28:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3278384</guid><dc:creator>jhoward</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3278384.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3278384</wfw:commentRss><description>&lt;P&gt;Hyper-V uses a role based authorisation model for access checks. This series of articles takes a look at the model; defines the available primitives; and walks through a couple of examples. (I actually wrote most of this series many months ago – only finally found the time to post it up!).&lt;IMG src="http://blogpics.dyndns.org/2009-aug-azman-1.jpg" mce_src="http://blogpics.dyndns.org/2009-aug-azman-1.jpg"&gt;&lt;/P&gt;
&lt;P&gt;Quick links: &lt;A href="http://blogs.technet.com/jhoward/archive/2009/08/31/explaining-the-hyper-v-authorization-model-part-one.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/08/31/explaining-the-hyper-v-authorization-model-part-one.aspx"&gt;Part1&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/02/explaining-the-hyper-v-authorization-model-part-two.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/02/explaining-the-hyper-v-authorization-model-part-two.aspx"&gt;Part 2&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/09/explaining-the-hyper-v-authorization-model-part-three.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/09/explaining-the-hyper-v-authorization-model-part-three.aspx"&gt;Part 3&lt;/A&gt;; &lt;A href="http://blogs.technet.com/jhoward/archive/2009/09/18/explaining-the-hyper-v-authorization-model-part-four.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2009/09/18/explaining-the-hyper-v-authorization-model-part-four.aspx"&gt;Part 4&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As the term ‘Role Based Authorisation Model’ implies, Hyper-V has an authorisation layer which performs access checks to grant or deny an account access to operations based on roles the account is a member of. That is not to say everything in Hyper-V has an authorisation protection layer – we also use traditional NT ACL-based security mechanisms. However, this series of articles concentrates just on the authorisation model. &lt;/P&gt;
&lt;P&gt;A term I should introduce at this point is “AZMan”. AZMan is, in short, an engine and toolset for making role based access checks and defining policy. AZMan is a component built into Windows. Hyper-V uses AZMan to control role based authorisation. &lt;/P&gt;
&lt;P&gt;When you install Hyper-V, the system is configured with a policy store, the policy store being nothing more than a file on disk called ‘InitialStore.xml’. InitialStore.xml contains the most simple of authorisation policies: local administrators are authorised to perform all operations protected by a policy check.&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;There are two registry keys Hyper-V uses to define attributes about the policy store. They are both under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Virtualization.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;StoreLocation &lt;/EM&gt;points to a file called InitialStore in a hidden directory c:\ProgramData. &lt;BR&gt;&lt;EM&gt;ServiceApplication&lt;/EM&gt; defines which application in the policy store is used.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-1_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-1_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-1-1 border=0 alt=azman-1-1 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-1_thumb.jpg" width=408 height=157 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-1_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;Before looking at the contents of InitialStore.xml, let’s define some primitives which Hyper-V uses in AZMan.&lt;/P&gt;
&lt;P&gt;(Note that AZMan is a very flexible model, and Hyper-V does not use all the primitives available in AZMan. Also these articles do not cover more advanced modeling capabilities where you can, to some extent, build nested models).&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Application&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Policy stores define the authorisation model for zero or more applications. An application is top-level container which contains all the other primitives used by an application. Examples of applications could be ‘My Financials Application’ or (not by any coincidence!) ‘Hyper-V services’.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Operations&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Operations are specific items or actions being guarded by an access check in an application. For example, when a user tells a system to “Create a Virtual Machine”, Hyper-V makes an access check. &lt;/P&gt;
&lt;P&gt;&lt;U&gt;Role Definitions&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;As the name implies, this is the definition of a specific role, such as a Hyper-V administrator, or a Hyper-V Network Administrator, or standard user. It is defined by a name and zero or more operations which are permissible in this role definition.&amp;nbsp; So with the examples I just gave, you could choose to setup the store such that an administrator role definition contains all operations, a network administrator role definition contain the operations for altering, creating or deleting virtual networks, and standard users can only connect and interact with virtual machines.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Role Assignments&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Role assignments are where users and groups are placed or “assigned” in the model. A role assignment can be stand alone or linked to one or more role definitions. &lt;BR&gt;A standalone role assignment doesn’t make too much sense, as without any role definition links, it is nothing more than an orphaned grouping of accounts. &lt;BR&gt;When you link a role assignment to a role definition, you are saying that the accounts in the role assignment have would pass access checks for the operations defined in the linked role definition.&amp;nbsp; If you link a role assignment to multiple role definitions, accounts in the role assignment would pass access checks for the superset of operations defined by all the linked role definitions. &lt;BR&gt;Role assignments can be created at multiple levels or “scopes”. &lt;/P&gt;
&lt;P&gt;&lt;U&gt;Scopes&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Scopes are a more advanced feature in the authorisation model. Scopes can be thought of as the “level” where role definitions, role assignments and other AZMan primitives reside. Each AZMan policy store contains a single top level scope. A good way to think of the top level scope is the place where global policy is defined. &lt;/P&gt;
&lt;TABLE border=1 cellSpacing=0 cellPadding=2 width=421&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=419&gt;&lt;EM&gt;Side note &lt;BR&gt;&lt;BR&gt;Internally on the Hyper-V team, this tends to be referred to as the ‘default’ or ‘root’ scope. Whether that is correct or not in AZMan terminology is another question! I believe the correct term is “Application” scope. &lt;/EM&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;You can also create additional “more constrained” scopes, and place virtual machines in them. For the purposes of Hyper-V, it makes sense to think of these as VM specific scopes, or VM Scopes for short. Using VM scopes is a topic I’ll cover in more detail in later parts of this series.&lt;/P&gt;
&lt;P&gt;So with knowledge of those primitives, let’s take a look at the out-of-box policy store. To use the management tools for AZMan requires a full installation of Windows Server rather than server core. (Or you can take a copy of the file across to a separate Vista or Windows 7 installation). As the policy store is in a hidden and ACL’d directory, you need to be a local administrator to open the file.&lt;/P&gt;
&lt;P&gt;Start azman.msc&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-2_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-2_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-1-2 border=0 alt=azman-1-2 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-2_thumb.jpg" width=404 height=142 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-2_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;Right click on Authorisation Manager in the tree view on the left and select Open Authorisation Store. Navigate, or enter the path, to InitialStore.xml (again, note \ProgramData is a hidden directory – you can type it in though).&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-3_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-3_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-1-3 border=0 alt=azman-1-3 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-3_thumb.jpg" width=403 height=230 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-3_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;Once open, the first thing to notice is that there is a single application defined:&amp;nbsp; ‘Hyper-V services’. &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-4_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-4_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-1-4 border=0 alt=azman-1-4 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-4_thumb.jpg" width=408 height=164 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-4_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This matches the registry key ‘ServiceApplication’ in the screenshot higher up this article. Next, I’ve expanded out a couple of nodes so that you can see where Role Definitions and Role Assignments fit in to the hierarchy. &lt;/P&gt;
&lt;P&gt;(Note the Hyper-V authorisation model does not use Task Definitions or Authorisation Rules, and I won’t be talking about Groups in this series of articles)&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-5_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-5_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-1-5 border=0 alt=azman-1-5 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-5_thumb.jpg" width=412 height=193 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-5_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;You can see that we have a single role definition ‘Administrator’ and a single role assignment ‘Administrator’ defined. First, examine the ‘Administrator’ role definition by right clicking on it, selecting properties and choosing the Definition tab.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-6_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-6_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-1-6 border=0 alt=azman-1-6 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-6_thumb.jpg" width=393 height=429 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-6_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;This is where we can see which operations are covered by a role definition. There are 33 operations in Hyper-V in Windows Server 2008 and Microsoft Hyper-V Server, and 34 operations in Windows Server 2008 R2 and Microsoft Hyper-V Server R2. &lt;/P&gt;
&lt;P&gt;If you select a role assignment, Authorisation Manager displays a list of accounts who are members of that role assignment – the default being the builtin administrators group.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-7_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-7_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-1-7 border=0 alt=azman-1-7 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-7_thumb.jpg" width=404 height=189 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-7_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;As an aside – if you are walking through this and are using a domain joined machine (the above screenshot is from a workgroup machine), the default accounts listed in the “Administrator” Role Assignment will be domainname\administrators. This is actually a bug (as far as I can tell) in the AZMan console. You can verify this by opening InitialStore.xml in an editor:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-8_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-8_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=azman-1-8 border=0 alt=azman-1-8 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-8_thumb.jpg" width=406 height=54 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ExplainingtheHyperVauthorizationmodelpar_111C3/azman-1-8_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;You’ll notice that the SID listed is S-1-5-32-544 which is the SID (Security Identifier) of the builtin\administrators group - &lt;A href="http://support.microsoft.com/kb/163846" mce_href="http://support.microsoft.com/kb/163846"&gt;http://support.microsoft.com/kb/163846&lt;/A&gt; has more information. &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;So that explains how the default policy in Hyper-V is setup such that local administrators have access to all operations. With an understanding of the primitives, it is trivial to extrapolate how to modify the model to grant other accounts full access to Hyper-V without needing to be local administrators on the Hyper-V machine itself – you simply need to add accounts to the ‘Administrator’ role assignment in the default scope. This is exactly what &lt;A href="http://blogs.msdn.com/virtual_pc_guy/archive/2008/01/17/allowing-non-administrators-to-control-hyper-v.aspx" mce_href="http://blogs.msdn.com/virtual_pc_guy/archive/2008/01/17/allowing-non-administrators-to-control-hyper-v.aspx"&gt;Ben&lt;/A&gt; blogged about in January last year. &lt;/P&gt;
&lt;P&gt;In the next part, I’ll take a look at scopes.&lt;/P&gt;
&lt;P&gt;Cheers, &lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3278384" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>Hyper-V Resolving Event ID 4096</title><link>http://blogs.technet.com/jhoward/archive/2008/12/28/hyper-v-resolving-event-id-4096.aspx</link><pubDate>Sun, 28 Dec 2008 22:25:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3174126</guid><dc:creator>jhoward</dc:creator><slash:comments>8</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3174126.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3174126</wfw:commentRss><description>&lt;P&gt;Over the break I’ve been taking over Christmas, one of my goals was to move the remainder of my Virtual Server “production” VMs across to Hyper-V. But when nearing completion, I noticed that Server Manager was reporting a role error:&lt;IMG src="http://blogpics.dyndns.org/2008-dec-eventid-4096.jpg" mce_src="http://blogpics.dyndns.org/2008-dec-eventid-4096.jpg"&gt; &lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/2008-dec-eventid-4096%5B1%5D_2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/2008-dec-eventid-4096%5B1%5D_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=2008-dec-eventid-4096[1] border=0 alt=2008-dec-eventid-4096[1] src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/2008-dec-eventid-4096%5B1%5D_thumb.jpg" width=5 height=5 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/2008-dec-eventid-4096%5B1%5D_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title="Role Error" border=0 alt="Role Error" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error_thumb.jpg" width=405 height=91 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Looking at the detail of the event logs, it was Event ID 4096 from Hyper-V-Config saying that The Virtual Machines Configuration {GUID} at ‘{Directory}’ is no longer accessible: The system cannot find the path specified. (0x80070003)&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error2.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title="Role Error2" border=0 alt="Role Error2" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error2_thumb.jpg" width=416 height=207 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error2_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This is a pretty common error many people hit, and in my case it was due to some rearranging of directories and moving virtual machines around until I had it “just right” in terms of how I like to set my own servers up. By personal preference (nothing more), I like to keep the configurations, snapshots and VHDs for my virtual machines under a single directory on a per VM basis – in my case v:\virtual machines. However, when playing earlier with my new server, I’d been using the v:\vms directory (hence the specific error in the screenshot below).&lt;/P&gt;
&lt;P&gt;So in Hyper-V Manager, under Hyper-V Settings, I enter V:\Virtual Machines in the text boxes for both Virtual Hard Disks and Virtual Machine Configuration files.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error4.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error4.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title="Role Error4" border=0 alt="Role Error4" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error4_thumb.jpg" width=407 height=90 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error4_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, when using the New Virtual Machine wizard, I check “Store the virtual machine in a different location” but keep the default directory set above, and get to the Connect Virtual Hard Disk step, the wizard populates the default directory for a new VHD in a sub-directory under V:\Virtual Machines named the same as the Virtual Machine.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error6.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error6.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title="Role Error6" border=0 alt="Role Error6" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error6_thumb.jpg" width=408 height=140 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error6_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;If you examine the directory structure of V:\Virtual Machines\Test after completing the wizard, you end up with this (if you also take a snapshot)&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error7_1.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error7_1.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title="Role Error7" border=0 alt="Role Error7" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error7_thumb_1.jpg" width=412 height=174 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error7_thumb_1.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Your VHD is in the main directory, and the configuration and snapshot data-root are under the Virtual Machines and Snapshots subdirectories under “Test” (or whatever you name your virtual machine). In other words, everything for that virtual machine is in a single location which was the primary intent.&lt;/P&gt;
&lt;P&gt;Anyway, (as I frequently do in my blog posts), I somewhat digress. Back to the Event ID 4096 which indicated there was a problem with V:\VMs, the original location I was using when moving virtual machines across from Virtual Server.&lt;/P&gt;
&lt;P&gt;If you navigate to \ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines on your system drive (note that ProgramData is a hidden directory), you’ll notice that there are a number of symbolic links to configuration files. There are two in the screenshot below (one being highlighted) which points to the V:\VMs\… directory.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error3.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error3.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title="Role Error3" border=0 alt="Role Error3" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error3_thumb.jpg" width=414 height=240 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVResolvingEventID4096_A08E/Role%20Error3_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;So it’s a simple case of &lt;STRONG&gt;very carefully &lt;/STRONG&gt;deleting that or those links (just use the “del” command) which refer to the old directory, and cycling the VMMS service (net stop vmms, then, net start vmms). After this, the error will no longer be logged. Please be extremely mindful not to delete links referring to VMs you want to keep! Onwards with the rest of the migration now…&lt;/P&gt;
&lt;P&gt;Cheers, &lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3174126" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_amp_3B00_+Rambling/default.aspx">Misc Factoids &amp;amp; Rambling</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>Configure Hyper-V Remote Management in seconds</title><link>http://blogs.technet.com/jhoward/archive/2008/11/14/configure-hyper-v-remote-management-in-seconds.aspx</link><pubDate>Sat, 15 Nov 2008 03:02:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3153568</guid><dc:creator>jhoward</dc:creator><slash:comments>193</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3153568.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3153568</wfw:commentRss><description>&lt;P&gt;&lt;EM&gt;Update 19th Nov - v0.3 now released!&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It has been a little quiet on the blog front, but sometimes, at least in this case, I hope I've come up with something worth waiting for. Announcing "HVRemote"...., a tool to "automagically" configure Hyper-V Remote Management. (Amazing what can be done with a few days vacation to kill before you lose them at the end of the year....).&lt;IMG src="http://blogpics.dyndns.org/2008-nov-hvremote.jpg" mce_src="http://blogpics.dyndns.org/2008-nov-hvremote.jpg"&gt;&lt;/P&gt;
&lt;P&gt;I'm not going into the gory detail here as I've created a PDF containing the documentation, and a site on &lt;A href="http://code.msdn.microsoft.com/HVRemote" mce_href="http://code.msdn.microsoft.com/HVRemote"&gt;http://code.msdn.microsoft.com/HVRemote&lt;/A&gt; where you can download the tool and the documentation. All I ask, is that if you find the tool useful, drop me an email or a comment. Thanks!&lt;/P&gt;
&lt;P&gt;What does the tool do: It reduces the manual configuration steps needed for Hyper-V Remote Management that I blogged about back in March this year &lt;A href="http://blogs.technet.com/jhoward/archive/2008/03/28/part-1-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2008/03/28/part-1-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx"&gt;1&lt;/A&gt;, &lt;A href="http://blogs.technet.com/jhoward/archive/2008/03/28/part-2-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2008/03/28/part-2-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx"&gt;2&lt;/A&gt;, &lt;A href="http://blogs.technet.com/jhoward/archive/2008/03/30/part-3-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2008/03/30/part-3-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx"&gt;3&lt;/A&gt;, &lt;A href="http://blogs.technet.com/jhoward/archive/2008/04/01/part-4-domain-joined-environment-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2008/04/01/part-4-domain-joined-environment-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx"&gt;4&lt;/A&gt; and &lt;A href="http://blogs.technet.com/jhoward/archive/2008/04/04/part-5-domain-client-to-workgroup-server-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2008/04/04/part-5-domain-client-to-workgroup-server-hyper-v-remote-management-you-do-not-have-the-requested-permission-to-complete-this-task-contact-the-administrator-of-the-authorization-policy-for-the-computer-computername.aspx"&gt;5&lt;/A&gt;&amp;nbsp;down to one or two commands.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;It can configure Full installations and Server Core Installations of Windows Server 2008 with the Hyper-V role enabled, plus&amp;nbsp;configure Microsoft Hyper-V Server. It runs across all locales (I've tested English and Japanese) and it&amp;nbsp;doesn't matter if the server is domain or workgroup joined. &lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;It can configure Vista SP1 and Server 2008 configured with the Hyper-V Remote Management tools. Again, doesn't matter if the client is domain or workgroup joined.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Quick how-to:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;1. Server: To give or remove a user access permissions: &lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hvremote /add:domain\user&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or &lt;BR&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hvremote /remove:domain\user&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/Add.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/Add.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=293 alt=Add src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/Add_thumb.jpg" width=432 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/Add_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;2. Server &amp;amp; Client: Display current settings (server or client): (Screenshot is client side) &lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; hvremote /show &lt;/STRONG&gt;&lt;BR&gt;&lt;BR&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/showclient.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/showclient.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=399 alt=showclient src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/showclient_thumb.jpg" width=435 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/showclient_thumb.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;BR&gt;&lt;BR&gt;The other useful options are:&lt;/P&gt;
&lt;P&gt;3. Find out all the command line options: &lt;STRONG&gt;hvremote /help or hvremote /?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/usage.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/usage.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=415 alt=usage src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/usage_thumb.jpg" width=435 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/ConfigureHyperVRemoteManagementinseconds_E16E/usage_thumb.jpg"&gt;&lt;/A&gt; &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;and a couple of client side options: &lt;BR&gt;&lt;BR&gt;4. Client: Add firewall exception for MMC: &lt;STRONG&gt;hvremote /mmc:enable&lt;/STRONG&gt; &lt;BR&gt;5. Client: Allow anonymous access to Distributed COM: &lt;STRONG&gt;hvremote /AnonDCOM:grant&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I've tried this out with a a lot of test "guinea pigs" internally at Microsoft, and using the script literally dropped their remote configuration time down to seconds.&amp;nbsp;Hopefully it will&amp;nbsp;do the same for you.&lt;/P&gt;
&lt;P&gt;But I must also point you to&amp;nbsp;the disclaimer on my blog, the disclaimer in the documentation, and the license conditions at &lt;A href="http://code.msdn.microsoft.com/HVRemote" mce_href="http://code.msdn.microsoft.com/HVRemote"&gt;http://code.msdn.microsoft.com/HVRemote&lt;/A&gt; before use: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#800000&gt;HVRemote and the associated documentation are provided "as-is". You bear the risk of using it. No express warranties, guarantees or conditions are provided. It is not supported or endorsed by Microsoft Corporation and should be used at your own risk.&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Cheers, &lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3153568" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Downloads/default.aspx">Downloads</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_amp_3B00_+Rambling/default.aspx">Misc Factoids &amp;amp; Rambling</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>How to use uniquely identify a virtual machine in Hyper-V</title><link>http://blogs.technet.com/jhoward/archive/2008/09/16/how-to-use-uniquely-identify-a-virtual-machine-in-hyper-v.aspx</link><pubDate>Wed, 17 Sep 2008 01:13:30 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3124941</guid><dc:creator>jhoward</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3124941.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3124941</wfw:commentRss><description>&lt;p&gt;When managing a large number of virtual machines, there is often a need to tag it in some way with one or more properties uniquely identifying it for administrative purposes. One example would be to identify a virtual machine as belonging to a person, team or business unit.&lt;img src="http://blogpics.dyndns.org/2008-sep-uniquely-identify-vm.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;The Hyper-V WMI namespace has a number of BIOS properties which can be set when a virtual machine is turned off. As these properties are part of the virtual machine configuration, they are separate from the VHD or backing storage used by the virtual machine. These properties can also be read from within a guest operating system. &lt;/p&gt;  &lt;p&gt;To start with, let&amp;#8217;s look at the following four properties and the default values they are initialized to when a virtual machine is created: &lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="436" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="131"&gt;&lt;strong&gt;Property&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="302"&gt;&lt;strong&gt;Default value&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="131"&gt;BIOSSerialNumber&amp;#160;&amp;#160;&amp;#160; &lt;/td&gt;        &lt;td valign="top" width="302"&gt;Randomly generated&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="131"&gt;BaseBoardSerialNumber&lt;/td&gt;        &lt;td valign="top" width="302"&gt;Same value as BIOSSerialNumber&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="131"&gt;ChassisSerialNumber&lt;/td&gt;        &lt;td valign="top" width="302"&gt;Same value as BIOSSerialNumber&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="131"&gt;ChassisAssetTag&lt;/td&gt;        &lt;td valign="top" width="302"&gt;Randomly generated (but different to BIOSSerialNumber&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;All these properties are numeric and in the format &amp;quot;XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX&amp;quot;. &lt;/p&gt;  &lt;p&gt;Windows provides WMI classes that expose these settings inside a guest operating system. The table below shows the relationship between the WMI properties of the virtual machine and WMI properties as seen by a guest operating system.&lt;/p&gt;  &lt;table cellspacing="0" cellpadding="2" width="433" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="190"&gt;&lt;strong&gt;Property of Msvm_VirtualSystemSettingData&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="241"&gt;&lt;strong&gt;WMI class &amp;amp; property in guest operating system&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="189"&gt;BIOSSerialNumber&lt;/td&gt;        &lt;td valign="top" width="241"&gt;Win32_BIOS.SerialNumber&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="188"&gt;BaseBoardSerialNumber&lt;/td&gt;        &lt;td valign="top" width="241"&gt;Win32_BaseBoard.SerialNumber&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="188"&gt;ChassisSerialNumber&lt;/td&gt;        &lt;td valign="top" width="241"&gt;Win32_SystemEnclosure.SerialNumber&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="188"&gt;ChassisAssetTag&lt;/td&gt;        &lt;td valign="top" width="241"&gt;Win32_SystemEnclosure.SMBIOSAssetTag&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;To illustrate how these values can be queried, I set the values to something less random and more easily identifiable. Here&amp;#8217;s a partial output of a query against Msvm_VirtualSystemSettingData obtained using the wbemtest application on the parent partition. (Ignore the BIOSGUID property for a few moments). &lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New" size="2"&gt;instance of Msvm_VirtualSystemSettingData     &lt;br /&gt;{      &lt;br /&gt;&amp;#160;&amp;#160; BaseBoardSerialNumber = &amp;quot;2222-2222-2222-2222-2222-2222-22&amp;quot;;      &lt;br /&gt;&amp;#160;&amp;#160; BIOSGUID = &amp;quot;{AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE}&amp;quot;;      &lt;br /&gt;&amp;#160;&amp;#160; BIOSSerialNumber = &amp;quot;1111-1111-1111-1111-1111-1111-11&amp;quot;;      &lt;br /&gt;&amp;#160;&amp;#160; ChassisAssetTag = &amp;quot;4444-4444-4444-4444-4444-4444-44&amp;quot;;      &lt;br /&gt;&amp;#160;&amp;#160; ChassisSerialNumber = &amp;quot;3333-3333-3333-3333-3333-3333-33&amp;quot;;      &lt;br /&gt;};&lt;/font&gt; &lt;/p&gt;  &lt;p&gt;The next step was to generate something to query the WMI properties inside the guest operating system. I used a bit of scriptomatic assistance to come up with the following bit of VBScript &amp;#8211; there&amp;#8217;s plenty of other alternatives around of course including wbemtest again, a bit of PowerShell, ...&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Const&lt;/span&gt; wbemFlagReturnImmediately = &amp;amp;h10&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="kwrd"&gt;Const&lt;/span&gt; wbemFlagForwardOnly = &amp;amp;h20&lt;/pre&gt;

  &lt;pre class="alt"&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="kwrd"&gt;Set&lt;/span&gt; objWMIService = GetObject(&lt;span class="str"&gt;&amp;quot;winmgmts:\\.\root\CIMV2&amp;quot;&lt;/span&gt;) &lt;/pre&gt;

  &lt;pre class="alt"&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="kwrd"&gt;set&lt;/span&gt; colBIOS = objWMIService.ExecQuery( _&lt;/pre&gt;

  &lt;pre class="alt"&gt; &lt;span class="str"&gt;&amp;quot;SELECT SerialNumber FROM Win32_BIOS&amp;quot;&lt;/span&gt;, _&lt;/pre&gt;

  &lt;pre&gt; &lt;span class="str"&gt;&amp;quot;WQL&amp;quot;&lt;/span&gt;, wbemFlagReturnImmediately + wbemFlagForwardOnly) &lt;/pre&gt;

  &lt;pre class="alt"&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="kwrd"&gt;set&lt;/span&gt; colBB = objWMIService.ExecQuery( _&lt;/pre&gt;

  &lt;pre class="alt"&gt; &lt;span class="str"&gt;&amp;quot;SELECT SerialNumber FROM &amp;quot;&lt;/span&gt; &amp;amp; _&lt;/pre&gt;

  &lt;pre&gt; &lt;span class="str"&gt;&amp;quot;Win32_BaseBoard&amp;quot;&lt;/span&gt;, _&lt;/pre&gt;

  &lt;pre class="alt"&gt; &lt;span class="str"&gt;&amp;quot;WQL&amp;quot;&lt;/span&gt;, wbemFlagReturnImmediately + wbemFlagForwardOnly) &lt;/pre&gt;

  &lt;pre&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Set&lt;/span&gt; colSE = objWMIService.ExecQuery( _&lt;/pre&gt;

  &lt;pre&gt; &lt;span class="str"&gt;&amp;quot;SELECT SerialNumber,SMBIOSAssetTag &amp;quot;&lt;/span&gt; &amp;amp; _&lt;/pre&gt;

  &lt;pre class="alt"&gt; &lt;span class="str"&gt;&amp;quot;FROM Win32_SystemEnclosure&amp;quot;&lt;/span&gt;, _&lt;/pre&gt;

  &lt;pre&gt; &lt;span class="str"&gt;&amp;quot;WQL&amp;quot;&lt;/span&gt;, wbemFlagReturnImmediately + wbemFlagForwardOnly) &lt;/pre&gt;

  &lt;pre class="alt"&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="kwrd"&gt;For&lt;/span&gt; &lt;span class="kwrd"&gt;Each&lt;/span&gt; objItem &lt;span class="kwrd"&gt;in&lt;/span&gt; colBIOS&lt;/pre&gt;

  &lt;pre class="alt"&gt;   WScript.Echo _&lt;/pre&gt;

  &lt;pre&gt;     &lt;span class="str"&gt;&amp;quot;BIOS:            SerialNumber:   &amp;quot;&lt;/span&gt; &amp;amp; _&lt;/pre&gt;

  &lt;pre class="alt"&gt;     objItem.SerialNumber&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="kwrd"&gt;Next&lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="kwrd"&gt;For&lt;/span&gt; &lt;span class="kwrd"&gt;Each&lt;/span&gt; objItem &lt;span class="kwrd"&gt;in&lt;/span&gt; colBB&lt;/pre&gt;

  &lt;pre class="alt"&gt;   WScript.Echo _&lt;/pre&gt;

  &lt;pre&gt;     &lt;span class="str"&gt;&amp;quot;Baseboard:       SerialNumber:   &amp;quot;&lt;/span&gt; &amp;amp; _&lt;/pre&gt;

  &lt;pre class="alt"&gt;     objItem.SerialNumber&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="kwrd"&gt;Next&lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="kwrd"&gt;For&lt;/span&gt; &lt;span class="kwrd"&gt;Each&lt;/span&gt; objItem &lt;span class="kwrd"&gt;In&lt;/span&gt; colSE&lt;/pre&gt;

  &lt;pre class="alt"&gt;   WScript.Echo _&lt;/pre&gt;

  &lt;pre&gt;     &lt;span class="str"&gt;&amp;quot;SystemEnclosure: SerialNumber:   &amp;quot;&lt;/span&gt; &amp;amp; _&lt;/pre&gt;

  &lt;pre class="alt"&gt;     objItem.SerialNumber&lt;/pre&gt;

  &lt;pre&gt;   WScript.Echo _&lt;/pre&gt;

  &lt;pre class="alt"&gt;     &lt;span class="str"&gt;&amp;quot;SystemEnclosure: SMBIOSAssetTag: &amp;quot;&lt;/span&gt; &amp;amp; _&lt;/pre&gt;

  &lt;pre&gt;     objItem.SMBIOSAssetTag&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;Next&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;This yielded the following output: &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/Howtouseuniquelyidentifyavirtualmachinei_D609/tag1_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="103" alt="tag1" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/Howtouseuniquelyidentifyavirtualmachinei_D609/tag1_thumb.jpg" width="438" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;So the last problem I had to solve was the BIOSGUID value which I&amp;#8217;d set in the virtual machine configuration to AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE. I use the word &amp;#8220;problem&amp;#8221; because I couldn&amp;#8217;t see where or if this was propagated to the guest operating system in the WMI namespace. Nothing like a good challenge&amp;#8230; :)&lt;/p&gt;

&lt;p&gt;As searching the WMI namespace drew blank (or to be more accurate I missed it), I turned to some other thoughts. First was a registry search, but that also drew a blank. &lt;/p&gt;

&lt;p&gt;I did know that the BIOS GUID is used during PXE boot &amp;#8211; here&amp;#8217;s a screenshot of the same virtual machine configured with a legacy network adapter for PXE install &amp;#8211; you can see the contrived GUID being displayed: &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/Howtouseuniquelyidentifyavirtualmachinei_D609/tag2_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="107" alt="tag2" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/Howtouseuniquelyidentifyavirtualmachinei_D609/tag2_thumb.jpg" width="439" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Next call was a utility I found from an Internet Search called ROM BIOS Explorer. Here&amp;#8217;s a screenshot of it running inside the guest operating system. As you can see from the hex-dump on the left hand side, starting at the highlight at offset 0x49, you can see the contrived GUID clearly. The utility also indicates it&amp;#8217;s in the &amp;#8220;Type 1: System Information&amp;#8221; structure in the BIOS. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/Howtouseuniquelyidentifyavirtualmachinei_D609/tag3_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="222" alt="tag3" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/Howtouseuniquelyidentifyavirtualmachinei_D609/tag3_thumb.jpg" width="441" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;So that means the information is there &amp;#8211; it was just a question of how to access it from inside the guest operating system. Next stop was an Internet search for Type 1: System Information which yielded (among others), &lt;a href="http://download.microsoft.com/download/5/D/6/5D6EAF2B-7DDF-476B-93DC-7CF0072878E6/SMBIOS.doc"&gt;this document&lt;/a&gt; about SMBIOS on Microsoft.com. &lt;/p&gt;

&lt;p&gt;This shows that the table contains a Serial Number and UUID (another term for a GUID). So back to the Internet to refine the search to include the term &amp;#8220;UUID&amp;#8221; which led me to a pretty old &lt;a href="http://www.microsoft.com/technet/sms/20/getasset.mspx"&gt;SMS document&lt;/a&gt; which had exactly what I was looking for: Type 1, System Information UUID is exposed in Win32_ComputerSystemProduct. &lt;/p&gt;

&lt;p&gt;Back to scriptomatic to do a query, and it was there all along! &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/Howtouseuniquelyidentifyavirtualmachinei_D609/tag4_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="199" alt="tag4" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/Howtouseuniquelyidentifyavirtualmachinei_D609/tag4_thumb.jpg" width="442" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;There's also one other useful &lt;a href="http://blogs.technet.com/m2/archive/2008/07/04/how-to-get-the-bios-guid-from-a-hyper-v-vm.aspx"&gt;link&lt;/a&gt; I found along the way. To see a sample script on how to modify Msvm_VirtualSystemSettingData please &lt;a href="http://msdn.microsoft.com/en-us/library/cc136809(VS.85).aspx"&gt;see&lt;/a&gt; here. &lt;/p&gt;

&lt;p&gt;Cheers,
  &lt;br /&gt;John. &lt;/p&gt;

&lt;p&gt;PS Thanks to my colleague Frank Berreth for pulling much of the information for this post together.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3124941" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>Virtualization launch day</title><link>http://blogs.technet.com/jhoward/archive/2008/09/08/virtualization-launch-day.aspx</link><pubDate>Mon, 08 Sep 2008 23:30:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3121167</guid><dc:creator>jhoward</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3121167.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3121167</wfw:commentRss><description>&lt;P&gt;Today is (was) Virtualization Launch day. Although the keynote presentations were streamed live (in fact I'm just watching Bob Muglia finish up as I'm typing this), they will be available later this afternoon for on-demand viewing &lt;A class="" href="http://www.microsoft.com/presspass/events/default.mspx" mce_href="http://www.microsoft.com/presspass/events/default.mspx"&gt;here&lt;/A&gt;.&lt;IMG src="http://blogpics.dyndns.org/2008-sep-virtualization-launch-day.jpg" mce_src="http://blogpics.dyndns.org/2008-sep-virtualization-launch-day.jpg"&gt;&lt;/P&gt;
&lt;P&gt;Some of the highlights:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Microsoft Hyper-V Server is coming within the next 30 days and will be free&lt;/LI&gt;
&lt;LI&gt;System Center Virtual Machine Manager 2008 (SCVMM) is coming within the next 30 days.&lt;/LI&gt;
&lt;LI&gt;Live migration will be in the next release of Hyper-V in Windows Server 2008 codename "R2"&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;BR&gt;&lt;STRONG&gt;Microsoft Hyper-V Server&lt;/STRONG&gt;&lt;BR&gt;There's more information on Microsoft Hyper-V Server&amp;nbsp;&lt;A class="" href="http://www.microsoft.com/presspass/press/2007/nov07/11-12HyperVPR.mspx" mce_href="http://www.microsoft.com/presspass/press/2007/nov07/11-12HyperVPR.mspx"&gt;here&lt;/A&gt; as first announced back at TechEd last year. It will be available for free. Microsoft Hyper-V Server contains&amp;nbsp;the same fundamental technology present in the Hyper-V role in Windows Server 2008,&amp;nbsp;but Hyper-V is the only capability of Microsoft Hyper-V Server. It must be managed remotely. You may have noticed if you've watched the streaming media, the screenshot showed a command-line configuration utility - this is a simple way of configuring the server for things such as IP configuration, computer name, enabling remote desktop etc. More on that to follow soon.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;System Center Virtual Machine Manager 2008&lt;/STRONG&gt;&lt;BR&gt;There's more information on SCVMM&amp;nbsp;&lt;A class="" href="http://www.microsoft.com/systemcenter/virtualmachinemanager/en/us/default.aspx" mce_href="http://www.microsoft.com/systemcenter/virtualmachinemanager/en/us/default.aspx"&gt;here&lt;/A&gt;. The main announcement today was that SCVMM 2008 will be available within 30 days. The demonstration showed SCVMM managing Virtual Server 2005 R2 SP1; Windows Server 2008 with Hyper-V; Microsoft Hyper-V Server and VMWare ESX 3.5.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Live Migration&lt;/STRONG&gt;&lt;BR&gt;This was the first time we've made any announcements about the feature set in Windows Server 2008 codename "R2". Live migration is the ability to move a running virtual machine from one physical server to another with little or no perceptible downtime from an end user perspective - today's keynote showed a video being played while the virtual machine on which Windows Media Player was running was "live-migrated". Although there are many more improvements in the next release that we've been working on for many months now, there will be a fuller disclosure at the PDC conference at the end of October this year, and also at WinHEC in November.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3121167" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Webcasts/default.aspx">Webcasts</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>Hyper-V: Eight useful links and tidbits for 08-08-08</title><link>http://blogs.technet.com/jhoward/archive/2008/08/08/hyper-v-eight-useful-links-and-tidbits-for-08-08-08.aspx</link><pubDate>Fri, 08 Aug 2008 21:45:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3102732</guid><dc:creator>jhoward</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3102732.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3102732</wfw:commentRss><description>&lt;P&gt;I've had a few links I've been meaning to post up for some time now, so here's a small collection of eight of them on the 8th of the 8th, 08...&lt;IMG src="http://blogpics.dyndns.org/2008-aug-8-links-for-08-08-08.jpg" mce_src="http://blogpics.dyndns.org/2008-aug-8-links-for-08-08-08.jpg"&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;WMI/Development using Hyper-V &lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The &lt;A class="" href="http://msdn.microsoft.com/en-us/library/cc136992(VS.85).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc136992(VS.85).aspx"&gt;WMI SDK&lt;/A&gt; for Hyper-V has recently been updated with code samples in C# and VBScript&lt;/LI&gt;
&lt;LI&gt;Want some WMI samples in Powershell? Try &lt;A class="" href="http://blogs.technet.com/jamesone/" mce_href="http://blogs.technet.com/jamesone/"&gt;James's&lt;/A&gt; library on &lt;A class="" href="http://www.codeplex.com/PSHyperv" mce_href="http://www.codeplex.com/PSHyperv"&gt;CodePlex&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Clustering&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;A &lt;A class="" href="http://support.microsoft.com/?id=951308" mce_href="http://support.microsoft.com/?id=951308"&gt;hotfix for increased functionality&lt;/A&gt; in Hyper-V Clustering &lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://technet.microsoft.com/en-us/library/cc732181.aspx" mce_href="http://technet.microsoft.com/en-us/library/cc732181.aspx"&gt;Official&lt;/A&gt; Step-by-Step Guide for setup and testing Hyper-V Failover clustering: &lt;/LI&gt;
&lt;LI&gt;A couple of nice blog walkthroughs for setting up clustering from&amp;nbsp;&lt;A class="" href="http://blogs.technet.com/roblarson/archive/2007/12/17/building-a-host-cluster-with-hyper-v-beta-1.aspx" mce_href="http://blogs.technet.com/roblarson/archive/2007/12/17/building-a-host-cluster-with-hyper-v-beta-1.aspx"&gt;Robert&lt;/A&gt; &amp;amp; &lt;A class="" href="http://blogs.technet.com/josebda/archive/2008/07/16/failover-clustering-for-hyper-v-with-file-server-storage.aspx" mce_href="http://blogs.technet.com/josebda/archive/2008/07/16/failover-clustering-for-hyper-v-with-file-server-storage.aspx"&gt;Jose&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Assorted other stuff&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A class="" href="http://support.microsoft.com/kb/953828/en-us" mce_href="http://support.microsoft.com/kb/953828/en-us"&gt;Hotfix&lt;/A&gt; for running Network Load Balancing (NLB) in a virtual machine&lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://blogs.msdn.com/mikester/archive/2008/07/02/hyper-v-rtm-and-winpe-synthetic-devices.aspx" mce_href="http://blogs.msdn.com/mikester/archive/2008/07/02/hyper-v-rtm-and-winpe-synthetic-devices.aspx"&gt;Adding synthetic driver support to WinPE&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Cheers,&lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3102732" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>Do I have the latest BIOS installed? (And a cheap laptop repair)</title><link>http://blogs.technet.com/jhoward/archive/2008/08/03/do-i-have-the-latest-bios-installed-and-a-cheap-laptop-repair.aspx</link><pubDate>Sun, 03 Aug 2008 21:45:12 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3097837</guid><dc:creator>jhoward</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3097837.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3097837</wfw:commentRss><description>&lt;p&gt;For Hyper-V to operate correctly, it is strongly advised, and in many cases, required, to install the latest BIOS onto your hardware for hardware virtualization features to operate correctly.&lt;img src="http://blogpics.dyndns.org/2008-aug-latest-bios.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;While some OEMs provide fantastic information, my experience is that all too often, you get frustratingly minimal information about BIOS updates:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A release date&lt;/li&gt;    &lt;li&gt;A version number&lt;/li&gt;    &lt;li&gt;Verbiage like &amp;#8220;This improves stuff&amp;#8221;. &lt;font color="#808080"&gt;(Thanks. Really helpful!)&lt;/font&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;What they don&amp;#8217;t generally tell you is what you really wanted to know:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Do I need it?&lt;/li&gt;    &lt;li&gt;What will it mend or break?&lt;/li&gt;    &lt;li&gt;How do I tell whether I already have this version?&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;While most folks would need psychic powers to answer the first of those two, this off-topic post focuses on the last question.&lt;/p&gt;  &lt;p&gt;Why is this relevant? As it happens, I was rummaging through drawers a couple of days back as we're moving offices at work, and stumbled across a very old laptop of mine. I figured it was worth trying to revive &amp;#8211; it had a few problems with overheating and a noisy fan which was why it had been ignored for so long. I stripped it down (there&amp;#8217;s frighteningly useful information on the Internet for this), removed the CPU cooler and found the fan blades had been scraping the casing (in fact, it had worn a groove in the metal). &lt;/p&gt;  &lt;p&gt;The choice was around $70+ for a replacement, or a bit of packing material and a clean with the Hoover.&amp;#160; That was a really tough decision when the laptop is worth little more than $70 and was already on its way out to pasture. So a bit of thermal grease before re-installing the cooler and reassembly to see whether things had improved. (Amazingly, without a single screw left over! Way ahead of my track record or expectations.)&lt;/p&gt;  &lt;p&gt;Sure, the laptop ran. In fact, I&amp;#8217;m typing this post on it now. The fan was much quieter due to not scraping any more, but it was still permanently running, even when idle. It was still was on the noisy side, but that&amp;#8217;s cheap mechanics for you. Next stop then was the BIOS, the whole point of this post.&lt;/p&gt;  &lt;p&gt;Off to the Internet to find a new BIOS was released a year or so back. I knew that this laptop hadn&amp;#8217;t been turned on in way over a year, so it was out of date for sure. But how would most users would know what version of the BIOS they currently have? I came up with four ways &amp;#8211; I&amp;#8217;m sure there&amp;#8217;s plenty more. &lt;/p&gt;  &lt;p&gt;1) msinfo32&amp;#160; &lt;br /&gt;&amp;#160;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="144" alt="BIOS1" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/DoIhavethelatestBIOSinstalledAndacheapla_A53D/BIOS1_6.jpg" width="441" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;2) The registry &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="144" alt="BIOS2" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/DoIhavethelatestBIOSinstalledAndacheapla_A53D/BIOS2_6.jpg" width="446" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;3) Query WMI either through a script, scriptomatic, or a built in tool called wbemtest. Hit connect and select root\cimv2. Hit the query button and enter &amp;#8220;select *from win32_bios&amp;#8221; and apply. Double click the returned result and hit &amp;#8220;Show MOF&amp;#8221;&lt;/p&gt;  &lt;p&gt;4) Reboot the machine, and examine the BIOS splash screen (some computers), or enter BIOS setup and it will be in there somewhere usually. &lt;/p&gt;  &lt;p&gt;&lt;font color="#808080"&gt;(Which then got me sidetracked and I found one computer which didn&amp;#8217;t tell me anywhere what version was installed. But fair enough, I think the way to update it is to rip out an EPROM and shove it in a burner. A sticker told me the version instead though. Classic computing!).&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;But back to the plot&amp;#8230; Alas, on the laptop, the BIOS updater didn&amp;#8217;t run under Vista. Uuuuurgh. &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="97" alt="BIOS4" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/DoIhavethelatestBIOSinstalledAndacheapla_A53D/BIOS4_3.jpg" width="432" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;Problem solved with a separate disk and a temporary XP installation, but why on earth this particular OEM requires a separately downloaded program be installed to flash the BIOS, I&amp;#8217;ll never know&amp;#8230;&amp;#160; &lt;/p&gt;  &lt;p&gt;And did the BIOS update fix the fan running permanently? Sadly, not that I could notice except when first turned on. But the CPU temperature at idle was around 3 degrees cooler, so the new thermal paste probably helped. But as always, it was &amp;#8220;fun&amp;#8221; finding these things out &amp;#8230;. Now to &lt;a href="http://bozthx.blogspot.com/2008/07/new-java-jre-7.html" target="_blank"&gt;get&lt;/a&gt; &lt;a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6635144" target="_blank"&gt;rid&lt;/a&gt; of Java JRE 7 on it. Uuuuurgh (again).&amp;#160; &lt;/p&gt;  &lt;p&gt;Cheers,   &lt;br /&gt;John.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3097837" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_+Rambling/default.aspx">Misc Factoids &amp; Rambling</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Misc+Factoids+_2600_amp_3B00_+Rambling/default.aspx">Misc Factoids &amp;amp; Rambling</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>Hyper-V: Why is networking reset in my VM when I copy a VHD?</title><link>http://blogs.technet.com/jhoward/archive/2008/07/22/hyper-v-why-is-networking-reset-in-my-vm-when-i-copy-a-vhd.aspx</link><pubDate>Wed, 23 Jul 2008 01:36:53 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3092626</guid><dc:creator>jhoward</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3092626.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3092626</wfw:commentRss><description>&lt;p&gt;This is a question I&amp;#8217;ve seen come up a few times so figured it was time to examine why in a little more detail. In Virtual Server, you were able to copy VHDs and the associated VMC (Virtual Machine Configuration) file from one host to another, add the VMC to the other host and everything would work. In Hyper-V however, this is not the case due to improvements in our security model.&lt;img src="http://blogpics.dyndns.org/2008-jul-networking-guids.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;The supported way of copying a virtual machine from one Hyper-V enabled server to another is to use the export and import functionality in Hyper-V Manager. However, there are few situations I&amp;#8217;ve seen where some creative workarounds have been necessary.&lt;/p&gt;  &lt;p&gt;Consider the case where you store a VHD on a different physical drive than the VM configuration, and the physical drive holding the configuration gets corrupted or re-imaged for some reason and the original configuration is &amp;#8220;lost&amp;#8221;.&amp;#160; Let&amp;#8217;s suppose further that the virtual machine contains some very specific IP configuration settings on one or more network adapters &amp;#8211; maybe it&amp;#8217;s a router of some kind, for example.   &lt;br /&gt;    &lt;br /&gt;In this scenario, the obvious thing to do is to create a new virtual machine with a similar configuration, add the VHD(s) and start it up. When you log on to the VM, you&amp;#8217;ll see that the originally configured IP settings are no longer present. The reason for this is that the &amp;#8220;GUID&amp;#8221; of the original network adapter was stored in the &amp;#8220;lost&amp;#8221; configuration. So when a new configuration is created, when a synthetic NIC is added, a new GUID is generated. When the virtual machine starts, plug-and-play see this new NIC, as a completely different NIC, just like as you would in a physical machine. &lt;/p&gt;  &lt;p&gt;Of course, you can, in most circumstances (I&amp;#8217;m not aware of any Microsoft applications which you can&amp;#8217;t do this on) reset the IP configuration, change the application(s) to bind to the new network adapter and all is good. Apart, that is, from that reminder from Windows that another adapter already has that IP address, as shown below. &lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="231" alt="1" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhyisnetworkingresetinmyVMwhenIcop_DB86/1_3.jpg" width="387" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;There's a &lt;a href="http://support.microsoft.com/kb/315539"&gt;KB article&lt;/a&gt; outlining how to remove those hidden network adapters. (Although targeted for XP, this appears to also work on Windows Server 2008).     &lt;br /&gt;    &lt;br /&gt;So that explains what&amp;#8217;s going on. The rest of this article really just digs a tad deeper for a little more insight into how Hyper-V operates under the covers, and see if there&amp;#8217;s another way to approach this. &lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Let&amp;#8217;s go back and go through what we&amp;#8217;ve done so far: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Created a (Windows Server 2008) virtual machine with a single &amp;#8220;synthetic&amp;#8221; NIC &lt;/li&gt;    &lt;li&gt;Assigned a static IPv4 address of 192.168.200.248. &lt;/li&gt;    &lt;li&gt;Deleted the virtual machine using Hyper-V manager (this doesn&amp;#8217;t delete the VHD). &lt;/li&gt;    &lt;li&gt;Created a new virtual machine using the same VHD and a single &amp;#8220;synthetic&amp;#8221; NIC. &lt;/li&gt;    &lt;li&gt;In Network Connections (ncpa.cpl), you see Local Area Connection n where n does not match what would have been seen in the original VM&lt;/li&gt;    &lt;li&gt;For that same &amp;#8220;Local Area Connection n&amp;#8221; network connection, you&amp;#8217;ll see the device name is &amp;#8220;Microsoft Virtual Machine Bus Network Adapter #m&amp;#8221; where m does not match what you would have seen in the original VM (or may have been missing entirely). &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;   &lt;br /&gt;Now perform the steps in the KB article so that we can see the &amp;#8220;old&amp;#8221; NIC in device manager. From an elevated command prompt:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;set devmgr_show_nonpresent_devices=1&lt;/li&gt;    &lt;li&gt;start devmgmt.msc&lt;/li&gt;    &lt;li&gt;On the menu bar: View/Show hidden devices&lt;/li&gt;    &lt;li&gt;Expand the Network adapters node&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="261" alt="2" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhyisnetworkingresetinmyVMwhenIcop_DB86/2_5.jpg" width="343" border="0" /&gt;&amp;#160; &lt;br /&gt;    &lt;br /&gt;There are two NICs. Let&amp;#8217;s take a closer look at the dimmed adapter (the one highlighted) by selecting properties, switching to the details tab and selecting Hardware Ids from the dropdown. In particular, notice the first line highlighted which is a GUID, in this example, starting f61bbefc-.&lt;/p&gt;  &lt;p&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="435" alt="3" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhyisnetworkingresetinmyVMwhenIcop_DB86/3_3.jpg" width="396" border="0" /&gt; &lt;/p&gt;  &lt;p&gt;This is the VMBus &amp;#8220;Channel Offer GUID&amp;#8221; for the &amp;#8220;old&amp;#8221; NIC. Let&amp;#8217;s do the same with the currently configured NIC.    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhyisnetworkingresetinmyVMwhenIcop_DB86/4_2.jpg"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="432" alt="4" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhyisnetworkingresetinmyVMwhenIcop_DB86/4_thumb.jpg" width="393" border="0" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;Notice that the highlighted GUIDs are different &amp;#8211; the new one, in my case, starts 944fafdc. (Another way to retrieve this GUID is to extract it from the registry &amp;#8211; a little harder, but absolutely possible.) Now a bit of background information &amp;#8211; let&amp;#8217;s take a look at the XML configuration file for the current virtual machine. By default, the XML configuration files are stored under \programdata\microsoft\windows\hyper-v\virtual machines. &lt;strong&gt;&lt;font color="#ff0000"&gt;BUT&lt;/font&gt;&lt;/strong&gt; &amp;#8211; it&amp;#8217;s totally unsupported to edit these files manually, and we entirely reserve the right to change the format at any point in time. There&amp;#8217;s no harm though taking a peek at a section of it. Notice the highlighted line (ChannelInstanceGuid) matches 944fafdc&amp;#8230;.    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhyisnetworkingresetinmyVMwhenIcop_DB86/5_2.jpg" target="_blank"&gt;&lt;img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="71" alt="5" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVWhyisnetworkingresetinmyVMwhenIcop_DB86/5_thumb.jpg" width="441" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;    &lt;br /&gt;So you&amp;#8217;ve probably now worked it out. We know the old &amp;#8220;ChannelInstanceGuid&amp;#8221; from the device manager screenshot above, and need to create a VM configuration with that same ChannelInstanceGuid. As I mentioned above, it&amp;#8217;s totally unsupported to hand-edit the configuration file, so we have to use an alternate mechanism. We expose this property in our WMI model (&lt;a href="http://msdn.microsoft.com/en-us/library/cc136992(VS.85).aspx)"&gt;http://msdn.microsoft.com/en-us/library/cc136992(VS.85).aspx)&lt;/a&gt;. Specifically, it&amp;#8217;s the first element of the array Msvm_SyntheticEthernetPortSettingData.VirtualSystemIdentifiers[] which needs updating. I&amp;#8217;ll leave the actual scripting sample up to someone else &amp;#8211; there&amp;#8217;s various examples out there on the Internet of how to use the Hyper-V WMI model. &lt;/p&gt;  &lt;p&gt;Hope that was of interest.   &lt;br /&gt;Cheers,    &lt;br /&gt;John.&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3092626" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/Network+Infrastructure+Systems/default.aspx">Network Infrastructure Systems</category><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>Hyper-V: MAC Address allocation and apparent network issues MAC collisions can cause</title><link>http://blogs.technet.com/jhoward/archive/2008/07/15/hyper-v-mac-address-allocation-and-apparent-network-issues-mac-collisions-can-cause.aspx</link><pubDate>Wed, 16 Jul 2008 06:02:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3089383</guid><dc:creator>jhoward</dc:creator><slash:comments>19</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3089383.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3089383</wfw:commentRss><description>&lt;P&gt;In a physical only world, you don’t usually have to worry about MAC addresses that much as each NIC vendor carves off a MAC address from their ranges which have been allocated to them. However, in a virtual environment, you have to be a little more careful, particularly if you are using dynamic MAC address assignment. This post looks at how Hyper-V allocates dynamic MAC addresses and some potential problems you can face. So often it can be the last thing people think to check, but can be the root cause of otherwise unexplained network oddities.&amp;nbsp; &lt;IMG src="http://blogpics.dyndns.org/2008-jul-mac-addresses.jpg" mce_src="http://blogpics.dyndns.org/2008-jul-mac-addresses.jpg"&gt; &lt;/P&gt;
&lt;P&gt;Here’s a screenshot of a typical MAC collision problem – pings sometimes work, sometimes fail – and this is all on a local isolated network. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/1_4.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/1_4.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=100 alt=1 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/1_thumb_1.jpg" width=437 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/1_thumb_1.jpg"&gt;&lt;/A&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;To start the walkthrough, I have a base install of Windows Server 2008 on a server&amp;nbsp; with a single physical NIC – against best practice, but it serves fine for demonstration.&amp;nbsp; I have already installed the RTM update (KB950050) to the server, but have not yet added the Hyper-V role. Let’s look at an output of “ipconfig /all”. You can see that the MAC address of the physical NIC is 00-13-20-F5-F8-7D and I’m obtaining an IP address from a DHCP server on the private test network I’m using. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/2_4.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/2_4.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=154 alt=2 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/2_thumb_1.jpg" width=444 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/2_thumb_1.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now let’s use Server Manager to enable the Hyper-V role. Note that Server Manager allows you to create an external virtual network switch during role enabling, but I am choosing not to do this. Let’s see what has happened in the registry after the Hyper-V role is enabled. Specifically, I’m looking at two keys which have been created under HKLM\Software\Microsoft\Windows\NT\CurrentVersion\Virtualization, as-yet unpopulated: MinimumMacAddress and MaximumMacAddress, plus another key in the worker node, CurrentMacAddress – again as-yet unpopulated. (The astute walking through this in front of a machine will notice that CurrentMacAddress also appears in the Virtualization node. That key is not used though.) &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/3_4.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/3_4.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=122 alt=3 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/3_thumb_1.jpg" width=438 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/3_thumb_1.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/4_4.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/4_4.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=104 alt=4 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/4_thumb_1.jpg" width=440 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/4_thumb_1.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Next, I’m going to create my first virtual machine. As I haven’t created any virtual network switches yet, I’ll leave the network disconnected. I don’t need a hard disk. Also, I’m deliberately choosing not to start it.&amp;nbsp; Let’s see what’s happened in the registry. MinimumMacAddress and MaximumMacAddress have been populated with 00-15-5d-c8-6a-00 and 00-15-5d-c8-6a-ff respectively – a range of 256 possible MAC addresses. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/5_4.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/5_4.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=116 alt=5 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/5_thumb_1.jpg" width=436 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/5_thumb_1.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;So where did this range come from? The first three bytes are the Microsoft IEEE Organizationally Unique Identifier, 00-15-5D which we use in Hyper-V. The next two bytes, C8-6A are derived from the lowest two octects of an IPv4 address on the server (the first IP address as NICs are enumerated). If you look at the second screenshot in this post, the IPv4 address on the only NIC on this server was 192.168.200.106. In Hex, this is “C0.A8.C8.6A”. The last two octets or bytes are C8 and 6A. The last byte of the address range is automatically generated with a minimum 00 and maximum FF. &lt;/P&gt;
&lt;P&gt;You can probably now realize, that while this algorithm will work for many people, it may not necessarily be perfect and cause MAC address range clashes. To cope with multiple Hyper-V enabled servers, you would need to ensure address ranges are managed at a higher level across those servers, such as the use of SCVMM. &lt;/P&gt;
&lt;P&gt;Let’s go back to the virtual machine I created. By default, when a virtual machine is created, it is allocated a dynamic MAC address. This can of course be changed in the settings for the virtual machine. Here’s the setting for the blank virtual machine. Notice that it’s set to Dynamic and the MAC address in the “Static” boxes show 00-00-00-00-00-00 &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/6_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/6_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=170 alt=6 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/6_thumb.jpg" width=436 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/6_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now I’m going to start the Virtual Machine and open the settings. Although some settings cannot be changed while a virtual machine is running (including changing static/dynamic MAC, or the static MAC itself), notice that the boxes under the static MAC address radio button are now populated with the first MAC address in the range defined in the registry: 00-15-5D-C8-6A-00. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/7_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/7_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=170 alt=7 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/7_thumb.jpg" width=436 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/7_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now for a bit of fun (and to make the walkthrough a bit simpler), let’s change the registry so that the maximum MAC address is 00-15-5D-C8-6A-02. (I’ll also do a reboot just to make sure the change takes effect) This change means that we are limited to three possible dynamically assigned MAC addresses, the last octet being 00 (in use by the “Blank” VM), 01 or 02. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/8_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/8_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=109 alt=8 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/8_thumb.jpg" width=431 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/8_thumb.jpg"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Now, I’m going to create another virtual machine named 6A-01 and power it on, then create a third virtual machine named 6A-02 and power that on too.&amp;nbsp; Let’s look at the settings for each of these while all three virtual machines are running. As expected 6A-01 has a MAC address ending 6A-01 and 6A-02 has a MAC address ending 6A-02. That’s why we have the “CurrentMacAddress” registry key to track what MAC address to assign to VMs in turn. &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/9_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/9_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=169 alt=9 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/9_thumb.jpg" width=435 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/9_thumb.jpg"&gt;&lt;/A&gt; 
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/10_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/10_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=171 alt=10 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/10_thumb.jpg" width=439 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/10_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Can you guess though at this point what would happen though if I create another virtual machine and power it on? I don’t have any MAC addresses left in my available range and all MAC addresses are currently in use. &lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=239 alt=11 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/11_3.jpg" width=380 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/11_3.jpg"&gt; &lt;/P&gt;
&lt;P&gt;Did you guess correctly? Let’s now power off the very first virtual machine (“Blank”) I created with MAC address 6A-00, and then try to run through the New Virtual Machine Wizard again with my “No MAC Addresses Available In Range” virtual machine. Try to guess what will happen at the end. &lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=127 alt=12 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/12_3.jpg" width=336 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/12_3.jpg"&gt; &lt;/P&gt;
&lt;P&gt;The virtual machine starts successfully and now has a duplicate MAC address to the first virtual machine I created, ‘Blank’: &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/13_2.jpg" target=_blank mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/13_2.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=167 alt=13 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/13_thumb.jpg" width=425 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/13_thumb.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Last quiz question: What would happen then if I tried to start “Blank” – will it start or not? After all, it has already been allocated a MAC address ending 6A-00. &lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=243 alt=14 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/14_3.jpg" width=386 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVMACAddressallocationandapparentnet_11795/14_3.jpg"&gt; &lt;/P&gt;
&lt;P&gt;Actually, we will detect this as you can see above and stop the virtual machine from powering on. So in some ways, on a single Hyper-V enabled server, we’re relatively immune to duplicate MAC addresses across virtual machines running on a single server. However, due to the algorithm for choosing the ranges of MAC addresses, while relatively safe, there is no guarantee of being unique across an entire network. And of course, chances are that you will want packets from or to virtual machines on a Hyper-V server to “hit” the physical network. &lt;/P&gt;
&lt;P&gt;So hopefully that gives you a better idea why it is important to manage MAC addresses across multiple servers in a virtual machine environment. While the walkthrough above was specific to Hyper-V, the same types of issues could arise in Virtual Server. &lt;/P&gt;
&lt;P&gt;Cheers, &lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3089383" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/Network+Infrastructure+Systems/default.aspx">Network Infrastructure Systems</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Articles/default.aspx">Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Virtual+Server/default.aspx">Virtual Server</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>Hyper-V: RTM available on Windows Update</title><link>http://blogs.technet.com/jhoward/archive/2008/07/09/hyper-v-rtm-available-on-windows-update.aspx</link><pubDate>Wed, 09 Jul 2008 16:37:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3086165</guid><dc:creator>jhoward</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3086165.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3086165</wfw:commentRss><description>&lt;P&gt;Just a quick note to mention that Hyper-V RTM (KB950050) was made available on Windows Update yesterday. &lt;IMG src="http://blogpics.dyndns.org/2008-jul-rtm-on-wsus.jpg" mce_src="http://blogpics.dyndns.org/2008-jul-rtm-on-wsus.jpg"&gt; &lt;/P&gt;
&lt;P&gt;See &lt;A class="" href="http://blogs.technet.com/jhoward/archive/2008/06/26/hyper-v-rtm-announcement-available-today-from-the-microsoft-download-centre.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2008/06/26/hyper-v-rtm-announcement-available-today-from-the-microsoft-download-centre.aspx"&gt;here&lt;/A&gt; for more information on the RTM release. Note that the Vista SP1 management tools are not currently available through Windows Update and need to be upgraded seperately.&lt;/P&gt;
&lt;P&gt;It's a "recommended" update.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVRTMavailableonWindowsUpdate_5D3C/WSUS%20RTM_1.jpg" mce_href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVRTMavailableonWindowsUpdate_5D3C/WSUS%20RTM_1.jpg"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=267 alt="WSUS RTM" src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVRTMavailableonWindowsUpdate_5D3C/WSUS%20RTM_thumb_1.jpg" width=410 border=0 mce_src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/HyperVRTMavailableonWindowsUpdate_5D3C/WSUS%20RTM_thumb_1.jpg"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Cheers, &lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3086165" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Downloads/default.aspx">Downloads</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item><item><title>Deploying Windows Vista SP1 with "slipstreamed" Hyper-V RTM. Part 3.</title><link>http://blogs.technet.com/jhoward/archive/2008/07/03/deploying-windows-vista-sp1-with-slipstreamed-hyper-v-rtm-part-3.aspx</link><pubDate>Thu, 03 Jul 2008 17:32:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3079744</guid><dc:creator>jhoward</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.technet.com/jhoward/comments/3079744.aspx</comments><wfw:commentRss>http://blogs.technet.com/jhoward/commentrss.aspx?PostID=3079744</wfw:commentRss><description>&lt;P&gt;The first two parts of this mini-series dealt with deploying Windows Server 2008 – either as the &lt;A class="" href="http://blogs.technet.com/jhoward/archive/2008/06/30/deploying-windows-server-2008-with-slipstreamed-hyper-v-rtm-part-2.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2008/06/30/deploying-windows-server-2008-with-slipstreamed-hyper-v-rtm-part-2.aspx"&gt;root partition&lt;/A&gt; with the RTM Hyper-V role enabled, or as a &lt;A class="" href="http://blogs.technet.com/jhoward/archive/2008/06/26/deploying-windows-server-2008-with-slipstreamed-hyper-v-rtm-part-1.aspx" mce_href="http://blogs.technet.com/jhoward/archive/2008/06/26/deploying-windows-server-2008-with-slipstreamed-hyper-v-rtm-part-1.aspx"&gt;child partition&lt;/A&gt; (virtual machine) with the Hyper-V RTM Integration Services installed. This third part covers an additional step for using the same technique for deploying Windows Vista SP1.&lt;IMG src="http://blogpics.dyndns.org/2008-jul-deploy-part3.jpg"&gt; &lt;/P&gt;
&lt;P&gt;The Windows Vista SP1 Integration Services for Hyper-V RTM are in a different KB and included in vmguest.iso which holds the Integration Services in Hyper-V. Currently, there isn’t a separate download available, but you can extract it really easily if you have a Windows Server 2008 machine up and running with the Hyper-V role enabled. There are a number of tools available to extract from ISOs, but let’s do this a slightly different way by using a virtual machine itself – remember that ISOs can be mounted in virtual machines directly.&lt;/P&gt;
&lt;P&gt;Below is a Windows Server 2008 virtual machine with vmguest.iso mounted in its virtual CD/DVD device. (vmguest.iso resides on the parent partition file system under \windows\system32\language). Notice that there are a couple of .MSU packages under \support\amd64 and \support\x86. We need two files for KB950214: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;\support\amd64\Windows6.0-KB950214-x64.msu and &lt;/LI&gt;
&lt;LI&gt;\support\x86\Windows6.0-KB950214-x86.msu&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/DeployingWindowsVistaSP1withslipstreame_9CA5/1_2.jpg" target=_blank&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=212 alt=1 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/DeployingWindowsVistaSP1withslipstreame_9CA5/1_thumb.jpg" width=244 border=0&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;BR&gt;I’ve taken a copy of these across to the WDS server to work on. I can use the same process as for the first part in this series to insert the package into a Windows Vista SP1 Business x64 WIM. You’ll probably want to add KB950214 (unpublished) for the Hyper-V RTM Integration Services and &lt;A class="" href="http://support.microsoft.com/kb/952627" mce_href="http://support.microsoft.com/kb/952627"&gt;KB952627&lt;/A&gt; for the Vista SP1 Hyper-V RTM Management Tools. The latter is available as a separate download from the links below, and is not present on vmguest.iso&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=BF909242-2125-4D06-A968-C8A3D75FF2AA" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=BF909242-2125-4D06-A968-C8A3D75FF2AA"&gt;x86&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;&lt;A class="" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=88208468-0AD6-47DE-8580-085CBA42C0C2" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyId=88208468-0AD6-47DE-8580-085CBA42C0C2"&gt;x64&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/DeployingWindowsVistaSP1withslipstreame_9CA5/2_2.jpg" target=_blank&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=206 alt=2 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/DeployingWindowsVistaSP1withslipstreame_9CA5/2_thumb.jpg" width=244 border=0&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Please also take careful note of the warning I put in my first post in this series about the /s: parameter to pkgmgr&lt;/P&gt;
&lt;P&gt;Remember to use an elevated Windows PE Tools Command Prompt for the packaging steps and choose the right architecture MSU for the WIM you are updating! Now you just need to make sure that WIM is present in WDS and deploy a virtual machine (or indeed a physical machine).&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/DeployingWindowsVistaSP1withslipstreame_9CA5/3_2.jpg" target=_blank&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=97 alt=3 src="http://blogs.technet.com/blogfiles/jhoward/WindowsLiveWriter/DeployingWindowsVistaSP1withslipstreame_9CA5/3_thumb.jpg" width=244 border=0&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Cheers, &lt;BR&gt;John.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3079744" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/jhoward/archive/tags/Articles/default.aspx">Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/How+to+Articles/default.aspx">How to Articles</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Information/default.aspx">Information</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/jhoward/archive/tags/Hyper-V/default.aspx">Hyper-V</category></item></channel></rss>