Last active
August 29, 2015 14:12
-
-
Save sjwaight/b9723e3488d98873dd91 to your computer and use it in GitHub Desktop.
Create a new CentOS 7 Linux VM in Azure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script assumes you have setup your subscription and | |
# have a default storage account in West US. | |
# You should change these to values you want. | |
$cloudService = "{cloudservice}" | |
$hostname = "{dockermanagementhost}" | |
$linuxUser = "{linxuser}" | |
$linuxPass = "{linxpasswd}" | |
$location = "West US" | |
# use CentOS 7 image | |
$centOSImageName = (Get-AzureVMImage | Where-Object {$_.ImageName -like "*OpenLogic-CentOS-70*"})[0].ImageName | |
New-AzureVMConfig -Name $hostname -InstanceSize Small -ImageName $centOSImageName | Add-AzureProvisioningConfig –Linux –LinuxUser $linuxUser -Password $linuxPass | New-AzureVM -ServiceName $cloudService -Location $location |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment