VMFleet: The specified network password is not correct

When you do setup of VMFleet in order to run S2D stress and performance tests, you are required to provide values for parameters connectuser and connectpass to describe user credentials for loopback host connection as shown in the example:

.\create-vmfleet.ps1 -basevhd 'C:\ClusterStorage\Collect\VMFleet-Gold_disk_1.vhdx' -vms 10 -adminpass 'Pass123' -connectuser 'rllab\rlevchenko' -connectpass 'RTY$nTyK@2y9'

These credentials are then injected to each VMFleet VM (162 and 163 strings in the create-vmfleet.ps1):

del -Force z:\users\administrator\launch.ps1 -ErrorAction SilentlyContinue
gc C:\ClusterStorage\collect\control\launch-template.ps1 |% { $_ -replace '__CONNECTUSER__',$using:connectuser -replace '__CONNECTPASS__',$using:connectpass } > z:\users\administrator\launch.ps1

Once VMFleet deployed required VMs, you usually start them by using start-vmfleet.ps1, and then VMFleet automatically tries running the injected launch.ps1 mentioned above :

$script = 'c:\run\master.ps1'

while ($true) {
    Write-Host -fore Green Launching $script `@ $(Get-Date)
    & $script -connectuser __CONNECTUSER__ -connectpass __CONNECTPASS__
    sleep -Seconds 1

As a result, master.ps1 will be executed on autologon by each VM using the provided connectuser and connectpass parameters. Master.ps1 establishes a mapping a location containing the Run Script (a standalone load script) and a problem that you might experience at this stage  – wrong credentials.

If you, like me, using special characters in the password (for example, $, @ and etc), you will need to type password using this format: ‘’’ password ‘’’. Otherwise, VMs won’t make a SMB mapping and master.ps1 script failed. The reason is that  connectpass and connectuser values are pasted to the launch.ps1  without any escaping (‘’, “ “ and so on) and PowerShell can cut off your password. So, the right command to create VMFleet VMs, in my example, looks as follows:

.\create-vmfleet.ps1 -basevhd 'C:\ClusterStorage\Collect\VMFleet-Gold_disk_1.vhdx' -vms 10 -adminpass 'Pass123' -connectuser 'rllab\rlevchenko' -connectpass '''RTY$nTyK@2y9'''

I’d also recommend to change ErrorAction to Stop in master.ps1 (45-49 strings) before creating VMs to simplify troubleshooting in case of any errors:

$null = net use l: /d

if ($(Get-SmbMapping) -eq $null) {
    New-SmbMapping -LocalPath l: -RemotePath \\\c$\clusterstorage\collect\control -UserName $connectuser -Password $connectpass -ErrorAction Stop

Public preview of Azure Cloud Shell

At the recent Build conference, Microsoft officially announced public preview of Azure Cloud Shell browser-accessible, pre-configured shell experience for managing Azure resources without the overhead of installing, versioning, and maintaining a machine yourself.

Cloud Shell runs entirely on containers orchestrated by Kubernetes and shows us just another example of how container technology can revolutionize solutions built on Azure.

Machine for Cloud Shell is not persistent and temporary provided on a per-request basis (1 machine per 1 user, permissions are set as a regular Linux user). That machine’s hosting is free. You just need to pay for storage that it consumes (file share –> described later in this post).

Cloud Shell comes with the support of well known tools and languages:

Category Name
Azure Tools Azure CLI 2.0 and 1.0
Linux shell interpreter Bash,sh
Text editors vim,nano,emacs
Containers Docker,Kubectl, DC/OS CLI
Language Version
.NET 1.01
Go 1.7
Node.js 6.9.4
Python 2.7 and 3.5
More: use this link

It supports Bash experience so far. Everyone’s favorite PowerShell is coming soon. You can try the new shell today by pressing the special icon at the top navigation bar of the Azure portal.


The new storage account (LRS), resources group and file share will be created during one-time setup.

  • Resource group is named: cloud-shell-storage-
  • Storage Account: cs-uniqueGuid
  • File Share: cs—com-uniqueGuid

As Cloud Shell’s machine is temporary, file share makes possible to persist your bash $Home directory. This file share will mount as clouddrive under your $Home directory and it’s also used to store a 5 GB image created for you that automatically updates and persists your $Home directory as well (see the pic below, acc_<username>.img).

Note: you pay only for this file share. There are no any  additional compute costs.


To download/upload files you can use portal as usual. For example, I created txt-file in my clouddrive and would like to download it to my local machine. So, I need to open the file share associated with cloud shell, locate the file “text.txt” and just hit “Download”.

To add some files from local machine to clouddrive, use the “Upload” button and then check result by running cd clouddrive and  ls in the cloud shell session


As you may noticed, Cloud Shell automatically authenticates on each session for instant access to your resources through the Azure CLI 2.0. You can even use the interactive mode for Azure CLI 2.0 to ease scripting and save a lot of time

azure shell

Each cloud shell session times out after 10 minutes without any activities


That’s great, but that is not the whole news

Cloud Shell is also embedded directly in docs.microsoft.com and it makes Azure CLI samples in documentation fully interactive. To evaluate this new functionality, go to Azure CLI 2.0 documentation, log in to Cloud Shell by clicking “Try it” and start learning in just a new way.

azure cloud shell and docs

Some more examples

Creating VM in the cloud shell


List of VMs in the resource group with customized output