How to partition and format disks in Microsoft Hyper-V Server 2012 R2

In Windows, FDisk has been replaced by DiskPart. “DiskPart commands help you to manage your PC’s drives (disks, partitions, volumes, or virtual hard disks). Before you can use DiskPart commands, you must first list, and then select an object to give it focus. When an object has focus, any DiskPart commands that you type will act on that object.” — (Microsoft TechNet).

For example, to create a single primary partition covering the whole second drive, format it as NTFS, label the partition “Virtual Machines” and assign it drive letter E using DiskPart:

list disk
select Disk 1
list partition
create partition primary
list partition
format fs=ntfs label="Virtual Machines" quick
list volume
assign letter=e

For example, to create another primary partition on the first disk using all of the available disk space, format is as NTFS, label it as Temp and assign it drive letter F using DiskPart:

select Disk 0
list partition
create partition primary
format fs=ntfs label="Temp" quick
list volume
assign letter=f


For example, here’s a script that wipes a disk and then creates a 500 MB partition:

select disk 0
convert gpt
create partition primary size=300
format quick fs=ntfs label="Tools"
assign letter="T"

Use Diskpart /s to run scripts that automate disk-related tasks, such as creating volumes or converting disks to dynamic disks. Scripting these tasks is useful if you deploy Windows by using unattended Setup or the Sysprep tool, which do not support creating volumes other than the boot volume. To create a Diskpart script, create a text file that contains the Diskpart commands that you want to run, with one command per line, and no empty lines. You can start a line with REM to make the line a comment.

When using the DiskPart command as a part of a script, we recommend that you complete all of the DiskPart operations together as part of a single DiskPart script. You can run consecutive DiskPart scripts, but you must allow at least 15 seconds between each script for a complete shutdown of the previous execution before running the DiskPart command again in successive scripts. Otherwise, the successive scripts might fail. You can add a pause between consecutive DiskPart scripts by adding the timeout /t 15 command to your batch file along with your DiskPart scripts.

When DiskPart starts, the DiskPart version and computer name display at the command prompt. By default, if DiskPart encounters an error while attempting to perform a scripted task, DiskPart stops processing the script and displays an error code (unless you specified the noerr parameter). However, DiskPart always returns errors when it encounters syntax errors, regardless of whether you used the noerr parameter. The noerr parameter enables you to perform useful tasks such as using a single script to delete all partitions on all disks regardless of the total number of disks.” — (Microsoft TechNet).

To run a DiskPart script, at the command prompt, type the following command, where scriptname is the name of the text file that contains your script:

diskpart /s scriptname.txt

To redirect DiskPart’s scripting output to a file, type the following command, where logfile is the name of the text file where DiskPart writes its output:

diskpart /s scriptname.txt > logfile.txt
Posted in How To, Management, Virtualization | Tagged , , | Comments Off

How to add or remove a local user account to a local group in Microsoft Hyper-V Server 2012 R2

The simplest way to add a local user account to a local group in Microsoft Hyper-V Server 2012 R2 is using the NET command:

NET LOCALGROUP "group" "username" /ADD

To remove a local user account from a group:

NET LOCALGROUP "group" "username" /DELETE


Posted in How To, Management, Virtualization | Tagged , , | Comments Off

How to create or delete a local user account in Microsoft Hyper-V Server 2012 R2

The simplest way to create or add a local user account in Microsoft Hyper-V Server 2012 R2 is using the NET command:

NET USER username "password" /ADD

To delete or remove a local user account:



Posted in How To, Management, Virtualization | Tagged , , | Comments Off

How to enable Remote Desktop (RDP) access in Microsoft Hyper-V Server 2012 R2

Out of the box, Remote Desktop access is disabled in Microsoft Hyper-V Server 2012 R2. This post provides a quick overview of the steps necessary for enabling RDP access to Hyper-V Server.


Option 7 in the Server Configuration menu provides a simple way of enabling Remote Desktop access:

(E)nable or (D)isable Remote Desktop? (Blank=Cancel)
1) Allow only clients running Remote Desktop with Network Level Authentication (more secure)
2) Allow clients running any version of Remote Desktop (less secure)


Selecting these options is not enough to enable Remote Desktop access — firewall rules must be changed as well. Running the following command from the command line will change the firewall rules:

netsh advfirewall firewall set rule group="Remote Desktop" new enable=yes


