<?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>Brad Rutkowski's Blog : Virtualization</title><link>http://blogs.technet.com/brad_rutkowski/archive/tags/Virtualization/default.aspx</link><description>Tags: Virtualization</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>2 things: Tell if a server is server core remotely. Tell if a server is a VM remotely. (C#)</title><link>http://blogs.technet.com/brad_rutkowski/archive/2008/03/07/2-things-tell-if-a-server-is-server-core-remotely-tell-if-a-server-is-a-vm-remotely.aspx</link><pubDate>Fri, 07 Mar 2008 23:54:49 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2975077</guid><dc:creator>Brad Rutkowski</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/brad_rutkowski/comments/2975077.aspx</comments><wfw:commentRss>http://blogs.technet.com/brad_rutkowski/commentrss.aspx?PostID=2975077</wfw:commentRss><description>&lt;p&gt;I've been messing around over the last week making a tool that will frisk a remote machine.&amp;#160; It's been a fun project, a couple of items I got hung up on were if the machine was server core and if it was a VM. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I mean who would knowingly TS to a server if they knew it was server core?&amp;#160; As for the VM, it's nice to know before-hand so you dont request a debugger to be attached to a virtual server ;).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Well here are some snippets for those two things, hope it helps those trying to do similar queries...&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Server Core:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Basically you just need to look at the OperatingSystemSKU value and if it E (hex) or 14 (decimal) then its server core.&amp;#160; This and all the other SKU numbers are listed here: &lt;a title="http://msdn2.microsoft.com/en-us/library/ms724358.aspx" href="http://msdn2.microsoft.com/en-us/library/ms724358.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms724358.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;System.Management.ConnectionOptions objconn = new System.Management.ConnectionOptions();    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; objconn.Impersonation = System.Management.ImpersonationLevel.Impersonate;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; objconn.EnablePrivileges = true;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.Management.ManagementScope exmangescope = new System.Management.ManagementScope(@&amp;quot;\\&amp;quot; + srvName + @&amp;quot;\root\cimv2&amp;quot;, objconn);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.Management.ObjectQuery objquery = new System.Management.ObjectQuery(&amp;quot;SELECT * FROM Win32_OperatingSystem&amp;quot;);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.Management.ManagementObjectSearcher objsearch = new System.Management.ManagementObjectSearcher(exmangescope, objquery);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; System.Management.ManagementObjectCollection queryCollection = objsearch.Get();     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; foreach (System.Management.ManagementObject stringer in queryCollection)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; serverCoreval = stringer[&amp;quot;OperatingSystemSKU&amp;quot;].ToString();     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //Console.WriteLine(serverCoreval);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Virtual Machine:&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;em&gt;If the VM is either Vista/Windows 2008 it's a simple reg query:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;if (buildInt &amp;gt;= 6000)    &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; sysInfo = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, srvName).OpenSubKey(@&amp;quot;SYSTEM\CurrentControlSet\Control\SystemInformation&amp;quot;).GetValue(&amp;quot;SystemProductName&amp;quot;).ToString(); &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; if (sysInfo.Contains(&amp;quot;Virtual&amp;quot;))    &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; vmCheck = 1;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;  &lt;p&gt;}&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;If the VM is downlevel then it's a WMI query&lt;/strong&gt;&lt;/em&gt; &lt;/p&gt;  &lt;p&gt;else if (buildInt == 3790)    &lt;br /&gt;{     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; System.Management.ConnectionOptions objconn = new System.Management.ConnectionOptions();     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; objconn.Impersonation = System.Management.ImpersonationLevel.Impersonate;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; objconn.EnablePrivileges = true;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; System.Management.ManagementScope exmangescope = new System.Management.ManagementScope(@&amp;quot;\\&amp;quot; + srvName + @&amp;quot;\root\cimv2&amp;quot;, objconn);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; System.Management.ObjectQuery objquery = new System.Management.ObjectQuery(&amp;quot;SELECT * FROM Win32_ComputerSystem&amp;quot;);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; System.Management.ManagementObjectSearcher objsearch = new System.Management.ManagementObjectSearcher(exmangescope, objquery);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; System.Management.ManagementObjectCollection queryCollection1 = objsearch.Get();     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; foreach (System.Management.ManagementObject stringer in queryCollection1)     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sysInfo = stringer[&amp;quot;Model&amp;quot;].ToString();     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; //System.Console.WriteLine(sysinfo);     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; if (sysInfo.Contains(&amp;quot;Virtual&amp;quot;))     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; {     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; vmCheck = 1;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; }&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:c9e9fd5b-c54b-42e8-96c3-da7c3a9bfd14" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/windows%202008" rel="tag"&gt;windows 2008&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Server%20Core" rel="tag"&gt;Server Core&lt;/a&gt;,&lt;a href="http://technorati.com/tags/C#" rel="tag"&gt;C#&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Virtualization" rel="tag"&gt;Virtualization&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2975077" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/brad_rutkowski/archive/tags/Business+up+front/default.aspx">Business up front</category><category domain="http://blogs.technet.com/brad_rutkowski/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/brad_rutkowski/archive/tags/Virtualization/default.aspx">Virtualization</category><category domain="http://blogs.technet.com/brad_rutkowski/archive/tags/C_2300_/default.aspx">C#</category></item><item><title>Does my CPU support hardware virtualization (Hyper-V)</title><link>http://blogs.technet.com/brad_rutkowski/archive/2008/01/26/does-my-cpu-support-hardware-virtualization-hyper-v.aspx</link><pubDate>Sat, 26 Jan 2008 08:37:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:2782749</guid><dc:creator>Brad Rutkowski</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.technet.com/brad_rutkowski/comments/2782749.aspx</comments><wfw:commentRss>http://blogs.technet.com/brad_rutkowski/commentrss.aspx?PostID=2782749</wfw:commentRss><description>&lt;P&gt;As the &lt;A href="http://www.microsoft.com/mscorp/execmail/2008/01-21virtualization.mspx" target=_blank mce_href="http://www.microsoft.com/mscorp/execmail/2008/01-21virtualization.mspx"&gt;talk about hardware virtualization heats up&lt;/A&gt; from Microsoft and others you might find yourself wondering if the current hardware you're running supports it.&amp;nbsp; My HP xw9300 workstation doesn't (older AMD Opterons), but it looks like my xw8400 does (Intel Xeon 5150s).&lt;/P&gt;
&lt;P&gt;&lt;IMG height=301 src="http://i149.photobucket.com/albums/s62/brad9987/VIRT.jpg" width=394 mce_src="http://i149.photobucket.com/albums/s62/brad9987/VIRT.jpg"&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;More info on programs you can use (including the one above) found here: &lt;A title=http://blogs.msdn.com/volkerw/archive/2007/05/21/hardware-virtualization-check-utility.aspx href="http://blogs.msdn.com/volkerw/archive/2007/05/21/hardware-virtualization-check-utility.aspx" mce_href="http://blogs.msdn.com/volkerw/archive/2007/05/21/hardware-virtualization-check-utility.aspx"&gt;http://blogs.msdn.com/volkerw/archive/2007/05/21/hardware-virtualization-check-utility.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://weblog.infoworld.com/virtualization/archives/2008/01/determine_virtu.html" target=_blank mce_href="http://weblog.infoworld.com/virtualization/archives/2008/01/determine_virtu.html"&gt;Determine Virtualization Readiness in 3 Seconds&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Some other tidbits of info:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Hyper-V requires to be running on a 64bit OS, so do'nt install the x86 version of Wink28 if you want to use it.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Hyper-V (Virtual Server) is a server role in Win2k8, you just add it in server manager&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;Buy the addition with Hyper-V if you want to use it&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;You can have 64bit VMs, I threw on Win2k3 x64 and Win2k8 x64 on my box.&lt;/LI&gt;
&lt;LI&gt;Your VMs can see more than one logical proc.&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;At the time of this post the VM had to be Win2k8 as well, downlevel can only see one proc.&amp;nbsp; My x64 Win2k8 VM can see four procs now!&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;Have to enable Hardware virtualization in the BIOS as well as DEP, the role will still install but when you try to start the VM you'll hit a problem.&lt;/LI&gt;
&lt;LI&gt;To install the additions the VM has to be running WIn2k3 SP2, if not you might find yourself without a NIC until you get the additions installed.&amp;nbsp; You can add a legacy NIC if you find yourself in this situation.&lt;/LI&gt;
&lt;LI&gt;If you just import an old VM VHD from one of your other servers, make sure its an ACPI-compatible one.&lt;/LI&gt;
&lt;LI&gt;If you are looking to install hyper-v on a server running active directory, stop.&amp;nbsp; You won't be able to boot your DC anymore (see below)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;EM&gt;If you install the Active Directory Domain Services role and use the Active Directory Domain Services Installation Wizard (dcpromo.exe) to configure that role on the same physical computer on which the Hyper-V role is installed, you will receive a STOP error message 7B on the physical computer when you try to start a virtual machine. &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;To avoid this issue, do not install Active Directory Domain Services and Hyper-V on the same physical computer.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.microsoft.com/windowsserver2008/virtualization/default.mspx" target=_blank mce_href="http://www.microsoft.com/windowsserver2008/virtualization/default.mspx"&gt;Microsoft Hyper-V site&lt;/A&gt; to find out more info if you like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;Update:&lt;/STRONG&gt;&amp;nbsp; Looks like AMD has released a tool help out here: &lt;A href="http://blogs.msdn.com/virtual_pc_guy/archive/2008/03/31/amd-releases-hyper-v-check-tool.aspx"&gt;http://blogs.msdn.com/virtual_pc_guy/archive/2008/03/31/amd-releases-hyper-v-check-tool.aspx&lt;/A&gt;&lt;/P&gt;
&lt;DIV class=wlWriterSmartContent id=scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a0394130-7e60-487a-95b2-6d3802fabb57 style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;Technorati Tags: &lt;A href="http://technorati.com/tags/Hyper-V" rel=tag mce_href="http://technorati.com/tags/Hyper-V"&gt;Hyper-V&lt;/A&gt;,&lt;A href="http://technorati.com/tags/Windows%202008" rel=tag mce_href="http://technorati.com/tags/Windows%202008"&gt;Windows 2008&lt;/A&gt;,&lt;A href="http://technorati.com/tags/Virtualization" rel=tag mce_href="http://technorati.com/tags/Virtualization"&gt;Virtualization&lt;/A&gt;&lt;/DIV&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=2782749" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/brad_rutkowski/archive/tags/Business+up+front/default.aspx">Business up front</category><category domain="http://blogs.technet.com/brad_rutkowski/archive/tags/Windows+Server+2008/default.aspx">Windows Server 2008</category><category domain="http://blogs.technet.com/brad_rutkowski/archive/tags/Virtualization/default.aspx">Virtualization</category><category domain="http://blogs.technet.com/brad_rutkowski/archive/tags/CPU/default.aspx">CPU</category></item><item><title>Debugging a virtual machine with VMRCPlus</title><link>http://blogs.technet.com/brad_rutkowski/archive/2007/08/08/debugging-a-virtual-machine-with-vmrcplus.aspx</link><pubDate>Wed, 08 Aug 2007 08:26:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:1720828</guid><dc:creator>Brad Rutkowski</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/brad_rutkowski/comments/1720828.aspx</comments><wfw:commentRss>http://blogs.technet.com/brad_rutkowski/commentrss.aspx?PostID=1720828</wfw:commentRss><description>&lt;P&gt;This is how it should look, at least this is what's working for me.&amp;nbsp; Loving &lt;A title="VMRC Baby!" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=80adc08c-bfc6-4c3a-b4f1-772f550ae791&amp;amp;DisplayLang=en" target=_blank mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=80adc08c-bfc6-4c3a-b4f1-772f550ae791&amp;amp;DisplayLang=en"&gt;VMRC&lt;/A&gt; BTW.&amp;nbsp; I'm kind of doc'ing this for myself as more and more virtual machines are coming online and we're asked to debug them and I never can remember the syntax.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;On the Virtual machine set it up for debug:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Pre-Vista that would mean adding this to the boot.ini: /debug /debugport=com1 /baudrate=115200&lt;/P&gt;
&lt;P&gt;Post-Vista that would mean using bcdedit: bcdedit /dbgsettings SERIAL DEBUGPORT:1 BAUDRATE:115200&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;On the Virtual server/Virtual PC side:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The client machine should look like this:&lt;/P&gt;
&lt;P&gt;&lt;IMG height=410 src="http://i149.photobucket.com/albums/s62/brad9987/VMRC_debug.jpg" width=500 mce_src="http://i149.photobucket.com/albums/s62/brad9987/VMRC_debug.jpg"&gt; &lt;/P&gt;
&lt;P&gt;And then you connect to it from the command prompt like so:&lt;/P&gt;
&lt;P&gt;&lt;FONT face=cour size=4&gt;kd -k com:port=\\.\pipe\debug1,pipe,baud=115200,resets=0,reconnect&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=1720828" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/brad_rutkowski/archive/tags/Virtualization/default.aspx">Virtualization</category><category domain="http://blogs.technet.com/brad_rutkowski/archive/tags/Cool+Tools/default.aspx">Cool Tools</category></item></channel></rss>