Convert VMware .vmdk to Hyper-V .vhdx with Powershell

Download Microsoft Virtual Machine Converter 3.1 over here.

  1. Install mvmc_setup.msi
  2. Run your Powershel 3.0+ as an administrator.

Import-Module “C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1”

Convert to VHD:
ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath “E:\Virtuele Machines\DC01\DC01.vmdk” -DestinationLiteralPath “G:\Hyper-V” -VhdType FixedHardDisk -VhdFormat Vhd

Convert VHD to VHDX:
Convert-VHD -Path ‘G:\Hyper-V\dc01.vhd’ -DestinationPath “G:\Hyper-V\dc01.vhdx” -VHDType Fixed -Passthru

Part 1: Running XPEnology under Hyper-V

Some times you find a cool feature on the internet.

XPEnology is an operating system based on Synology DiskStation Manager (DSM). This is possible because Synology DSM has developed under the GPL license . As a result, it is free to use and adapt by third parties. The advantage of XPEnology is that it is compatible with many different hardware and so you almost any old PC / server can use as a NAS. Also you can also XPEnology as a virtual machine (VM) running on ESXi for example, Hyper-V, VirtualBox.

With this flexibility, functionality and ease XPEnology offers a good alternative to a Synology NAS or other NAS solutions.

On XPenology.nl you will find great articles how to run the Software on Hyper-V, ESXi, Workstation and on dedictad hardware.

So i followed this guide: http://www.xpenology.nl/hyper-v-installatie/

image

image

image

Awesome!!! Open-mouthed smile Open-mouthed smileOpen-mouthed smile

Things to do:
1. Hyper-V Harddisk Pass Through
2. Install & Config SABnzbd
3. Install  &Config Sickbeard
4. Install & Config Couchpotato
5. Config my Diskstation with DNLA to my TV

Keep you posted!!!

Hyper-V Reporting Script

Serhat AKINCI, a Hyper-V MVP, has just posted this very useful script:

https://gallery.technet.microsoft.com/Hyper-V-Reporting-Script-4adaf5d0

In his own words:

It can be difficult to monitor and assess resources in large Hyper-V environments. This PowerShell based script helps you to understand virtualization inventory, capacity and general resource availability in your Standalone or Clustered Hyper-V Environment.

Highlights
  • More than 2600+ lines of PowerShell, HTML and CSS code examples.
  • Creates a plain but detailed and user-friendly HTML report which is compatible with all modern browsers.
  • Provides more detailed information via tooltips in the HTML report. (cells with asterisks and highlights)
  • Checks and installs required runtime environment prerequisites like Hyper-V and Clustering PowerShell.
  • Collects information by using standard Hyper-V and Clustering PowerShell cmdlets and custom WMI queries.
  • Shows alerts in the report for certain situations (utilizations, VM checkpoints, replication status, etc.)
  • Can be used directly from command-line or as a scheduled Windows task.
  • Supports report delivery via e-mail with advanced options. (authentication, TLS/SSL, multiple recipients)
  • Includes a mode that reports only alerts in the Hyper-V environment. (aka Highlights Only mode)
  • Advanced error handling and logging. (Console messages and log file)

You can see an full example report here: http://www.serhatakinci.com/files/get-hypervreport-v1-0-demo-output.html
Open-mouthed smile

Microsoft Virtual Machine Converter 3.0 Released

New Features in Microsoft Virtual Machine Converter 3.0
The 3.0 release of MVMC adds the ability to convert a physical computer running Windows Server 2008 or above server operating systems or Windows Vista or above client operating systems to a virtual machine running on Hyper-V host.

