Wednesday, August 10, 2016

Docker Setup on Windows 10

Here are my findings, challenges and workarounds when I  installed docker on Windows 10 machine.

Step 1:
Install docker from https://docs.docker.com/toolbox/toolbox_install_windows/

Step 2:
After Installation, Open "Docker QuickStart Terminal"

For me, Docker QuickStart Terminal Prompted an error to disable virtualization as shown in below window ( but in one of the youtube video they have enabled virtualization on system to work with docker, I am not sure why I need to disable virtualization in Windows 10 machine)

Step 3:
After spending a lot of time on various articles to disable an virtualization in windows 10, below command solved the issue to disable virtualization.


dism.exe /online /disable-feature:microsoft-hyper-v





Step 4:

After the above step, I have restarted my system to reflect the changes.


Step 5:

Open Docker Quickstart Terminal, it should open window with IP address and docker image.





Step 6:

Start using dockers as per your requirement ;)


Enable Virtualization Command

Enable virtualization on system with below command 






Wednesday, August 3, 2016

Start and Stop Azure VMs Via Powershell

With PowerShell it is fast and convenient to manage my development and test servers running on Windows Azure. It is just easier to use command line tools than logging into the Azure management portal shutting down each VM. To set up PowerShell:
  1. Install the Azure PowerShell cmdlets
  2. Start the Azure PowerShell (do not start the regular PowerShell as it is not preconfigured with the Azure PowerShell cmdlets)
  3. Authorize Azure PowerShell to access your Azure subscriptions by typing in the Azure PowerShell shell:
Add-AzureAccount

In the sign-in window, provide your Microsoft credentials for the Azure account.

If you like me have multiple Azure subscriptions – change the default subscription with:
Select-AzureSubscription [-SubscriptionName]
To start an Azure VM the syntax is:


Start-AzureVM [–Name] [-ServiceName]

To start a VM named vs2015 in the cloud service lybCloudService requires as little as:

Start-AzureVM vs2015 lybCloudService

To stop the VM is just as easy

Stop-AzureVM [-Name] [-ServiceName]

f it is the last running VM in the cloud service, then you will be asked if you want to deallocate the cloud service or not, as the cloud service will release the public IP address. That is not a problem if you access your VM via DNS name – which most people do.
You can override the question by appending –Force like this:

Stop-AzureVM vs2015 lybCloudService –Force

There are many useful Azure PowerShell cmdlets to use. To list all Azure PowerShell cmdlets:

List all VMs:

Get-AzureVM [–Name] [-ServiceName]

The PowerShell prompt is just like a normal command prompt, so you can use tab completion and F7 to show all executed commands.