Tag: Hypervisor

Windows Sandbox

Windows Sandbox – Isolated Windows Desktop

Today Microsoft announced a new feature called Windows Sandbox. Windows Sandbox is built based on Windows Container technology, which allows you to spin up an isolated, temporary, desktop environment where you can run untrusted software. The software you run and install in the Windows Sandbox does not affect the host. If you shut down the Windows Sandbox all changes and all software you installed in the Sandbox are gone again. This sounds very similar to the technology Windows Defender Application Guard already used to build a sandbox environment for Microsoft Edge.

Windows Sandbox Overview

Windows Sandbox

Windows Sandbox has the following properties:

  • Part of Windows – everything required for this feature ships with Windows 10 Pro and Enterprise. No need to download a VHD!
  • Pristine – every time Windows Sandbox runs, it’s as clean as a brand-new installation of Windows
  • Disposable – nothing persists on the device; everything is discarded after you close the application
  • Secure – uses hardware-based virtualization for kernel isolation, which relies on the Microsoft’s hypervisor to run a separate kernel which isolates Windows Sandbox from the host
  • Efficient – uses integrated kernel scheduler, smart memory management, and virtual GPU

Windows Sandbox brings the advantages of Windows Containers and also adds a desktop. If you compare this to a Windows 10 Virtual Machine, the Windows Sandbox will consume much fewer resources, it starts up match faster and will be much more efficient with hardware resources. You can think of it like a lightweight virtual machine, which can share the same hardware but also the same kernel and memory as the host system (like a container).



Install Hyper-V on Windows 10 using PowerShell

Install Hyper-V on Windows 10 using PowerShell

Running virtual machines on your desktop or notebook and be extremely powerful, to test and develop applications or just run an isolated environment. If you just need a quick disposable Windows 10 environment, I recommend that you have a quick look at the Windows 10 feature called Windows Sandbox. Since Windows 8 you can run Hyper-V on your desktop, laptop or Windows tablet and it can virtualize Windows as well as Linux virtual machines. To install or enable Hyper-V on your Windows 10 machine, you just need to have the following requirements:

  • Windows 10 Enterprise, Professional, or Education (Home does not have the Hyper-V feature included)
  • 64-bit processor with Second Level Address Translation (SLAT)
  • CPU support for VM Monitor Mode Extension (VT-c on Intel CPU’s)
  • Minimum of 4 GB memory

The easiest way to enable Hyper-V on Windows 10 is to run the following PowerShell command as an administrator. If you want to install it using the GUI, you can also install the Hyper-V feature in the Windows 10 Control Panel.

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

or you can use the following CMD DISM command:

DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V

If you are looking for installing Hyper-V on Windows Server, check the following blog post: Install Hyper-V on Windows Server using PowerShell. If you want to know more about Hyper-V on Windows 10, check the Microsoft Docs. If you have any questions feel free to leave a comment.

Hyper-V is also used in many other features within Windows. For example in Windows Defender Application Guard, Docker or Windows Sandbox.



Containers PowerShell

First steps with Windows Containers

At Microsoft Ignite 2015 back in Chicago Microsoft announced Windows Containers. With the release of the Technical Preview 3 (TP3) for Windows Server 2016 we are finally able to start using Windows Containers, and we can finally test them. But first let use check a little what containers are.

The concept of containers is nothing new, in the Linux world containers are a well known concept. If you have a look at the Wikipedia description for Linux Containers, Wikipedia describes it as follows: LXC (Linux Containers) is an operating-system-level virtualization environment for running multiple isolated Linux systems (containers) on a single Linux control host. Containers provide operating system-level virtualization through a virtual environment that has its own process and network space, instead of creating a full-fledged virtual machine. With Windows Server 2016 more or less the same concept comes the Windows world. This makes containers much more light-weight, faster and less resource consuming than Virtual Machines, which makes it perfect for some scenarios, especially dev-test scenarios or for worker roles.

Container Ecosystem

If we have a look at the concept of containers you have several things in the container ecosystem:

Container Ecosystem

First you have the Container Run-Time which builds the boundaries between the different containers and the operating system. To make deployment easier, faster and more efficient you build Container Images which Include the application frameworks as well as the applications on top of the OS used for the container. To use, store and share Container Images you can use an Image Repository.

The question most people will ask is how are containers different than Virtual Machines etc.

Physical Server

Physical Host

At the beginning what we did is, we installed an operating system on physical hardware and in that operating system we installed applications directly.

Virtual Machines

Virtual Machines

