DevOps
  • DevOps
  • Docker
    • Overview
  • Vagrant
    • Overview
    • Installation
    • Basic Commands
    • Vagrantfile
      • Example
    • Deploying Multiple Machine
    • Distribution
    • Reference
  • Running SQL Server on Windows Docker
    • Introduction
      • Windows Container & Hyper-V Container
    • System Requirements and Prerequisites
    • Version Compatibility
    • Enable Hyper-V & Containers and Install Docker on Window Servers
    • Using Docker to Run MSSQL Image
    • Install SSMS for remoting MSSQL Server Image
    • Using Docker-Compose to Build Up a MSSQL Image
    • Increase the default Windows container's storage
    • Reference
    • Appendix
  • Kubernetes
    • Install Kubernetes with kubeasz
    • Use Hyper-V Manager to create VM for K8S
      • Specification of the VM
      • Use Hyper-V Manager to turn on a VM for K8S
    • Installation
      • Install VirtualBox and its extension on Ubuntu
      • Install kubectl
      • Install minikube
    • Getting Started
      • Running Kubernetes Locally via Minikube
    • Assign Memory Resources to Containers and Pods
    • Assign CPU Resources to Containers and Pods
    • Quality of Services (QoS)
    • Volume for Storage
      • Configure a Pod to Use a Volume for Storage
      • *Configure a Pod to Use a PersistentVolume for Storage
    • In a nutshell...
    • Reference
  • Ansible
    • What is Ansible?
    • Set Up OS Environments for Ansible
    • Install Ansible
    • Structure for ansible
      • Inventory
      • Playbook
      • Modules
      • Variables
      • Conditions
    • Security - Ansible Fault
    • 實際操作測試1 - 使用ssh
    • 實際操作測試2 - Docker容器部署
    • Appendix
    • Reference
  • Azure
    • Overview
    • Terms
    • Getting Started
    • Azure DevOps Services
    • Reference
Powered by GitBook
On this page
  • Step 1: Install and Import Docker Package Provider
  • Step 2 (VM Only) : Enable Nested Virtualization
  • Step 3: Enable Hyper-V and Container Windows Features
  • Step 4: Install Docker

Was this helpful?

  1. Running SQL Server on Windows Docker

Enable Hyper-V & Containers and Install Docker on Window Servers

Steps for enabling necessary features and installing necessary packages for deploying docker and containers on Windows Server 2016

Step 1: Install and Import Docker Package Provider

Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module DockerMSFTProvider
Import-Module -Name DockerMSFTProvider -Force
Import-Packageprovider -Name DockerMSFTProvider -Force

Use Find-Package to verify the new docker package is available:


PS C:\> Find-Package docker
################################
# Expected Output
################################
Name                           Version          Source           Summary
----                           -------          ------           -------
Docker                         18.09.5          DockerDefault    Contains Docker EE for use with Windows Server.
Docker                         1.3.2            PSGallery        This module helps with development using Doc...

Step 2 (VM Only) : Enable Nested Virtualization

Make sure the virtual machine is down.

For Windows-VM:

# Enable Nested Virtualization
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true
# In order for network packets to be routed through two virtual switches
Get-VMNetworkAdapter -VMName <VMName> | Set-VMNetworkAdapter -MacAddressSpoofing On

For Xen-Server

Check if physical cpu has the flag vmx which stands for virtualization support enabled in BIOS for intel VT-x.

In the cfg file, add the following parameters:

nestedhvm=1 
hap=1

Restart the virtual machine.

Step 3: Enable Hyper-V and Container Windows Features

In PowerShell, run the following commands:

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

Restart the virtual machine.

Step 4: Install Docker

Install-Package -Name Docker -Source DockerDefault

If you have not done the system update on the vm, you will get the following error: WARNING: Cannot verify the file SHA256. Deleting the file.

make sure you have the latest update patch on the machine.

PreviousVersion CompatibilityNextUsing Docker to Run MSSQL Image

Last updated 6 years ago

Was this helpful?