Recently I came across an issue on our Hyper-V Cluster. One of the VM was stuck in the “Stopping” state. I had to force the VM to shutdown by kill its process on the Hyper-V host. To do so, I first find out the VM’s GUID and then kill the process with the same GUID. Needless to say, the whole process can be achieved with the PowerShell commands below.
\# Get the VM GUID and find the process with the GUID $VM \= Get-VM \-Name $VMName \-ErrorAction Stop $VMGUID \= $VM.
There are a lot ARM templates out there can do this. But in this post, we will go through the nitty gritty of using DSC to automate the PDC setup. Before we begin, I assume you already know what DSC is and does. Otherwise, check it out here.
First, let’s build a new VM in Azure with these PowerShell commands. In this case, the VM will have direct Internet and can be accessed via Internet directly.
Here are the steps I took to get AWS CLI installed on my WSL Ubuntu.
Before we install AWS CLI package itself, we need to get Python package manager pip installed first.
Download pip install script. Notice I use –k here, this is because I am running this behind company proxy, the proxy changes HTTPS certificate to its own certificate. Without –k the command will fail. You can leave it out if you have direct Internet access
One of the things I have been working on is to help our developers to containerize their applications and deploy them to AWS ECS. In this post, I will walk through the steps to upload a Docker image to AWS ECR (Elastic Container Repository).
As the first step, we need to provision the ECR with CloudFormation template.
Below is a simple CFN template written in YAML.
AWSTemplateFormatVersion:"2010-09-09"Description:\> Play stack Parameters:RepoName:Default:tomrepo Description:ECR Repoistory Name Type:String \# required ConstraintDescription:must be a name Resources:myrepo:Type:AWS::ECR::Repository Properties:RepositoryName:!
Do you ever find yourself face this kind the situation: You are told to provision new resources with ARM templates to an existing resource group that already has VMs and vNets built and running. How can you add new subnets and VMs to the resource group without breaking those ones already there?
Unlike AWS Cloud Formation Templates, Microsoft ARM Templates do not provide “Update” option for past deployments. In order to modify the existing environment, the usual option is to make the change through CLI, PowerShell or Azure portal.