Posted in How To, Management, Virtualization | Tagged , , , , , | Comments Off

“No active network adapters found” warning in Microsoft Hyper-V Server 2012 R2

The previous article provided a step-by-step screenshot guide of the Microsoft Hyper-V Server 2012 R2 installation process. After the setup process was finished, a warning window popped up while the Server Configuration text-based menu was loading:

Warning – No active network adapters found.


While this warning message will pop up anytime there is no physical network connection during the startup of sconfig.cmd, in this particular case, the network adapter is present and a patch cable connects it to the network switch, as the link lights on both the NIC and the switch clearly indicate that a physical network connection has been made. Given that information and considering that Hyper-V Server was just setup — we can safely assume that it is simply missing the driver for this particular network adapter.

Hardware support and compatibility is where Hyper-V Server shines because of its Windows-based driver model, as opposed to VMware vSphere Hypervisor which takes the strictly certified hardware approach. To resolve the “No active network adapters found” warning in Microsoft Hyper-V Server 2012 R2, we simply need to load the missing network interface card (NIC) driver. The driver package can be downloaded from the manufacturer’s website on another computer and the files extracted to a USB flash drive. It’s great to see that upon plugging-in the USB flash drive into the system that Hyper-V Server mounts it and assigns it a drive letter just like any Windows system would.


To install the driver in Hyper-V Server 2012 R2 (or any Windows Server Core setup) Microsoft provides PnPUtil (PnPUtil.exe) command line tool that lets an administrator add or delete a driver package to the driver store, and enumerates the driver packages that are currently in the driver store. PnPUtil (PnPUtil.exe) is included in every version of Windows, starting with Windows Vista (in the %windir%\system32 directory).

PnPUtil -i -a Drive:\Path\Filename


Filename can specify the name of a single INF file, and names of all INF files, or only specific INF files by using the asterisk (‘*’) or question mark (‘?’) wildcard characters. To enumerate the driver packages that are currently in the driver store:

PnPUtil -e

Only driver packages that are not in-box packages are listed. An in-box driver package is one which is included in the default installation of Windows or its service packs.

Posted in Networking, Operating Systems, Virtualization | Tagged , , | 1 Comment

How to install Microsoft Hyper-V Server 2012 R2 step-by-step

This post provides a quick step-by-step walkthrough of installing Microsoft Hyper-V Server 2012 R2, the free bare-metal version of Microsoft’s hypervisor, that directly competes with VMware vSphere Hypervisor 5.5. At this point Microsoft Hyper-V can be considered mature technology, so one should not be surprised to see it gain some traction within the enterprise in the near future.

As illustrated by the screenshots below — the setup process is very straightforward. The only selections made during the installation process [other than the localization settings] were the disk and partition options. As a rule of thumb a 32 GB partition is more than enough space to run Hyper-V Server (350 MB System Reserved partition was created automatically during the setup process). After the installation completed, operating system and related files took up about 11 GB of disk space.

01_loading_files 03_localization

04_install_now 05_license_terms

06_install_type 07_where_to_install

08_create_32gb 09_partitions

10_progress 11_restarting

12_getting_ready 13_password_must_change

14_password_change 15_password_changed

16_no_active_adapters 17_sconfig

As you may have noticed from the screenshots, a warning window popped up while the Server Configuration text-based menu was loading:

Warning – No active network adapters found.

Since in the case of this particular system, the adapter is present and a patch cable connects it to the network switch (link lights on both the NIC and the switch clearly indicate that a physical network connection has been made), we can safely assume that Hyper-V Server is simply missing the driver for this particular network adapter. Read more about this issue in my next article

Posted in How To, Virtualization | Tagged , , | Comments Off

Microsoft Hyper-V vs. VMware vSphere update

A while ago, it was suggested to me to never discount Microsoft’s ability to innovate, or their business savvy. Time after time Microsoft has introduced products into a space with an obvious market leader, yet it’s Microsoft’s products that we use today. Here is a quick reminder of a few famous bouts they have fought:

  • Word Processor: WordPerfect vs. Word
  • Spreadsheet: Lotus 1-2-3 vs. Excel
  • Database: dBase vs. Access
  • Browser: Netscape vs. Internet Explorer
  • Network Operating System: Novell NetWare vs. Windows NT

