Display Ubuntu VM IP Address in Hyper-V Manager

Installing Ubuntu in a Hyper-V Virtual Machine is very easy and it is beyond the scope of this post. But how do we get it to report its IP address back to Hyper-V manager? Based on Microsoft documentation all recent versions of Ubuntu 13.xx and newer includes the LIS (Linux Integration Services) packages build into it.

So why can we see the IP address?

 

IPnoshow

Here is why?

There is a daemon and a couple of tools missing and we need to install them. You will need to install the following packages

  • hv-kvp-daemon-init
  • linux-tools
  • linux-cloud tools

 

Here is a one line to install the packages

sudo apt-get update && sudo apt-get install hv-kvp-daemon-init linux-tools-$(uname -r) linux-cloud-tools-$(uname -r) -y

 

After you install the packages execute the following commands in order to test the new daemons

  • hv_fcopy_daemon
  • hv_kvp_daemon
  • hv_set_ifconfig
  • hv_vss_daemon
  • hv_get_dns_info

executedaemonshyperv

 

Then shutdown your VM. (This is important you need to shut it down not reboot. For some strange reason reboot will not work)

  • sudo shutdown -h now

 

shutdownubuntu

Power On your VM  via PowerShell or the Hyper-V Manager and you will see your IP Address in the Networking Tab

ubushowipinhypervmanager

 

Hope this helps you. If you have any questions leave me a comment.

Configure Hyper-V vSAN

One of the best features in Microsoft Windows Server 2012/R2 and Hyper-V Server 2012/R2 is the ability to connect a VM directly to your Fiber Channel Storage Array. This feature is called Virtual HBA or vSAN. In order to get this feature working we need to follow a couple of simple steps to enable it on your servers.

Video to Configure Hyper-V vSAN

How to Configure Hyper-V vSAN

Watch this video on YouTube.

Steps to configure our Hitachi FC cards for Hyper-V 2012/R2 vSAN

1. Open an administrator command prompt

Admin-Command-Prompt.png

2. Change to the HFCtools directory. cd c:program files (x86)HitachidrivershbaHFCtools

3. Enable NPIV function.  hfcmgr -p all npiv enable

Enable-NPIV-Option.png

4. Reboot the server.

5. After the server is back online, Open your Hyper-V Manager

hyper-V-manager.png

6. Right Click your server and click Virtual SAN Manager

virtualSAN.png

7. You should be able to create a vSAN

Hyper-v-SAN-OK.png

Errors:

If you see this error when you open your Virtual SAN manager you need to enable your Fiber Channel card NPIV features

Hyper-V-vSAN-FC-SAN.png

Microsoft Reference Articles

Hyper-V Virtual Fibre Channel Overview

 

Install Operating System in your Base Virtual Machine

In this post we will install the Windows 2012 R2 Operating System on our BaseImage Virtual Machine. This will help us to create multiple virtual machines later from a single image.

1. In the Hyper-V Manager, select the VM created in the previous step. Ex: BaseImage and click settings.

2. In the settings screen Select SCSI Controller > DVD > Add

3. Click Image File and point to the location where your Windows 2012 R2 ISO file is located. If you do not have the file you can download it from the Microsoft website.

4. Click the Firmware, then select your DVD ISO and move it up until it is the first one on the list. Then press OK.

5. Press the Start Button and then connect

6. You should see a screen similar to this one where it ask you to press any key to boot from the CD or DVD. Click on the black screen and then press any key.

7. After your installation finishes you should see the Server Manager screen. Close Server Manager.

8. Eject your ISO file by Right click the D: select Eject

9. Browse to C:WindowsSystem32Sysprep folder and double click the sysprep application

10. In the System Preparation Tool Screen select OOBE, Generalize and Shutdown, then press OK.

11. Wait until Sysprep finishes and your BaseImage virtual machine is off.

 

Now You are ready to clone your virtual machine.

