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 基础结构以保持竞争优势. 基础结构即服务可通过随时使用.即付即用的解决方案应对这 ...
随机推荐
- Eclipse:Cannot complete the install because of a conflicting dependency.问题解决
今天尝试在线更新ADT(22到23)的时候,遇到了这么个问题,从错误提示中初步看起来是存在引用的冲突: 估计大家在把22升级到23的时候都会遇上这个问题,新旧版冲突,感觉像是ADT自己的bug. 其实 ...
- MINE
MINE MINE is an app for the nearly 1.2 million songwriters, composers, musicians, and publishers who ...
- Heavy Transportation(最短路 + dp)
Heavy Transportation Time Limit:3000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64 ...
- Fiddler捕捉ASP.NET WebSite调用WebService、WCF服务
Fiddler默认会注册一个代理,有时会发现WebSite调用的WebService或者WCF服务无法被捕捉到.其实是由于运行的站点关联的应用程序池使用的账号和我们当前登陆操作系统的用户不同,自然它们 ...
- 推荐一款炫酷的提示框插件SweetAlert
官方网址 http://t4t5.github.io/sweetalert/ 项目地址 https://github.com/t4t5/sweetalert
- 【Thinking in Java-CHAPTER 3】操作符
优先级 赋值 对象在使用c=d,那么c和d都指向原本只有d指向的那个对象. 方法调用中的别名问题:当一个对象作为参数传递到一个函数中,函数改变了这个参数,则改变了传递进来的对象: 自增和自减 浮点型的 ...
- Java知多少(完结)
系列文章: Java知多少(上) Java知多少(中) Java知多少(下)
- ASP.NET MVC 中如何用自定义 Handler 来处理来自 AJAX 请求的 HttpRequestValidationException 错误
今天我们的项目遇到问题 为了避免跨站点脚本攻击, 默认我们项目是启用了 validateRequest,这也是 ASP.NET 的默认验证规则.项目发布后,如果 customError 启用了,则会显 ...
- [转载]SharePoint 2013 解决方案中使用JavaScript
作为在SharePoint应用程序中使用JavaScript的第一步,就是要知道如何将一个写好的.js文件,引用到页面上.嗯,你可能觉得这个话题太简单了,"引用一个.js文件不就是在页面上方 ...
- Linux常用命令回顾
文件操作:ls 查看文件ls -a 查看全部文件,包括隐藏文件(以.开头)ls -l 查看文件的详细信息(ll同样的效果)ls -lh 查看文件的详细信息,人性化显示,文件大小标注单位文件权限-代表文 ...