Just a couple of years ago VMware seemed to be the clear leader in the virtualization space. Today the picture is somewhat different, as Microsoft clearly has VMware in its sights:

  • Desktop: VMware Workstation 10 vs. Microsoft Windows 8.1 Professional/Enterprise
  • Server: VMware vSphere 5.5 vs. Microsoft Windows Server 2012 R2 Standard/Datacenter
  • Free: VMware vSphere Hypervisor 5.5 vs. Microsoft Hyper-V Server 2012 R2

Feature-for-feature Microsoft’s Hyper-V is now on par, or arguably has already surpassed VMware’s hypervisor, especially if the guest OS being virtualized is Windows 2012. From a hardware standpoint Microsoft offers much broader support, but what’s more interesting is the licensing strategy and the positioning of its products.

Remember good old Microsoft Office? It bundles Word, Excel and Access into one convenient and easy to purchase license. Bundling and integration is the nature of the game here. On the desktop end, we now have the ability to virtualize, as well as use Hyper-V management tools, by simply adding the Hyper-V feature in Windows 8.1 Professional/Enterprise – no additional licensing required. [So there is definitely no need to license a copy of VMware Workstation.]

On the server end, getting into virtualization is once again as simple as adding the Hyper-V role to Windows Server. Microsoft also threw in a licensing bonus here. Windows Server 2012 R2 Standard includes two virtualized Windows Server 2012 R2 licenses, and Windows Server 2012 R2 Datacenter includes unlimited number of virtualized Windows Server 2012 R2 licenses. Licensing costs are definitely something most enterprises will be looking at.

Finally there is the free tier of both Hyper-V and vSphere hypervisors, which is actually being heavily utilized by many smaller companies. Microsoft presents Hyper-V Server 2012 R2 as the solution for desktop virtualization or VDI. It does not bundle any server licenses, nor does it include the basic management interface (management is either via PowerShell, or via console tools running on a Windows 8.1/Windows Server 2012 R2 box). As such you are expected to license each guest OS separately, while the host hypervisor is completely free. This is on par with VMware’s vSphere Hypervisor 5.5 offering.

VMware is clearly seeing the shots across its bow, as of the current writing the limitation of 32GB RAM limit per server/host has been removed from the free hypervisor. It now also supports unlimited number of cores per physical CPU, and unlimited number of physical CPUs per host. On the VM level Microsoft Hyper-V seems to be technically more capable, although one is not certain how likely we are in the real world to encounter such limits as virtual CPUs per VM (64 vs. 8), memory per VM (1TB vs. 32GB), or active VMs per Host (1,024 vs. 512).

A couple of features Microsoft Hyper-V Server 2012 R2 offers that VMware vSphere Hypervisor 5.5 does not, are clustering and nothing-in-common live migration. Add to that the fact that the virtual machine image format (VHD) is the same as the one utilized by the Azure cloud offering, and things are starting to get very interesting. Of the top of your head can you name the company behind dBase? Wondering if anyone will be able to name the company behind vSphere 15 years from now?

Posted in Operating Systems, Virtualization | Tagged , , , , , , , , , , , , | 1 Comment

Open Source as a marketing gimmick

Open source is free and open to innovation. It’s what the people want! It just sounds cool. Obviously by this point the marketing people have arrived. It seems that there is a new marketing trend to declare products open source (“open source ready” to be exact), where as in reality there is not much open about them.