Standard stuff is:

  • Converts virtual disks that are attached to a VMware virtual machine to virtual hard disks (VHDs) that can be uploaded to Microsoft Azure.
  • Provides native Windows PowerShell capability that enables scripting and integration into IT automation workflows.
    Note The command-line interface (CLI) in MVMC 1.0 has been replaced by Windows PowerShell in MVMC 2.0.
  • Supports conversion and provisioning of Linux-based guest operating systems from VMware hosts to Hyper-V hosts.
  • Supports conversion of offline virtual machines.
  • Supports the new virtual hard disk format (VHDX) when converting and provisioning in Hyper-V in Windows Server® 2012 R2 and Windows Server 2012.
  • Supports conversion of virtual machines from VMware vSphere 5.5, VMware vSphere 5.1, and VMware vSphere 4.1 hosts Hyper-V virtual machines.
  • Supports Windows Server® 2012 R2, Windows Server® 2012, and Windows® 8 as guest operating systems that you can select for conversion.
  • Converts and deploys virtual machines from VMware hosts to Hyper-V hosts on any of the following operating systems:
  • Windows Server® 2012 R2
  • Windows Server® 2012
  • Windows Server 2008 R2 SP1
  • Converts VMware virtual machines, virtual disks, and configurations for memory, virtual processor, and other virtual computing resources from the source to Hyper-V.
  • Adds virtual network interface cards (NICs) to the converted virtual machine on Hyper-V.
  • Supports conversion of virtual machines from VMware vSphere 5.5, VMware vSphere 5.0, and VMware vSphere 4.1 hosts to Hyper-V.
  • Has a wizard-driven GUI, which simplifies performing virtual machine conversions.
  • Uninstalls VMware Tools before online conversion (online only) to provide a clean way to migrate VMware-based virtual machines to Hyper-V.
    Important MVMC takes a snapshot of the virtual machine that you are converting before you uninstall VMware Tools, and then shuts down the source machine to preserve state during conversion. The virtual machine is restored to its previous state after the source disks that are attached to the virtual machine are successfully copied to the machine where the conversion process is run. At that point, the source machine in VMware can be turned on, if required.
    Important MVMC does not uninstall VMware Tools in an offline conversion. Instead, it disables VMware services, drivers, and programs only for Windows Server guest operating systems. For file conversions with Linux guest operating systems, VMware Tools are not disabled or uninstalled. We highly recommend that you manually uninstall VMware Tools when you convert an offline virtual machine.
  • Supports Windows Server and Linux guest operating system conversion. For more details, see the section “Supported Configurations for Virtual Machine Conversion” in this guide.
  • Includes Windows PowerShell capability for offline conversions of VMware-based virtual hard disks (VMDK) to a Hyper-V–based virtual hard disk file format (.vhd file).
    Note The offline disk conversion does not include driver fixes.

Download

Source

Hyper-V Configuration Toolkit

Mark Scholman has been working on a new script project to configure Hyper-V hosts.

This tool allows you to configure hyper-v hosts. It is using the converged network setup as described in this blog post. What it does is the following:

  • Rename Adapters
  • Create Teams
  • Create Tnics
  • Set Network Config (MGT,LM,CSV)
  • Join Server to the Domain
  • Create a server-local administrators group in the domain
  • Allows you to create a new or join an existing cluster
  • Configure Cluster network names
  • Configure Cluster Live migration subnet

On the to-do list is the following and will be added with upcoming releases:

  • Configure Storage network (iSCSI & SMB3)
  • Use of different topologies for converged networking as described here
  • Using Jea or PSCustomSessionConfiguration for deployment of Hyper-V hosts

How to use the tool:

On the newly provisioned Hyper-V Server start the Deploy-HyperVHost.ps1. On the Configure Nic’s tab select the adapters you want to use for Management (MGT / LM / CSV) and click “Set Management Adapters”:

Notice the list box will refresh with the new names for the adapters. Next select the adapters you want to use for VM Network and click “Set VMNet Adapters”

Finally configure Storage adapters:

Result is that we have configured all adapters now with a logical name we can use in the rest of the deployment:

Side note: I used 2 adapters for each team configuration, but you can use for example 3 adapters or 4 adapters for Management and 2 or 3 for the VMNet. The script is intelligent on using the logical names and reusing them in the Team setup.

Next part is to setup the host parameters and start the deployment of the host. Go to the tab “Configure host”

We need to specify the next parameters:
Host Name
The name of the server.
Domain Name
The domain to join the server to.
Management IP
The ip address for the management interface.
Management VLAN
If you’re using vlans specify the vlan id. Untagged is vlan 1.
Management gateway
The gateway for the management network.
Live Migration IP
The ip address for live migration (LM) communication
Live Migration VLAN
The VLAN id used for the LM network.
CSV IP
Cluster IP Address.
CSV VLAN
Cluster VLAN ID.
Primary DNS
The Primary DNS server to use for management network.
Secondary DNS (optional)
If applicable: The second DNS server for the management network.
Domain Controller Name
The Name of a Domain Controller. (needs remote Powershell enabled)
Local Admin Group Name (optional)
Name of a Domain group what is configured to be Local Administrator on the host
Group OU Path (optional)
The OU DN where the group needs to be created.
LAB: Build HyperV on HyperV

Used for demo purposes when you want to run this tool in a Hyper-V Virtual Machine. (Team settings and Hyper-V Role modification in the VM)

Next click on the “Deploy Host” button and enter domain admin credentials

