I believe in Hyper-V!

MicrosoftCategory Archives

Convert VMWare image to Hyper-V and stay there forever ;)

Everyone knows that we can convert VMWare virtual machines to Hyper-V with the System Center Virtual Machine Manager 2012 or 2008 R2 through the virtual-to-virtual (V2V) machine conversion process. How to do that you can read here.

But, what to do if we don’t have VMM?
For example; I need convert a few virtual machines from VMWare Workstation (XP, Server 2003 and one Server 2008 R2) to Hyper-V and that VMs I need import on my laptop with Hyper-V role and Windows 8 RP installed.

Here is a small how to:

Step 1.

Uninstall VM tools from your virtual machine. Log into virtual machine, open Control Panel –> Programs and Features and click Uninstall.

Step 2.

Shutdown the virtual machine!
Usually your VMWare VMs are based on SCSI drives, because VMWare recommends SCSI, and the operating systems are Windows XP, Windows Server 2003 or earlier then you have to add then you have to add the IDE driver to your VM before you shut it down in VMWare.
Otherwise you will end up with a converted VM that starts up in Hyper-V with a blue screen of death (BSOD) and 0x0000007B – “Inaccessible Boot Device” error. This is due to the fact that your converted VM will have no Primary IDE Channel and Hyper-V will presume that your converted disk is IDE type and located on the Primary IDE Channel.
Doing a Windows Repair Install can fix the 0x7B Inaccessible Boot Device error – but it’s both time consuming and the result might not be good.

Please note that adding a temporary IDE disk to your VM is not necessary with VMs running Windows 7 or Windows 2008 R2 – they seem to detect the Primary IDE Channel during initial boot phase.

Step 3.

Add a new IDE disk drive to your VM. Make sure that you select “Adapter: IDE 0 Device: 0” under “Virtual Device Node” while creating the new disk (otherwise you might end up with yet another SCSI disk).
3

Step 4.

Boot up your virtual machine with both drives connected and check that it detects your new IDE drive (along with a primary IDE channel and a disk device driver). You should be able to see the new drive as “not initialized” in Disk Management.

Step 5.

Power off your virtual machine and remove the newly created IDE disk from your VM (you can delete it from disk as well). Do not power on your VMware Machine again!

Step 6.

Now convert your VMDK file to VHD format using the Vmdk2Vhd utility that can be downloaded from http://vmtoolkit.com.
1

Step 7.

Create a new Virtual Machine in Hyper-V. Make sure you select “Use an existing virtual hard disk” and select the VHD file that you just created.

Step 8.

Power it on, and reboot when prompted, also check device manager, and do another reboot.

Step 9.

Check that all your applications and services are running.

NOTE: As I mentioned before, If you have Windows Server 2008 R2 or Windows 7 VMs then it’s not necessary to add a temporary IDE disk during migration…

Enjoy migrating to Hyper-V, the best virtualization technology ever Winking smile.

New and updated functionality in Hyper-V 3.0

The Hyper-V technology virtualizes hardware to provide an environment in which you can run multiple operating systems at the same time on one physical computer. Hyper-V enables you to create and manage virtual machines and their resources. Each virtual machine is an isolated, virtualized computer system that can run its own operating system. The operating system that runs within a virtual machine is called Guest Operating System.

As you already know Hyper-V now is a part of Windows 8 operating system. This is great news because if we need virtual machines of our PCs now we don’t need to use alternative virtualization technologies, and now we have a great tool for virtualization in the house Winking smile.
The Hyper-V role is already known from servers operating system and we know what Hyper-V can do.

So, in this post I will explain what is new and what is updated in Hyper-V 3.0.

In the picture below you can see new and updated functionality in Hyper-V.

1

What’s new!

1. Hyper-V client – One surprising move was support for Hyper-V on the desktop. Hyper-V 3.0 is built in to the Windows 8. Hyper-V on the client will run directly on the system hardware, it will also support power-management functions such as sleep and hibernate state.

2. Hyper-V module for PowerShell – Hyper-V module for PowerShell includes more than 160 cmdlets to manage Hyper-V, virtual machines, and virtual hard disks. The availability of build-in Hyper-V cmdlets makes it easier to automate various operations than was possible in previous version of Hyper-V. The cmdlets names are consistent with other PowerShell cmdlets which makes it easier for users familiar with PowerShell to learn to use new cmdlets.
Hyper-V cmdlets are available after being installed. The cmdlets can be installed when you install the role, or as a feature available through the Remote Server Administration Tools.

3. Hyper-V Replica – This feature enables you to replicate virtual machines between storage systems, clusters, and data centers in two sites to provide business continuity and disaster recovery. This feature makes it easier and less expensive to plan and implement business continuity and disaster recovery solutions for your virtual machines, and the most important thing; Hyper-V replica is a disaster recovery solution for VMs that doesn’t require an expensive SAN. Hyper-V replica provides asynchronous replication of VMs from primary site to backup site without the need for specialized storage or networking device.

4. Resource metering – You can now track and gather data about physical processor, memory, storage, and network usage by specific virtual machines. You can determine the resource usage of specific virtual machines. You can use this data to perform capacity planning, to monitor consumption by different business units or customers, or to capture data needed to help redistribute the costs of running a workload. You can configure a virtual machine to measure the physical processor, memory, storage, and network usage, and then measure the usage periodically.

5. Simplified authorization – The Hyper-V Administrators group is introduced and is implemented as a local security group. This group can reduce the number of users that belong to the local Administrators group while providing users with access to Hyper-V. The Hyper-V Administrators group is a new local security group. Add users to this group instead of the local Administrators group to provide them with access to Hyper-V. Members of the Hyper-V Administrators have complete and unrestricted access to all features of Hyper-V.

6. SR-IOV – This new feature allows you to assign network adapter that supports single-root I/O virtualization (SR-IOV) directly to a virtual machine. Use of SR-IOV maximizes network throughput while minimizing network latency as well as the CPU overhead required for processing network traffic, and also you can provide a virtual machine with direct connectivity to a physical network adapter.

7. Storage migration – Live Migration was added to Hyper-V 2.0, which was introduced with Windows Server 2008 R2. It let you move VMs between hosts in the same cluster with no downtime. However, it was limited to performing a single Live Migration per occurrence, and migrating VM storage still required downtime. Hyper-V 3.0 addresses both of these problems by allowing for unlimited multiple concurrent Live Migrations as well as introducing Storage Live Migration.
This new feature makes it easier to manage the physical storage subsystems used by virtual machines. It is no longer necessary to take a virtual machine offline to move, maintain, or upgrade the underlying physical storage.

8. Storage on SMB 3.0 file shares – Hyper-V now supports use of SMB 3.0 file shares to provide storage for virtual machines. This feature provides a new way to provide virtual machines with shared storage, without use of a storage area network. You just specify a file share as the storage location for virtual machines.

9. Virtual Fibre Channel – This very cool new feature allows you to connect directly to Fibre Channel storage from within the guest operating system that runs in a virtual machine. This feature makes it possible to virtualize workloads and application that require direct access to Fibre Channel-based storage. It also makes it possible to configure clustering directly within the guest operating system. This feature makes host bus adapter (HBA) ports available within the guest operating system.

10. Virtual NUMA – A virtual NUMA topology is made available to the guest operating system in a virtual machine. Newer operating systems and high-performance applications such as SQL Server include optimizations that recognize a computer’s NUMA topology to increase performance by considering NUMA when scheduling threads or allocating memory. The virtual NUMA feature makes it possible for the guest operating system and NUMA-aware applications running in the virtual machine (such as SQL Server) to take advantage of these performance optimizations. A virtual NUMA topology is made available to the guest operating system. The default virtual NUMA topology is optimized to match the NUMA topology of physical computer.

Besides the above there are a few new features worth mentioning!

VMs with 64 vCPUs, VMs with 1TB of RAM, 64TB VHDX format, Extensible virtual switch, 63 node clusters, Support for native NIC teaming…

What’s updated!

1. Dynamic Memory – Dynamic Memory improvements include support for configuring minimum memory, and Smart Paging, which is a memory management technique to provide a reliable restart experience for virtual machines configured with less minimum memory than startup memory. These changes can help you improve your hardware utilization by making it more practical to run more virtual machines on a single physical computer at the same time. Memory resources can be allocated to virtual machines more efficiently, because you can configure a virtual machine with less minimum memory than startup memory without having to plan for enough memory to be available to restart the virtual machine.
You can now configure a virtual machine with minimum memory, using either Hyper-V Manager or the Set-VMMemory cmdlet. Smart Paging reduces the risk that a virtual machine might not be able to restart if a restart is required when there is not enough available physical memory. Smart Paging uses disk resources as additional, temporary memory when more memory is required to restart a virtual machine than the amount of memory currently allocated to a virtual machine. To minimize the potential performance impact of Smart Paging, HyperV uses it only when all of the following occurs:

  1. The virtual machine is being restarted.
  2. There is no available physical memory.
  3. No memory can be reclaimed from other virtual machines running on the host.