Last year I mentioned the Netgear N300 Wireless Gigabit Router (WNR3500Lv2) marketed by Netgear as “Open-source router for Linux developers and opensource enthusiasts.” Since that time Linksys came out with a competing offering — the Linksys WRT1900AC. As Linksys describes it: “While the Linksys WRT1900AC provides an outstanding experience via SMART Wi-Fi immediately out of the box, advanced users can further modify the router, which will have Open Source firmware available. Developed for use with OpenWRT, an open source, Linux-based operating system, the router offers an additional layer of customization to suit an individual’s needs.”
Now it is interesting to note that neither router is actually supported by the common open source distributions such as DD-WRT or OpenWRT. Furthermore it is not clear whether these will be supported at all by the open source community in the future. The latest info on the OpenWRT website states that: “WRT1900AC was announced on 6th of January 2014 as a router developed to be used with OpenWrt. Despite Linksys announcement of working with OpenWrt community no patches and no info was shared.”
Linksys WRT1900AC
At the time of this writing, neither router is fully supported or embraced by the open source community. The source of the problem (no pun intended) is the fact that neither Netgear nor Linksys have released the documentation for their hardware. It is also quite likely that due to legal agreements they are not able to release the documentation for the actual chipsets, as it is most likely the intellectual property of Broadcom and Marvell, and not of Netgear and Linksys respectively. Netgear WNR3500Lv2 is based on the Broadcom BCM5357 chipset. Linksys WRT1900AC is based on the Marvell MV78230.
Buffalo WZR-HP-G450H
Buffalo Technology and Asus also claim to have a number of open source routers in their product lineup. In the case of Buffalo it is close to the truth, if you consider such products as the AirStation HighPower N450 Gigabit DD-WRT Wireless Router (WZR-HP-G450H). It indeed ships with DD-WRT firmware (v24sp2-20025 dated 2012-10-09), but this is a Buffalo branded DD-WRT firmware — meaning Buffalo paid the DD-WRT developer to custom build this version. No community support and no future firmware versions are anticipated.

Yes, we now take for granted the standardization offered to us by the x86 platform. No such luck yet in the open source router world. Yes, the form factor and the price point are not there, but perhaps our efforts are better spent developing software for a more open platform such as x86, rather than trying to reverse engineer low end routers from various manufacturers with 12 month product lifecycles.

Posted in Hardware, Networking | Tagged , , , , , , , , , , | Comments Off

How to set the fully qualified domain name (FQDN) in Ubuntu 12.04 LTS

To set the fully qualified domain name (FQDN) for a Ubuntu 12.04 LTS host, one needs to edit the /etc/hosts file. Please note that the FQDN is specified in the hosts file and not the /etc/hostname file. In the following example the fully qualified domain name is, where myhost is the host’s name and is the domain name. Use vi to edit the hosts file:

sudo vi /etc/hosts

Use the insert (i) command to enter edit mode in vi and modify the following value: myhost

Change it to and save the file using Escape and :x vi command: myhost

Now test your configuration:


Should return the value:


And this command:

hostname -f

Should return the value:

Please note the process to set the FQDN in the current 13.10 release is the same as in the 12.04 LTS version.

For additional information take a look at the official Ubuntu documentation:

Posted in How To, Management, Operating Systems | Tagged , , , , | Comments Off

How to get better Google ranking and improve SEO by configuring WordPress permalink settings

The following graph shows summary statistics for visitors and page views of this blog over a period of one year (July 2012 — July 2013). As you can see the visitor count was fairly steady throughout the year, with a sudden drop off in April/May 2013, followed by an exponential increase in traffic week-over-week since that point in time.


As you may guess from this post’s title — the visitor traffic pattern has changed back in May due to the fact that I adjusted the WordPress permalink settings. A bit of background info about permalinks: “By default WordPress uses web URLs which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URL structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links.”

Around the time when I started this blog, I also signed up for Twitter. Back then, I was too lazy to look for a good URL shortner, which was required at the time if you wanted to post links on Twitter. Now of course the URL shortner is built into Twitter and is automatically embedded into every link in order to obtain detailed traffic analytics (which is what Twitter is trying to monetize). In any case, back then I chose a Numeric structure ( for my permalinks. I thought it would look cleaner, be less prone to spelling mistakes, and easier to send via email.


Sometime back in April (2013), while listening to Mark Suster on This Week in Venture Capital, I heard him mention that one well know Search Engine Optimization (SEO) trick was to use full post names in the permallinks (, as these were much better indexed by search engines such as Google. I gave it some thought and went ahead and made the change.


As you can see from the graph there was an immediate drop off in visits and page views right after the change. That’s expected, as almost all the URLs on the site have changed. Then the search engines reindexed the site and the daily visitor count started growing exponentialy, doubling in the first month and tripling in the second. It is very safe to say that the above described SEO trick works really well. On the same note, improved tag values seem to help with SEO as well. I am using a lot more tags now to describe each post.

On a final note, I am including a quote from the Google PageRank FAQ: “In general, webmasters can improve the rank of their sites by creating high-quality sites that users will want to use and share. Sites’ positions in Google search results are determined based on hundreds of factors designed to provide end-users with helpful, accurate search results.”

Posted in How To | Tagged , , , , , , , | Comments Off