Now wait until the server automatically reboots. While server is rebooting you can verify that the computer is in the domain and the local group is created:

When the server is rebooted login as the domain admin and start the Deployment tool again.

The last tab is for Configure the Cluster. You can create a new cluster:

Or add the node to an existing cluster:

Download the script http://gallery.technet.microsoft.com/Hyper-V-Deployment-Tool-419679d3

For the home lab: free toolkit from Veeam, Starwind and 5nine!

This is a little cool gem I discovered today: a free toolkit made available by Veeam, Starwind and 5nine software. This toolkit enables anyone to get started with virtualization, completely free. And even better, it’s very well known and high-quality stuff, too.

The most affordable toolkit to meet your goals!

There is no better way to start virtualizing than with a FREE Microsoft Hyper-V environment, free backup, free virtual storage and free management software!
With this free toolkit, you can create your own test lab, run a small business or even scale your production environment up to 1,000 VMs. It’s a FREE way to virtualize!

The toolkit consists of the following software:

Screen-Shot-2014-06-23-at-16.54.08-630x152

  1. Microsoft Hyper-V Server 2012 R2
    Free Hypervisor with all the functionality of it’s ‘big brother’, Windows Server 2012 R2 Hyper-V
  2. Veeam Backup & Replication
    Effective and easy-to-use tool for Hyper-V backup
  3. StarWind Virtual SAN
    Reliable shared storage with unlimited storage capacity for a single-node device
  4. 5nine Manager
    Simple and easy-to-use Graphical User Interface, local or remote, to manage Hyper-V virtual machines

Now obviously, since it’s a free bundle, the contained software will be free editions with limited functionality. But for in a lab, or when you’re just getting started with virtualization, it might be very cost-effective.

Screen-Shot-2014-06-23-at-16.54.16-630x163

Finally, here’s the evaluation guides for each of the products.

  1. Microsoft Hyper-V 2012 R2
  2. Veeam Backup Free Edition
  3. StarWind Virtual SAN
  4. 5nine Manager Free Edition

I think this is a good way to show the world what each of the products have in store, especially now with Hyper-V’s ecosystem evolving and maturing and having vendors like Veeam, Starwind and 5nine integrate not only with the hypervisor, but with each other, too!

Thnx to JOEP PISCAER

Microsoft Virtual Machine Converter 2.0

    Microsoft® Virtual Machine Converter (MVMC) is a Microsoft-supported, stand-alone solution for the information technology (IT) pro or solution provider who wants to convert virtual machines and disks from VMware hosts to Hyper-V® hosts and Windows Azure™.
    MVMC can be deployed with minimal dependencies. Because MVMC provides native support for Windows PowerShell®, it enables scripting and integration with data center automation workflows such as those authored and run within Microsoft System Center Orchestrator 2012 R2. It can also be invoked through the Windows PowerShell® command-line interface. The solution is simple to download, install, and use. In addition to the Windows PowerShell capability, MVMC provides a wizard-driven GUI to facilitate virtual machine conversion.
    New Features in MVMC 2.0
    MVMC 2.0 release of MVMC includes the following new features:

    • Converts virtual disks that are attached to a VMware virtual machine to virtual hard disks (VHDs) that can be uploaded to Windows Azure.
    • Provides native Windows PowerShell capability that enables scripting and integration into IT automation workflows.
      Note The command-line interface (CLI) in MVMC 1.0 has been replaced by Windows PowerShell in MVMC 2.0.
    • Supports conversion and provisioning of Linux-based guest operating systems from VMware hosts to Hyper-V hosts.
    • Supports conversion of offline virtual machines.
    • Supports the new virtual hard disk format (VHDX) when converting and provisioning in Hyper-V in Windows Server® 2012 R2 and Windows Server 2012.
    • Supports conversion of virtual machines from VMware vSphere 5.5, VMware vSphere 5.1, and VMware vSphere 4.1 hosts Hyper-V virtual machines.
    • Supports Windows Server® 2012 R2, Windows Server® 2012, and Windows® 8 as guest operating systems that you can select for conversion.
    Standard MVMC Features
    In addition to the new features previously identified, MVMC provides the following functionality:

    • Converts and deploys virtual machines from VMware hosts to Hyper-V hosts on any of the following operating systems:
    • Windows Server® 2012 R2
    • Windows Server® 2012
    • Windows Server 2008 R2 SP1
    • Converts VMware virtual machines, virtual disks, and configurations for memory, virtual processor, and other virtual computing resources from the source to Hyper-V.
    • Adds virtual network interface cards (NICs) to the converted virtual machine on Hyper-V.
    • Supports conversion of virtual machines from VMware vSphere 5.5, VMware vSphere 5.0, and VMware vSphere 4.1 hosts to Hyper-V.
    • Has a wizard-driven GUI, which simplifies performing virtual machine conversions.
    • Uninstalls VMware Tools before online conversion (online only) to provide a clean way to migrate VMware-based virtual machines to Hyper-V.
      Important MVMC takes a snapshot of the virtual machine that you are converting before you uninstall VMware Tools, and then shuts down the source machine to preserve state during conversion. The virtual machine is restored to its previous state after the source disks that are attached to the virtual machine are successfully copied to the machine where the conversion process is run. At that point, the source machine in VMware can be turned on, if required.
      Important MVMC does not uninstall VMware Tools in an offline conversion. Instead, it disables VMware services, drivers, and programs only for Windows Server guest operating systems. For file conversions with Linux guest operating systems, VMware Tools are not disabled or uninstalled. We highly recommend that you manually uninstall VMware Tools when you convert an offline virtual machine.
    • Supports Windows Server and Linux guest operating system conversion. For more details, see the section “Supported Configurations for Virtual Machine Conversion” in this guide.
    • Includes Windows PowerShell capability for offline conversions of VMware-based virtual hard disks (VMDK) to a Hyper-V–based virtual hard disk file format (.vhd file).
      Note The offline disk conversion does not include driver fixes.

