Last active
June 30, 2016 20:56
-
-
Save shawnweisfeld/91ab676f6a6c4c72b7104a78877f72d6 to your computer and use it in GitHub Desktop.
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
$Link = "[Full path to where you copied the VHD]" | |
$S = New-AzureVMImageDiskConfigSet | |
Set-AzureVMImageOSDiskConfig -DiskConfig $S -HostCaching ReadWrite -OSState "Generalized" -OS "Linux" -MediaLink $Link | |
$IMGName = "Snapcloud"; | |
Add-AzureVMImage -ImageName $IMGName -Label "SnapCloud" -Description "SnapCloud" -DiskConfig $S -Eula "http://sphere3d.com/snapcloud" -ImageFamily Linux -PublishedDate (Get-Date) -PrivacyUri "http://sphere3d.com/snapcloud" -RecommendedVMSize Small -IconName "Icon01" -SmallIconName "SmallIcon01" -ShowInGui | |
$un = "[User Name]" | |
$pwd = "[Password]" | |
$vmname="[VM Name]" | |
$vm1 = New-AzureVMConfig -Name $vmname -InstanceSize "Small" -ImageName $IMGName | |
$vm1 | Add-AzureProvisioningConfig -Linux -LinuxUser $un -Password $pwd | |
$vm1 | Add-AzureEndpoint -Protocol tcp -LocalPort 443 -PublicPort 443 -Name 'HTTPs' | |
$vm1 | Set-AzureEndpoint -Protocol tcp -LocalPort 22 -PublicPort 22 -Name 'SSH' | |
$vm1 | New-AzureVM -ServiceName $vmname -Location "USGov Virginia" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment