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 基础结构以保持竞争优势. 基础结构即服务可通过随时使用.即付即用的解决方案应对这 ...
随机推荐
- Offer_answer_with_SDP_rfc3264
Network Working Group J. RosenbergRequest for Comments: 3264 dynamicsoftObsoletes: 2543 H. Schulzrin ...
- c++ 模板元编程的一点体会
趁着国庆长假快速翻了一遍传说中的.大名鼎鼎的 modern c++ design,钛合金狗眼顿时不保,已深深被其中各种模板奇技淫巧伤了身...论语言方面的深度,我看过的 c++ 书里大概只有 insi ...
- [0x00 用Python讲解数据结构与算法] 概览
自从工作后就没什么时间更新博客了,最近抽空学了点Python,觉得Python真的是很强大呀.想来在大学中没有学好数据结构和算法,自己的意志力一直不够坚定,这次想好好看一本书,认真把基本的数据结构和算 ...
- [引用]SQLServer占CPU100%
程序猿是如何解决SQLServer占CPU100%的 文章目录 遇到的问题 使用SQLServer Profiler监控数据库 SQL1:查找最新的30条告警事件 SQL2:获取当前的总报警记录数 ...
- [OpenCV] Image Processing - Grayscale Transform
"每个像素的输出值只取决于其输入值" 重难点:Histogram equalization 参考:笑得很甜 http://blog.csdn.net/xiaowei_cqu/art ...
- 浅谈DOM性能考虑
浅谈DOM性能考虑 很多人都会忽视脚本对Web应用整体性能的影响.为保证应用的流畅运行,在为文档编写和应用脚本时,需要注意一些问题.一.尽量减少访问DOM和尽量减少标记 访问DOM的方式对脚本性 ...
- MVC,如何在视图中声明方法,调用方法?
<div> <!--在视图中申明方法,此方法的类型已经固定为HelperResult--> @helper ShowHello(string s) { <div> ...
- 组合数学 - 置换群的幂运算 --- poj CARDS (洗牌机)
CARDS Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 1448 Accepted: 773 Description ...
- GitHub Extension for Visual Studio 2.0 is now available
GitHub Extension for Visual Studio 2.0 is now available We're pleased to announce that version 2.0 o ...
- 关于Chrome Dev Tool
★注意点一:函数名,方法名要拼写准确;