2. Importing of virtual machines – The import process has been updated to help you resolve configuration problems that would otherwise prevent a virtual machine from being imported. You also can import a virtual machine after copying the files manually, rather than exporting the virtual machine first. The import process has been simplified and is more reliable. Before this update was introduced, the import process copied a virtual machine and its files but did not check for configuration problems. Now, the import process has been redesigned to detect and help you correct certain configuration problems.

3. Live migration – It is now possible to perform a live migration in a non-clustered environment, as well as perform more than one live migration at the same time and use higher networks bandwidths. These improvements provide more flexibility in moving a running virtual machine by making it easier and faster to perform live migrations. You can now perform a live migration without setting up failover clustering and Cluster Shared Volumes.

4. Significantly increased scale and improved resiliency – This version of Hyper-V offers significantly larger compute and storage resources than was previously possible and improves the handling of hardware errors. These features help ensure that you can configure large, high-performance virtual machines to support workloads that might need to scale up significantly. The computer that runs Hyper-V in the Release Candidate of Windows Server 2012 can be configured with up to 320 logical processors and 4 terabytes (TB) of memory. Virtual machines can be configured with 64 virtual processors and 1 TB of memory. Improved handling of hardware errors increases the resiliency and stability of the virtualization environment.

5. Virtual hard disk format – The new format has been introduced to meet evolving requirements and take advantage of innovations in storage hardware. The new format increases the maximum storage size per virtual hard disk, as well as improves the stability and efficiency of those disks. A new virtual hard disk format (VHDX) supports up to 64 terabytes of storage. It also provides built-in protection from corruption stemming from power failures and prevents performance degradation on some large-sector physical disks.

6. Virtual machine snapshots – After a virtual machine snapshot is deleted, the storage space that the snapshot consumed before being deleted is now made available while the virtual machine is running. It is no longer necessary to shut down, turn off, or put the virtual machine into a saved state to recover the storage space. Operations that keep the virtual machine and any remaining snapshots synchronized after deleting a snapshot now occur while the virtual machine remains running. After those operations are complete, the files that contained the snapshots (.avhd files) are deleted. Previously, those operations did not occur while the virtual machine was running or paused.

7. Virtual switch – The architecture of the virtual switch has been updated to provide an open framework that allows third parties to add new functionality to the virtual switch. This change enables Microsoft partners to extend the virtual switch by providing new functionality such as monitoring, forwarding, and filtering into the virtual switch. The open architecture makes it possible to use extensions, which are implemented by using Network Device Interface Specification (NDIS) filter drivers and Windows Filtering Platform (WFP) callout drivers. These two public Windows platforms for extending Windows networking functionality are used as follows:

  • NDIS filter drivers are used to monitor or modify network packets in Windows.
  • WFP callout drivers allow independent software vendors (ISVs) to create drivers to filter and modify TCP/IP packets, monitor or authorize connections, filter IP security (IPsec)-protected traffic, and filter remote procedure calls (RPCs).

Resources: TechNet, WindowsITPro

The following provides additional resources for evaluating Hyper-V.

Ben Armstrong’s Virtual PC Guy’s WebLog
Hyper-V Portal on the TechNet Wiki
Install the Hyper-V Role and Configure a Virtual Machine
Building Your Cloud Infrastructure: Scenario Overview

In the next few blog posts I’ll describe how some of these features are working!

Cheers! Smile

Can’t create virtual machine in Windows 8 RP Hyper-V – Error:(0x80070569: Logon failure: the user has not been granted the requested logon type at this computer.)

Yesterday I tried to create virtual machine in Hyper-V on my newly installed Windows 8 Release Preview and I got a strange error: Error:0x80070569: Logon failure: the user has not been granted the requested logon type at this computer.

I need mention that I’m a domain user and local administrator on laptop. After a few hours of investigation I solved problem. How?
Open local group policy editor (gpedit.msc), navigate to;

Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\Log on as a batch job.
1

By default Administrators, Backup Operators and Performance Log Users have rights but you need to add local administrator on the Local Security Settings on Log on as a batch job. Why? I really don’t know Sad smile.

2

When your are finished open command prompt and type gpupdate /force.
Now you can create your virtual machines on Windows 8 with Hyper-V role installed.

3

Enjoy in Windows 8 Release Preview!

NOTE: After I created first virtual machine with mentioned changes in local group policy, I returned gpo to default settings and after that I could create second, third, etc… virtual machines without any problems. Maybe this is a bug in Release Preview. Who knows! We shall see when the final version comes out. I hope this information will be useful for someone.