With virtual machines we created simulated some virtual hardware on top of the operating system of the physical server. We installed an operating system inside the virtual machine on top of the virtual hardware and installed application inside the VM. In this case, each virtual machine has its own operating system.

Containers

Containers

With container we use an operating-system-level virtualization environment which create boundaries between different applications. This is so efficient you can run multiple applications side by side without effecting each other. Since this is operating-system-level virtualization you cannot only directly on the operating system on the physical hardware, you can also use operating-system-level virtualization inside a virtual machine. This is by the way the way I see most of the deployments of containers.

Windows Containers vs. Hyper-V Containers

Hyper-V Containers

Microsoft will provide two different types of Container Run-Times. One is Windows Containers and the other one will be Hyper-V Containers (not Hyper-V Virtual Machines). In some cases it is maybe not compliant that some applications share the same operating system. In this case Hyper-V Containers will add an extra boundaries of security. Hyper-V Containers are basically Windows Containers running in a Hyper-V Partition, so with that you gain all the stuff you get with Windows Containers but with another layer of isolation.The great thing here, is that both Container Run-Times use the exam same image format. This means if an image is created in a Windows Container Run-Time it also works as a Hyper-V Container and vice versa.

Hyper-V Containers Nested Virtualization

The other great side effect of Hyper-V Containers is, that in order to run Hyper-V Containers inside a Virtual Machine we need nested Virtualization, which will be included in Windows Server 2016 Hyper-V. Btw. Hyper-V Containers are not part of the Technical Preview 3.

