Windows Azure 上传 VM
One of the great features of Windows Azure is VHD mobility. Simply put it means you can upload and download VHDs to and from the cloud.
Note: If you are used to using CSUpload.exe for uploading VHDs you should switch to PowerShell. CSUpload.exe has been marked as deprecated and will likely not ship in future SDKs.
Technical Notes
A few things to point out while I’m here. Currently, Windows Azure only supports the VHD file format in a fixed disk format.
That being said the Add-AzureVHD cmdlet supports converting a dynamic VHD on upload to a fixed VHD so you do not have to worry about converting them up front.
Also, both the Add-AzureVHD and Save-AzureVHD cmdlets have intrinsic knowledge of the VHD file format and during upload or download only copy the written bytes and skip the empty. This is a huge optimization!
So let’s jump right in using PowerShell. This page assumes your PowerShell client is already setup to access your Windows Azure subscription. If this is not the case read through the Getting Started with Windows Azure PowerShell Cmdlets first.
Uploading a VHD
import-module azure |
As you can see the code to upload a VHD to your Windows Azure Storage Account is pretty simple.
To make the VHD usable you need to register it with Windows Azure.
Register VHD as a Data Disk
# Register as a plan old data disk |
When the code above is run the uploaded VHD will be registered in Windows Azure as a data disk named ‘mydatadisk’. Refresh the portal and you will see it in the Disks list and it will also be available for attaching to a virtual machine.
If you are uploading a VHD with an operating system on it you need to tell that to Windows Azure.
Register VHD as an OS Disk
This code registers the disk as bootable. Meaning you can now create a virtual machine and specify this disk as the boot disk.
# Register as a plan old data disk |
Creating a VM from uploaded VHDs
As I mentioned above you can specify a disk to boot from instead of provisioning from an image. The PowerShell code to do so is simple. You can of course add disks and endpoints in between New-AzureVMConfig and New-AzureVM as well.
New-AzureVMConfig -DiskName 'myosdisk' -Name 'myvm1' -InstanceSize Small | |
Now that you have seen how to upload VHD’s to the cloud let’s walk through the equally simple download process.
Downloading a VHD from Windows Azure
The same pattern as Add-AzureVHD just reversed!
select-azuresubscription "mysubscriptionname" |
That’s it! Uploading and downloading VHDs to Windows Azure is fast and simple.
Windows Azure 上传 VM的更多相关文章
- Windows Azure 上 Linux VM 中的交换空间 – 第 2 部分
本文章由 Azure CAT 团队的 Piyush Ranjan (MSFT) 撰写. 在前一篇文章 Windows Azure 上Linux VM 中的交换空间第 1 部分中,我介绍了在默认情况下, ...
- 在Windows Azure上配置VM主备切换(1)——Linux篇
对任何一个上线系统来说,高可用设计是不可或缺的一个环节,这样才可以确保应用可以持续.稳定的运行,而不是频繁的掉线.停机.高可用设计的核心思路很简单,就是消除一切单点故障,将单点链路或者节点升级为多点. ...
- 在 Windows Azure 上部署预配置 Oracle VM
Microsoft 和 Oracle 近期宣布建立战略合作伙伴关系,基于此,我们将通过 Windows Azure 镜像库推出多种常用的 Oracle 软件配置.即日起,客户可以在 Windows S ...
- 如何将SQL Server运行到Windows Azure上
从2012年6月6日开始,Windows Azure上一些强大的新功能现在可用于预览,包括新的Windows Azure虚拟机(VM).其中有关Windows Azure虚拟机最强大的一件事是他们利用 ...
- 在 Windows Azure 上部署并定制化 FreeBSD 虚拟机镜像
发布于 2014-12-11 作者 陈阳 FreeBSD 基础镜像现已登陆中国的 VM Depot! 对于青睐 BSD 而非 Linux 的开源爱好者来说,这无疑是个好消息.同时,随着该基础镜像 ...
- 在 Windows Azure 上设计多租户应用程序
作者:Suren Machiraju 和 Ralph Squillace 审校:Christian Martinez.James Podgorski.Valery Mizonov 和 Michael ...
- azure 上传blob到ams(CreateFromBlob)
遇到的错误:The destination storage credentials must contain the account key credentials,参数名: destinationS ...
- Windows Azure 上的 Symfony,适用于 PHP 开发者的强大组合
发布于 2014-06-13 作者 陈 忠岳 Symfony 是针对 PHP 开发者的流行开源 Web 应用框架.现在,您可以更轻松地在 Windows Azure 上使用它,这都归功于 Ben ...
- 快速学习使用 Windows Azure 上的 SharePoint Server 2013
为了在当今的企业环境中占据一席之地,您需要能够迅速顺应变化和应对挑战.有时,需要及时调整您的SharePoint 基础结构以保持竞争优势. 基础结构即服务可通过随时使用.即付即用的解决方案应对这 ...
随机推荐
- Mysql :removeAbandonedTimeout:180
#数据库链接超过3分钟开始关闭空闲连接 秒为单位 removeAbandonedTimeout:180 这个参数会是一个坑吗? http://www.oschina.net/question/1867 ...
- SQL1159 Initialization error with DB2 .NET Data Provider, reason code 7(问题补充)
SQL1159 Initialization error with DB2 .NET Data Provider, reason code 7 需要注册GAC,修改注册表 IBM官方方案: http: ...
- Oracle Purchasing QUESTIONS AND ANSWERS
Topic Summary Topic: CORRECTIONS: Corrections Topic: DELIVER: Receiving Delivery Topic: DROPSHIP: Dr ...
- python 字符串连接
字符串连接 方法1: 用字符串的join方法 a = ['a','b','c','d']content = ''content = ''.join(a)print content 方法2: 用字符串的 ...
- Linux下添加硬盘,分区,格式化详解
2005-10-17 在我们添加硬盘前,首先要了解linux系统下对硬盘和分区的命名方法. 在Linux下对IDE的设备是以hd命名的,第一个ide设备是hda,第二个是hdb.依此类推 我们一般主板 ...
- 【转】BUFFER CACHE WAIT EVENTS
文章转自:http://oracleinaction.com/buffer-cache-wait-events/
- JavaScript Scoping and Hoisting
JavaScript中所有变量及函数名会自动提升 http://www.cnblogs.com/betarabbit/archive/2012/01/28/2330446.html
- 暴力清除Android中的短信
有些短信程序有bug,当短信(特别是彩信)没有接收完整,或者是一些异常情况下,你会收到一条短信但是看不到或者看不了. 此时郁闷的事情就来了,系统会提醒你还有1条未读短信,但是你满世界都找不到这条短信. ...
- C#基础总结之三循环控制-for-数组-乘法表-arraylist
#region 第三天 作业 乘法表 ////正三角 //for (int i = 1; i < 10; i++) //{ // for (int j = 1; j <= i; j++) ...
- DbUtils使用例子
DbUtils: JDBC Utility Component Examples This page provides examples that show how DbUtils may be us ...