Create a Base Virtual Machine in Windows 8.1 Client Hyper-V

Now we have your Client Hyper-V installed and the network configured. The next step is to create a virtual machine so you can use it as a template. We will go thru the process on creating your first virtual machine.

1. In your Hyper-V Manager Application, Right Click in your computer name, then click new >Virtual Machine

 

2. The New Virtual Machine Wizard will start. Press Next.

 

3. Type a name for your VM. I selected to store the virtual machine in a separated folder to make it easier to move later. Then press Next>.

 

4. Select Generation 2 for your VM type and press Next>.

 

5. For this example I will use Windows Server 2012 so we can use Dynamic Memory. Leave the default settings for memory and press Next>.

 

6. Select your Network Switch. If you followed my post on Configuring Network for Windows 8.1 Client Hyper-V you will see the Internal Switch. Then click Next>.

 

7. In the Connect Virtual Hard Disk screen you can select the size for the VM storage. By default this will be a differencing disk so you will not allocate all the storage to the VM. Only what is consumed. Type the amount you want in GB then press Next>.

 

8. Leave the default to install an operating system later and press Next>.

 

9. Press Finish and your VM will be created with all the parameters you just specified.

 

You have a fully functional Client Hyper-V machine, with network and a virtual machine. In the next post we will install the Windows 2012 R2 operating system.

Configure Network for Windows 8.1 Client Hyper-V

In this post I will go thru the steps to configure the network for your Windows 8.1 Client Hyper-V. This is needed so your VM’s can connect to the network.

1. Open your start screen and look for the Hyper-V Management Tools group. And click Hyper-V Manager

 

2. Click the Virtual Switch Manager option under Actions.

 

3. Because this is a new installation there is no network defined.

 

4. Type a name for your internal switch. In this example I use “Internal” as the name for the switch. Press OK.

 

Now you have your Hyper-V feature installed and network is configured. In my next post I will share how to configure a base virtual machine.

Are you ready to build your Client Hyper-V VM’s?

Installation of Windows 8.1 Client Hyper-v

In this quick post, I will go thru the steps to install Client Hyper-V via Powershell. In this way you can have a script ready and install it on all your computers.

1. Query your computer for the Hyper-V feature.

Get-WindowsOptionalFeature –online | ? {$_.featurename –like “*Hyper*”}

You can see that the Hyper-V feature and tools are not installed. The state appears as Disabled.

2. Let’s Enable the Hyper-V feature

Enable-WindowsOptionalFeature –FeatureName Microsoft-Hyper-V-All –All –Online

3. After you enable Hyper-V the installation will ask if you want to reboot your computer. Select (Y) to reboot your computer.

4. After you reboot your computer you will see a new group in your Start screen with your tools to manage your new Hyper-V feature

What’s New in Hyper-V in Windows 2012 R2

Hyper-V in Windows Server 2012 has some new cool features. While doing some research I found some information about them. Hope it is useful.

Generation 2 VM

The basic architecture of the virtual machine has not changed in a long time. The old BIOS emulation from 1980’s is supported by most applications and it is used to emulate the physical hardware the VM’ use. The hardware emulated by the hypervisor provides support for hardware, such as a specific NIC card or IDE disk controller. Hyper-V in Windows Server 2012 R2 supports the new UEFI bios option concept of a totally new architecture based on modern hardware with no emulated devices. This makes it possible to add a number of new features, such as secure boot for VMs and booting off  virtual SCSI or virtual network adapters. The new Gen 2 VM’s are 64bit only and currently limited to Windows 8 and Windows Server 2012 operating systems.

 

VM Direct Connect

Connecting to a running VM over RDP requires an active Local area network connection, which you can’t always have. The VM must have an IP address reachable by the system attempting to connect, this has its own potential management or security issues. VM Direct Connect allows connection via the VM bus. It uses the RDP protocol to connect to the VM. This makes it possible to connect an administer VM’s behind firewalls without the need to have direct access to the VM. It’s also integrated into the Hyper-V management experience.

 

Extend replication to a third site

A new feature called Hyper-V Replica in Windows Server 2012 is currently limited to a single replication target. This makes it difficult to support scenarios like a service provider wanting to act both as a target for a customer to replicate and a source to replicate to another offsite facility. Windows Server 2012 R2 and Hyper-V now give the option to replicate to a tertiary site. By the same token, enterprises can now save one replica in-house and push a second replica off-site.

 

Replication frequency options

Hyper-V Replica in Windows Server 2012 provides a fixed replication interval of 5 minutes. This means you can’t replicate any faster, even if you have the hardware to support it. Nor can you replicate any slower, even if you don’t need such frequent copies. Two new options have been added in the Windows Server 2012 R2 release to support more frequent (30 seconds) and not so frequent (15 minutes) replication. This will even support an intermittent connection. By default, Hyper-V Replica will look for 12 missed cycles before it switches into a failed state. With the 15-minute cycle, you buy up to three hours of network downtime.

 

Compression for faster migration

Hyper-V 2012 R2 has two new options to help improve the performance of live migrations. The first is the ability to enable compression on the data. The second option, SMB Direct, requires network adapters that support RDMA. Microsoft’s advice: If you have 10Gb available, use RDMA (10x improvement); otherwise, use compression (2x improvement). Compression is the default choice and it works for the large majority of use cases.

Online VM exporting and cloning

One of the downsides of Hyper-V in Windows Server 2012 is the need to stop a running VM before you can export or clone it. In production environments, this is simply not an option. Windows Server 2012 R2 Hyper-V removes this restriction. It’s now possible to export or clone a running VM from System Center Virtual Machine Manager 2012 R2 with a few mouse clicks. As with pretty much anything related to managing Windows Server 2012, you can accomplish the same task using Windows PowerShell.

 

Online VHDX resizing

In Windows Server 2012 Hyper-V, it is not possible to resize a virtual hard disk attached to a running VM. Windows Server 2012 R2 removes this restriction, making it possible to not only expand but even reduce the size of the virtual disk (VHDX format only) without stopping the running VM. What you can’t do with this feature: Compress an online VHD. You can make these adjustments from System Center Virtual Machine Manager 2012 R2, Hyper-V Manager, or the command line using PowerShell. You can use PowerShell to set the disk size to the current disk consumption if you want to reduce it to the absolute minimum.

 

Storage QoS

An interesting feature in Windows Server 2012 R2 is the ability to limit individual VMs to a specific level of I/O throughput. You have two settings for minimum and maximum IOPS. In the initial release of Windows Server 2012 R2, the only number that really makes a difference is the maximum limit. The IOPS are measured by monitoring the actual disk rate to and from the attached virtual hard drives. These feature allows administrators to balance storage IOPS across different VM’s.

 

Dynamic Memory support for Linux

Microsoft continues to improve support for Linux VMs. In the Windows Server 2012 R2 release, Hyper-V gains the ability to dynamically expand the amount of memory available to a running VM. This capability is especially handy for any Linux workload (notably Web servers) where the amount of memory needed by the VM changes over time. In environments with many Linux VMs, dynamic memory becomes even more critical to efficiently manage the total memory used by all running VMs. Windows Server 2012 R2 Hyper-V also brings Windows Server backups to Linux guests. In the example the Linux guest starts up with 128MB and can dynamically grow as needed.

 

 

Shared VHDX

A great feature for cluster VM’s is the use of a Shared VHDX file instead of the traditional iSCSI or Fibre Channel connectivity to a SAN. The VHDX can be on a CSV volume or a SMB 3.0 fully Windows 2012 Scalable File Share. This allows for SQL virtual clusters or Windows File Share Clusters.

 

 

Additional Information can be found at:

http://technet.microsoft.com/en-us/library/dn282278.aspx

http://blogs.technet.com/b/cbernier/archive/2013/11/06/virtualizing-sql-server-on-hyper-v-and-on-windows-azure-vms.aspx

http://blogs.technet.com/b/kevinremde/archive/2013/09/19/wmware-or-microsoft-how-robust-is-your-availability.aspx

http://www.infoworld.com/slideshow/104337/10-great-new-features-in-windows-server-2012-r2-hyper-v-220067

TechEd 2013 Storage Related Sessions

Last week in New Orleans , Microsoft presented their new solutions based on Windows Server 2012 R2.  Microsoft message to their customers is that they can deliver enterprise class storage with commodity hardware.  Tiering, caching, optimization for the commodity hardware.

  • Transform the Datacenter with Server and Management Innovations from Microsoft  PPTX   Video
  • Understanding the Hyper-V over SMB Scenario, Configurations, and End-to-End Performance   PPTX   Video
  • Windows Server Storage for Non-Windows Clients (Including Apple OS X, Linux, and VMware)   PPTX   Video
  • Shouldn’t All of Your Storage Be Highly Available?   PPTX   Video
  • Practical Implementation of Windows Server 2012 Storage Technologies   Video
  • Building Hosted Clouds Using Windows Server 2012 R2  PPTX   Video
  • Storage Management: Spanning the Enterprise to Low Cost Scalable Solutions   PPTX   Video
  • Windows Server 2012 Hyper-V Storage Performance   PPTX   Video
  • Cluster in a Box in 2013: How Real Customers Are Making Their Businesses Highly-Available with Windows Server 2012  PPTX   Video
  • StorSimple: Enabling Windows Azure Storage for Enterprise Workloads    PPTX  Video
  • VDI Smackdown 2013 Edition    PPTX   Video
  • Upgrading Your Private Cloud with Windows Server 2012 R2   PPTX  Video
  • Deploying Windows Server 2012 R2 File Services for Exceptional $/IOPS  Video
  • Reduce Storage Costs with Data Deduplication   Video
  • Monitoring and Managing the Network and Storage Infrastructure with Microsoft System Center 2012 – Operations Manager   PPTX  Video
  • Storage and Availability Improvements in Windows Server 2012 R2   PPTX  Video
  • Storage Spaces: What’s New in Windows Server 2012 R2  PPTX   Video

Create Highly Available Virtual Machine

After configuring your environment and VM’s you will need to add them to the failover cluster. In order to add the VM’s to the cluster follow these steps:

  1. In the Server where the VM is running, open a PowerShell window with administrator rights.
  2. Execute the following command to add the VM’s to the cluster

    Get-VM | Add-ClusterVirtualMachineRole

     

  3. Now your VM will be protected by the Failover Cluster.

How to deploy a VM from a Template

In this tutorial we will deploy a VM from an existing VM VHDX.

Now let’s deploy a VM based on template.

  1. In the Hyper-V Manager screen Click Newà Virtual Machine

  2. Select a name for the VM.

  3. Select the amount of memory for the server or Use Dynamic Memory for this virtual machine.

  4. Select the virtual switch for the virtual machine.

     

     

  5. Do not attach a disk. Select attach a virtual hard disk later.

  6. Press Finish

  7. Right click the VM and select Settings.

  8. Click IDE Controller 0 à Hard Drive à Add.

  9. Click New.

  10. Select the appropriate format. VHDX is the default format in Windows 2012/Hyper-V 2012.

  11. Select Differencing and press Next.

  12. Select the location and name for the new disk then press Next.

  13. Select the location for the Template VHDX.

  14. Press Finish.

  15. Press OK.

  16. Right Click on the VM and press Start, then Right Click the VM again and connect.


  17. The virtual machine will start and will go thru a mini setup for the VM. Your VM will be up and running in less time that installing the OS from DVD.

  18. By deploying the VM from Image your Lab will share a common set of binaries. You will save 10 – 12G for the OS deployment every time for every VM that share the template.