Download

HV Backup A free Hyper-V backup Tool

HVbackup is a very easy and powerful free tool to backup and restore Hyper-V virtual machines, in standalone and clustered (CSV) environments, overcoming all the limitations that a generic tool like Diskshadow provides.
This tool targets Windows 2008 (R2) and Windows Server 2012 (R2). All the corresponding core and free Hyper-V editions are also supported!
HVBackup supports app consistent and crash consistent backups through the Hyper V VSS writer component integrated in the operating system.
There are quite a few expensive commercial solutions on the market supporting this scenario, but this is the first open source one, based on the research we did before publishing the project.
We integrated this tool in our datacenter’s production environment management infrastructure, which means that it undergoes continuous testing in a real world environment 🙂
HVBackup can be invoked from the command line, scripted with Powershell or integrated in any .Net program through it’s class library.
The backup process generates a separate zip file for each virtual machine in the specified output directory, containing all the files owned by the VM and identified for backup by the VSS Hyper-V provider.
Requirements:
.Net Framework 3.5, which can be easily enabled on the command line.

Samples:

HVBackup -a -o c:\backup
Performs a full VSS backup (using the HyperV VSS writer) of all VMs on the host.
HVBackup -l VM1,VM2 -o \\yourserver\backup
Performs a full VSS backup of the provided list of VMs (use quotes if the names contain spaces).
In this sample the output directory is on a remote server.
HVBackup -f list.txt -o c:\backup
Performs a full VSS backup of the VMs names provided in “list.txt”, one per line.

How to perform a scheduled backup

backup.cmd :

set BCKPATH=\\yourserver\yourpath
net use %BCKPATH% /user:<user> <password>
pushd %BCKPATH% && forfiles.exe -m *.zip -d -7 -c “cmd /c del @path”
popd
HVBackup.exe -a -o %BCKPATH% 1> lastlog_out.txt 2> lastlog_err.txt

Note: This script will delete every zip file older than 7 days in the target directory before performing a backup of all the VMs on the host. Change it accordingly to your needs.

Now, as we don’t have a scheduled task UI on hyper-v or server core, in order to schedule the previous script every night at 01 AM, just run:

schtasks.exe /create /tn HVBackup /tr c:\hvbackup\backup.cmd /sc DAILY /ru <username> /rp /st 01:00:00

Tool: http://hypervbackup.codeplex.com/

Download: HVBackup_1_0_beta1_20120330.zip Windows 2008 (R2) and Windows Server 2012

Download: HVBackup_1_0_1_Beta.zip Windows Server 2012 R2

Windows Server 2012 R2 Hyper-V Component Architecture Poster

Provides a visual reference for understanding key Hyper-V technologies in Windows Server 2012 R2 and focuses on Generation 2 virtual machines, Hyper-V with virtual hard disk sharing, online virtual hard disk resizing, storage quality-of-service, enhanced session mode, live migration, Hyper-V failover clustering, and upgrading your private cloud

image

System Center Summer Night

For wo that missed the Dutch System Center Summer Night community event. Here are the slides: 

Translate »