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

推荐订阅源

WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cloudbric
Cloudbric
P
Palo Alto Networks Blog
T
Threatpost
T
Tor Project blog
T
Tenable Blog
AWS News Blog
AWS News Blog
Project Zero
Project Zero
L
LangChain Blog
Cyberwarzone
Cyberwarzone
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
C
CERT Recently Published Vulnerability Notes
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Latest
Security Latest
云风的 BLOG
云风的 BLOG
I
Intezer
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
MongoDB | Blog
MongoDB | Blog
aimingoo的专栏
aimingoo的专栏
K
Kaspersky official blog
Jina AI
Jina AI
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
TaoSecurity Blog
TaoSecurity Blog
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
IT之家
IT之家
Forbes - Security
Forbes - Security
The Hacker News
The Hacker News
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
Y
Y Combinator Blog

博客园 - 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

#>