惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
Help Net Security
Help Net Security
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
C
Cisco Blogs
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
L
LINUX DO - 热门话题
Security Latest
Security Latest
A
Arctic Wolf
G
GRAHAM CLULEY
月光博客
月光博客
S
Securelist
D
Docker
J
Java Code Geeks
T
Troy Hunt's Blog
T
Tenable Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
SecWiki News
SecWiki News
S
Security @ Cisco Blogs
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 最新话题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
aimingoo的专栏
aimingoo的专栏
博客园 - 【当耐特】
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 三生石上(FineUI控件)
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
Netflix TechBlog - Medium
Vercel News
Vercel News
Forbes - Security
Forbes - Security
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
B
Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
S
Secure Thoughts
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Check Point Blog
云风的 BLOG
云风的 BLOG
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Blog of Author Tim Ferriss
L
Lohrmann on Cybersecurity
F
Full Disclosure
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed

博客园 - HollisYao

Azure Site to Site VPN 配置手册 - HollisYao 使用Azure REST API创建虚拟机 SharePoint 2013 地址栏_layouts/15/start.aspx# SharePoint 2013 Workflow Manager 工作流配置注意事项 InfoPath 发布表单到SharePoint库报错 InfoPath发布到SharePoint Server 2013报错 log4net+spring.net+Nhibernate 内部异常捕捉问题 在log4net中控制nhibernate输出 VMWare host 32位 guest 64位 QuickPart Permission问题 ASP.Net 域自动登录(AD自动登录) - HollisYao - 博客园 Feature部署EventHandler注意事项 QuickPart功能改进_Sharepoint_MOSS 部署WebPart的两种方式 MOSS/Sharepoint 2007 创建网站集之后,链接出现“未找到文件”错误提示 Apache2.2.8、php5.2.6、mysql5、phpMyAdmin2.11.6在Windows Vista下的安装和配置 Vista SP1、IIS7,安装ASP.Net 1.1、VS2003、NetAdvantage 2004vol、Sql Server2000全攻略 博客园怎么了? 将 MS SQL Server 2005 SP2 整合到安装文件--【脚本修正】
创建Azure DS 虚拟机并附加SSD硬盘
HollisYao · 2016-06-05 · via 博客园 - HollisYao

$subscriptionName = "Windows Azure Enterprise Trial" #订阅名称

$location = "China East"

$serviceName = "hollis" #云服务名称

$storageAccount = "hollispremium" #存储账户名

#虚拟网络变量

$vnetName = "hollisvneteast"

$subNetName = "Subnet-1"

$vnetIP = "10.0.0.10"

$publicIPName = "WebPublicIP" #公网预留IP名称

#虚拟机相关变量

$vmName ="hollis-dev" #虚拟机名称

$vmSize ="Standard_DS12" #虚拟机规格

$osImageName = "55bc2b193643443bb879a78bda516fc8__Windows-Server-2012-R2-20160430-en.us-127GB.vhd" #操作系统镜像名

$adminName = "vmadmin" #管理员登录名

$adminPassword = "1234!@#$" #管理员密码

#登录

Add-AzureAccount -Environment AzureChinaCloud

#设置当前订阅

Select-AzureSubscription -SubscriptionName $subscriptionName -Current

#创建一个高级存储账户,如果没有的话

#New-AzureStorageAccount -StorageAccountName $storageAccount -Location $location -Type "Premium_LRS"

#配置刚才创建的存储为默认存储

set-AzureSubscription -SubscriptionName $subscriptionName -CurrentStorageAccount $storageAccount

#创建云服务,如果需要的话

#New-AzureService -ServiceName $serviceName -Location $location

#获取操作系统镜像

$osImage = Get-AzureVMImage -ImageName $osImageName

#配置虚拟机

New-AzureVMConfig -Name $vmName -InstanceSize $vmSize -ImageName $osImage.ImageName |

#设置用户名密码,并设置系统时间为北京时间

Add-AzureProvisioningConfig -Windows -AdminUsername $adminName -Password $adminPassword -TimeZone 'China Standard Time' |

#设置子网

Set-AzureSubnet -SubnetNames $subNetName |

#固定内网IP

Set-AzureStaticVNetIP -IPAddress $vnetIP |

#开始创建虚拟机

New-AzureVM -ServiceName $serviceName -VNetName $vnetName -Location $location

#-----为DS虚拟机增加SSD数据磁盘-------

$vm = Get-AzureVM -ServiceName $serviceName -Name $vmName

$LunNo = 2 #磁盘顺序,2是指第三块盘,E盘。C和D两个分别是两块磁盘

$path = "http://" + $storageAccount + ".blob.core.chinacloudapi.cn/vhds/" + "myDataDisk_" + $LunNo + "_PIO.vhd"

$label = "Disk " + $LunNo

$diskSize = 512 #数据盘大小,GB单位

$cache = "ReadOnly" #缓存方式,数据盘只对读取启用缓存

#附加SSD磁盘

Add-AzureDataDisk -CreateNew -MediaLocation $path -DiskSizeInGB $diskSize -DiskLabel $label -LUN $LunNo -HostCaching $cache -VM $vm | Update-AzureVm

<#

#------查找映像------

Get-AzureVMImage | where-object { $_.Label -like "Windows Server 2012 r2*" }

#--------更改DS虚拟机的规格-----

Get-AzureVM -ServiceName "[云服务名称]" -Name "[虚拟机名称]" | Set-AzureVMSize "Standard_DS14" | Update-AzureVM

#>