(Pictures from the Microsoft Ignite 2015 presentation of Taylor Brown and Arno Mihm (Program Managers for Containers)

Deploy Windows Containers

With the release of the Technical Preview 3 of Windows Server 2016, Microsoft made Windows Containers available to the public. To get started you can download a install Windows Server 2016 inside a Virtual Machine or even bare-metal. If the virtual machine has internet connection you can use the following command to download the configuration script, which will prepare your container host.

 
wget -uri https://aka.ms/setupcontainers -OutFile C:\ContainerSetup.ps1

Install Windows Container Host

After that you can run the C:\ContainerSetup.ps1 script, which will prepare your container host. This can take some time depending on your internet connection and hardware.

 
C:\ContainerSetup.ps1

The VM will restart several times and if it is finished you can start using Windows Containers inside this Virtual Machine.

Managing Windows Containers

Containers PowerShell Module

After you have logged in to the Virtual Machine you can start managing Containers using PowerShell:

Containers PowerShell

Get Container Images, by default you will get a WindowsServerCore Image. You can also create your own images, based on this image.

 
Get-ContainerImage

Create a new Container

 
$container = New-Container -Name "MyContainer" -ContainerImageName WindowsServerCore

Start the container

 
Start-Container -Name "MyContainer"

Connect to the Container using Enter-PSSession

 
Enter-PSSession -ContainerId $container.ContainerId -RunAsAdministrator

Of course you an also use the docker command to make your containers.

Windows Containers Docker

Deploy a Container Host in Microsoft Azure

If you don’t want to go trough all the installation process you can also use a Template in Microsoft Azure to deploy a new Container Host Virtual Machine.

Microsoft Azure Windows Server Container Preview

If you need some more information on Windows Containers check out the Microsoft Resources on MSDN about Windows Server Containers.

 



VMware Esxi 6.0 Enable SSH

Enable SSH on VMware ESXi 6.0

 

I already wrote some blog posts how you can enable SSH access for older VMware ESXi versions such as VMware ESXi 4.1, VMware ESXi 5.0, VMware ESXi 5.1 and VMware ESXi 5.5. This post now shows you how you can enable SSH on the VMware ESXi 6.0 host. As in the other versions this is pretty simple. By enabling SSH allows you to remote troubleshoot your VMware ESXi host and also coping files on your server.

On the Login screen of your VMware ESXi host press “F2”

VMware ESXi Logon Screen

It will ask you about username and password to login to the VMware ESXi server:

VMware ESXi 6.0 Login

After the login go to the Troubleshooting Options on the System Customization page.

VMware ESXi 6.0 Troubleshooting Options

You can now enable SSH on your VMware ESXi 6.0 host. After you have enabled SSH you can connect to the ESXi host via your favorite SSH client.

VMware Esxi 6.0 Enable SSH

If you want to enable SSH on your VMware ESXi host directly from the VMware vSphere Client you should have a look at the following post: Enable SSH on VMware ESXi 6.0 via VMware vSphere Client

If you are running Windows, you should also check out my blog post about how to install SSH on Windows 10 or SSH on Windows Server. I also blogged about how you can use SSH with PowerShell.



Hyper-V Share

Hyper-V is eating VMware’s lunch

During the WPC 2014 Keynote Microsoft COO Kevin Turner showed the following slide and commented it:

Hyper-V is eating VMware’s lunch

 

Hyper-V has now 30,6% market share in x86 Server Virtualization which means Microsoft won 4.6% since the release of Windows Server 2012. VMware is now at 46.4% market share which means they lost 5.1% market share since the release of Windows Server 2012 Hyper-V.

And this because of good reasons, like great features and 4 times lower cost than VMware. So if you are still running VMware you should definitely have a look at Hyper-V now!



Activate SSH on VMware ESXi 5.1

I already wrote a blog post how you can enable SSH on VMware ESXi 5.0 and VMware ESXi 4.1. As before enabling SSH on VMware ESXi 5.1 or VMware vSphere Hypervisor 5.1 is pretty easy.

  1. On the start screen press F2 for “Customize System”
    VMware ESXi 5.1 startscreen
  2. Login with the local password, and on the settings page select and enter Troubleshooting Options
    VMware ESXi 5.1 Settings
  3. Click on Enable SSH to activate SSH on your VMware ESXi 5.1 host
    VMware ESXi 5.1 enable SSH

If you are running Windows, you should also check out my blog post about how to install SSH on Windows 10 or SSH on Windows Server. I also blogged about how you can use SSH with PowerShell.



Hyper-V vs. VMware vSphere – Host Deployment

Windows Server 2012 RC Logo

VMware vSphere Enterprise Plus offers  a solution for centralized deployment of VMware Hypervisor hosts on physical hardware.

How does the deployment of Microsoft Hyper-V Server work? Microsoft Hyper-V can be deployed as Windows Server role or as Microsoft Hyper-V Server. Both setups are based on the normal Windows setups and you can use the same deployment processes.

  • DVD
  • USB
  • Windows Deployment Services (WDS)
  • Microsoft Deployment Toolkit (MDT)
  • System Center Configurations Manager

or my favorite deployment method: Bare-Metal Deployment with System Center Virtual Machine Manager. Blogger and Microsoft Consultant Michel Lüscher wrote a great blog post about how you can use the bare-metal deployment feature in SCVMM.



Hyper-V: “Version 3 kills them all”

Windows Server 8 Server Manager Dashboard

Microsoft showed the latest version of Hyper-V at build conference together with Windows 8 and Windows Server 8. Microsoft showed a lot of new Hyper-V features which turn Hyper-V in really powerful hypervisor.

Some days ago I posted a blog post about new features which Microsoft showed before the build conference, now it’s time to extend the list of new features. There are a lot of even more powerful features than the once I posted back then.

Windows Server 8 as Cloud OS

First let’s start with Windows Server 8 as the base of Microsoft Cloud strategy. Microsofts focus in Windows Server 8 was to make it easy for all to build public and private cloud solutions. There are a lot of improvements to manageability, security, scalability, extensibility, predictability and reliability which will also improve the possibilities with Hyper-V. In technical terms Microsoft made a lot of improvements how you can manage a lot of servers and services, Storage, Networking and Powershell. Of course there is a lot more, but this are the parts I think are the most important. And here are some keywords to the improvements in Windows Server 8:

  • Storage improvements – SMB 2.2, SMB transparent Failover, Data deduplication, Storage Spaces, online filesystem repairs, 64TB NTFS volume etc.
  • NIC Teaming
  • Powershell v3 – You can now just do everything in Powershell and even more with 23000 PowerShell cmdlets.
  • Server Dashboard – The new Dashboard lets you manage all servers, or even better, all Services from one place.
  • Multi-tenant – everything seems to be made for that
  • Performance Counters

Windows Server 8 Hyper-V Manager

Hyper-V Host improvements

Hyper-V gets not only a lot of improvements to Virtual Machine, also the Hyper-V Hosts get some new limit improvements.

  • up to 160 logical CPUs
  • supports up to 2TB RAM
  • no more vCPU:pCPU ration limit

Hyper-V Virtual Machine improvements

Microsoft did a lot to extend the existing Virtual Machine hardware to support even high workload Virtual Machines. I will not write a lot about this because the facts here will tell more that a lot of words.

  • VHDX Format – supports up to 64TB Virtual Disks
  • 32 CPUs per VM
  • 512GB RAM per VM
  • Support for Fibre Channel Adapters
  • Supporting Virtual Active Directory Servers

Hyper-V Networking improvements

Hyper-V got a lot of improvements in terms of networking. Microsoft realized that networking features are really important if you start to create private and public cloud scenarios and now even create a mix of public and private cloud scenarios without creating a lot of work for the IT teams to reconfigure Virtual Machines.

  • QoS and flexible bandwidth allocation
  • Support for SR-IOV (Direct Access to the physical Network adapter)
  • Network Virtualization
  • PVLAN support
  • Dynamic Virtual Machine Queue (D-VMQ)
  • Receive Side Coalescing (RSC)
  • DHCP Guard
  • Extensible virtual switch
  • IPsec Task offload

Hyper-V Clustering improvements

Hyper-V gets also a lot of Cluster improvements. But you have to be aware that Clusters are for really high availability and this adds a lot of costs to projects and solutions. Microsoft is working on Cloud solutions which will give great availability to low cost. For example Hyper-V Replica or Live Migration to another host over the Ethernet without the need for a shared storage. But if you need real HA you will need the Failover Cluster.

  • supporting up to 4000 VMs per cluster
  • supporting up to 64 Cluster nodes
  • improved Cluster Manager Console
  • VM Monitoring – Application health detection inside the virtual machine
  • New Placement policies – Virtual Machine Priority and enhanced placement
  • Storage Live Migration
  • Hyper-V Replica supporting clustering
  • No need for Block Storage – you can use SMB Shares
  • Support for Storage Spaces
  • Automated Node Draining – like Maintenance mode in SCVMM
  • Cluster Aware Updating (CAU)
  • Cluster Shared Volume Improvements – BitLocker support, a lot of performance improvements, Self-Healing
  • Live Migration Queing
  • Migrate multiple Virtual Machine at the same time

Windows Server 8 Hyper-V VM Move

Hyper-V Storage improvements

A I mentioned earlier Microsoft made a lot of improvements in terms of storage in Windows Server 8 and Hyper-V can take advantage of those which are quiet impressive. For example with the new features in SMB 2.2 you can now use SMB file shares to store your Virtual Machines.

  • VHDX
  • ODX
  • RDMA
  • SMB 2.2 – Transparent Failover
  • 4K native disk support
  • Data Deduplication
  • Virtual Fiber Channel
  • VM boot from SAN

Hyper-V Management Improvements

As everywhere in Windows Server 8 PowerShell is the key. And the new Server Manager Dashboard Microsoft enable to create Server Groups to manage multiple servers from a single console.

  • Powershell for Hyper-V
  • Powershell Workflows – Commands and Tasks across servers
  • Hyper-V Extensible Switch – lets vendors to create “plugins”. Could be very interesting for Cisco UCS installations.
  • Server Manager Dashboard – lets you manage multiple Hyper-V host from a single console.
  • SCVMM 2012 – not a part of Windows Server 8 but will add great management solutions

Windows Server 8 Hyper-V Powershell

Hyper-V HA and Data Protection

Now I think this is maybe the greatest new feature. You can now live migrate a Virtual Machine from one Hyper-V Host to another without Shared Storage or Cluster configuration. And with this option Microsoft also included a new feature called Hyper-V Replica which includes the option to replicate Virtual Machine to another host which can be hosted in the same network or even in the cloud.

  • Live Migration
  • Live Storage Migration
  • Live Migration to another Hosts (Not clustered) over the Ethernet
  • Hyper-V Replica – Replicated Virtual Machines to another Hyper-V host on-premise or public cloud
  • BitLocker support for CSV

This are not all of the new features Windows Server 8 Hyper-V has to offer but I tried to list the important ones. And if Microsoft sticks with their licensing model, it will be a really strong competitor to the VMWare vShpere 5.

 



Activate SSH on VMware ESXi 5.0

As in VMware ESXi 4.1 you can enable or activate SSH on VMware ESXi 5.0 very simple. VMware ESXi 5.0 is also known as VMware vSphere Hypervisor.

  1. On the start screen press F2 for “Customize System”
    VMware ESXi 5.0 enable SSH
  2. Login with the local password
    VMware ESXi 5.0 enable SSH
  3. Select and enter Troubleshooting Options
    VMware ESXi 5.0 enable SSH
  4. Click on Enable SSH to activate SSH on your VMware ESXi 5.0 host
    VMware ESXi 5.0 enable SSH
  5. After you have pressed the ENTER key you will now see that SSH is enabled
    VMware ESXi 5.0 activate SSH

If you are running Windows, you should also check out my blog post about how to install SSH on Windows 10 or SSH on Windows Server. I also blogged about how you can use SSH with PowerShell.