{"id":1120,"date":"2014-11-21T11:25:18","date_gmt":"2014-11-21T03:25:18","guid":{"rendered":"http:\/\/i-services.info\/mscloud\/?p=1120"},"modified":"2020-02-27T09:46:58","modified_gmt":"2020-02-27T01:46:58","slug":"%e9%81%b7%e7%a7%bb%e9%9b%b2%e7%ab%af%e6%9c%8d%e5%8b%99%e8%88%87%e8%99%9b%e6%93%ac%e6%a9%9f%e5%99%a8","status":"publish","type":"post","link":"http:\/\/i-services.info\/mscloud\/?p=1120","title":{"rendered":"\u9077\u79fb\u96f2\u7aef\u670d\u52d9\u8207\u865b\u64ec\u6a5f\u5668"},"content":{"rendered":"<p><b>\u9077\u79fb\u96f2\u7aef\u670d\u52d9\u8207\u865b\u64ec\u6a5f\u5668<\/b><b><\/b> <\/p>\n<p>\u5be6\u52d9\u4e0a\uff0c\u70ba\u4e86\u78ba\u4fdd\u8cc7\u6599\u7684\u79fb\u8f49\u9806\u5229\u8207\u4e00\u81f4\u6027\uff0c\u7121\u8ad6\u662f\u865b\u64ec\u6a5f\u5668\u3001\u7db2\u7ad9\u6216\u8cc7\u6599\u5eab\u7cfb\u7d71\u79fb\u8f49\u524d\uff0c\u90fd\u5efa\u8b70\u60a8\u5148\u5c07\u5b83\u5011\u95dc\u6a5f\u6216\u8a2d\u5b9a\u70ba\u505c\u6b62\u670d\u52d9\u3002 <\/p>\n<p>\u4ee5\u4e0b\u79fb\u8f49\u4f5c\u696d\u90fd\u662f\u5728\u672a\u95dc\u6a5f\u7684\u72c0\u6cc1\u4e0b\u5b8c\u6210\uff0c\u975e\u5e38\u9806\u5229\u3002 <\/p>\n<p><b>\u8907\u88fd\u865b\u64ec\u6a5f\u5668\u6a94<\/b><b><\/b> <\/p>\n<p>\u7d93\u904e\u591a\u65b9\u6e2c\u8a66\uff0c\u4ee5\u4e0b\u7684\u65b9\u5f0f\u8655\u7406\u901f\u5ea6\u6700\u70ba\u5feb\u901f\uff0c\u4e14 <\/p>\n<p>\u2460 \u8acb\u900f\u904e\u4e0b\u9762\u7db2\u5740\u4e0b\u8f09vmcopy.ps1\uff0c\u4e26\u5b58\u653e\u5728\u4efb\u4e00\u76ee\u9304\u3002 <\/p>\n<p><a href=\"http:\/\/gallery.technet.microsoft.com\/scriptcenter\/Copy-a-Virtual-Machine-83d192a5\">http:\/\/gallery.technet.microsoft.com\/scriptcenter\/Copy-a-Virtual-Machine-83d192a5<\/a> <\/p>\n<p>\u2461 \u8996\u9700\u8981\u60a8\u53ef\u4ee5\u6709\u4e0b\u9762\u4e8c\u7a2e\u8655\u7406\u7684\u65b9\u5f0f<\/p>\n<table cellspacing=\"0\" cellpadding=\"2\" width=\"400\" border=\"10\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"400\">\n<p># <font color=\"#ff0000\">Copy a virtual machine to a different subscription<\/font>  <\/p>\n<p>&nbsp; .\\vmcopy.ps1 -SourceSubscription &#8220;source subscription&#8221; `  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -DestinationSubscription &#8220;destination subscription&#8221; `  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -VirtualMachineName &#8220;existingvmname&#8221; `  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -SourceServiceName &#8220;sourcecloudservice&#8221; `  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -DestinationServiceName &#8220;destinationcloudservice&#8221; `  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -DestinationStorageAccount &#8220;destinationstorageaccount&#8221; `  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -Location &#8220;West US&#8221;  <\/p>\n<p>&nbsp; # <font color=\"#ff0000\">Copy a virtual machine to a different subscription and specify an existing virtual network and subnet<\/font>.  <\/p>\n<p>&nbsp; .\\vmcopy.ps1 -SourceSubscription &#8220;source subscription&#8221; `  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -DestinationSubscription &#8220;destination subscription&#8221; `  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -VirtualMachineName &#8220;existingvmname&#8221; `  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -SourceServiceName &#8220;sourcecloudservice&#8221; `  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -DestinationServiceName &#8220;destinationcloudservice&#8221; `  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -DestinationStorageAccount &#8220;destinationstorageaccount&#8221; `  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -VNETName &#8220;DestinationVNET&#8221; `  <\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -SubnetName &#8220;DestinationSubnet&#8221;<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp; \u2462 \u4f9d\u6211\u7684\u74b0\u5883\uff0c\u6211\u7d44\u5408\u597d\u7684\u6307\u4ee4\u5982\u4e0b\uff1a <\/p>\n<p><font color=\"#ff0000\"><b>\u8907\u88fd<\/b><b>DT-B2C-Web01<\/b><b>\u7684\u6307\u4ee4\uff1a<\/b><\/font><b><\/b> <\/p>\n<p>.\\vmcopy.ps1 -SourceSubscription <font color=\"#0000ff\">&#8220;Visual Studio Ultimate with MSDN&#8221; <\/font>-DestinationSubscription <font color=\"#0000ff\">&#8220;Windows Azure MSDN &#8211; Visual Studio Ultimate&#8221;<\/font> -VirtualMachineName <font color=\"#0000ff\">&#8220;DT-B2C-Web01&#8221;<\/font> -SourceServiceName <font color=\"#0000ff\">&#8220;DT-B2C&#8221;<\/font> -DestinationServiceName <font color=\"#0000ff\">&#8220;DT-B2C2&#8221;<\/font> -DestinationStorageAccount <font color=\"#0000ff\">&#8220;daniel&#8221;<\/font> -Location <font color=\"#0000ff\">&#8220;east asia&#8221;<\/font>  <\/p>\n<p><font color=\"#ff0000\"><b>\u8907\u88fd<\/b><b>DT-B2C-SQL01<\/b><b>\u7684\u6307\u4ee4\uff1a<\/b><\/font><b><\/b> <\/p>\n<p>.\\vmcopy.ps1 -SourceSubscription &#8220;Visual Studio Ultimate with MSDN&#8221; -DestinationSubscription &#8220;Windows Azure MSDN &#8211; Visual Studio Ultimate&#8221; -VirtualMachineName &#8220;DT-B2C-SQL01&#8221; -SourceServiceName &#8220;DT-B2C&#8221; -DestinationServiceName &#8220;DT-B2C2&#8221; -DestinationStorageAccount &#8220;daniel&#8221; -Location &#8220;east asia&#8221;  <\/p>\n<p><font color=\"#ff0000\">\u8aaa\u660e\u5982\u4f55\u53d6\u5f97\u53c3\u6578\u5982\u4e0b\uff1a<\/font> <\/p>\n<p><b>SourceSubscription:<\/b>\u4f86\u6e90\u7aef\u8a02\u95b1\uff0c\u60a8\u53ef\u4ee5\u900f\u904eGet-AzureSubscription | FL SubscriptionName\u67e5\u8a62 <\/p>\n<p><b>DestinationSubscription:<\/b>\u76ee\u7684\u7aef\u8a02\u95b1\uff0c\u60a8\u53ef\u4ee5\u900f\u904eGet-AzureSubscription | FL SubscriptionName\u67e5\u8a62 <\/p>\n<p><b>VirtualMachineName:<\/b>\u4f86\u6e90\u7aef\u865b\u64ec\u6a5f\u5668\u540d\u7a31<b><\/b> <\/p>\n<p><b>SourceServiceName:<\/b>\u4f86\u6e90\u7aef\u96f2\u7aef\u670d\u52d9\u540d\u7a31<b><\/b> <\/p>\n<p><b>DestinationServiceName:<\/b>\u76ee\u7684\u7aef\u96f2\u7aef\u670d\u52d9\u540d\u7a31\uff0c\u4e0d\u53ef\u8ddf\u4f86\u6e90\u7aef\u4e00\u6a23 <\/p>\n<p><b>DestinationStorageAccount:<\/b>\u76ee\u7684\u7aef\u5132\u5b58\u9ad4\u5e33\u6236<b><\/b> <\/p>\n<p><b>Location<\/b>\u76ee\u7684\u7aef\u96f2\u8cc7\u6599\u4e2d\u5fc3\u4f4d\u7f6e<b><\/b> <\/p>\n<p>\u2463 \u4ee5\u7cfb\u7d71\u7ba1\u7406\u54e1\u7684\u8eab\u4efd\u57f7\u884c\u4e0b\u9762\u6307\u4ee4\u4ee5\u6e96\u5099Microsoft Azure\u7684\u5e33\u865f\u8207\u8a2d\u5b9aPowerShell\u7684\u57f7\u884c\u539f\u5247\uff1a <\/p>\n<p>Set-ExecutionPolicy Unrestricted <\/p>\n<p>Add-AzureAccount <\/p>\n<p><a href=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image001.png\"><img loading=\"lazy\" title=\"clip_image001\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"clip_image001\" src=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image001_thumb.png\" width=\"932\" height=\"186\"><\/a> <\/p>\n<p>\u2464 \u5c07\u4e0a\u9762\u7d44\u5408\u597d\u7684\u6307\u4ee4\u8cbc\u5230Windows PowerShell\u7684\u57f7\u884c\u8996\u7a97\uff0c\u5f8c\u7e8c\u7684\u4f5c\u696d\u6642\u9593\u9700\u8981\u4e00\u4e9b\u6642\u9593\uff0c\u8acb\u8010\u5fc3\u7b49\u5f85\u3002 <\/p>\n<p><a href=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image002.png\"><img loading=\"lazy\" title=\"clip_image002\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"clip_image002\" src=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image002_thumb.png\" width=\"634\" height=\"433\"><\/a> <\/p>\n<p>\u2465 \u8996\u60a8\u7684\u7db2\u8def\u8207\u865b\u64ec\u6a5f\u5668\u78c1\u789f\u5927\u5c0f\u800c\u6709\u6240\u4e0d\u540c\uff0c\u4ee5\u6211\u7684\u4e8c\u53f0\u6a5f\u5668\u90fd\u662f127G\u800c\u8a00\uff0c\u5206\u5225\u82b1\u4e8616\u5206\u9418\u548c23\u5206\u9418\uff0c\u5f85\u60a8\u770b\u5230\u4e0b\u9762\u8996\u7a97\u6642\uff0c\u5c31\u8868\u793a\u865b\u64ec\u6a5f\u5668\u5df2\u7d93\u8907\u88fd\u5b8c\u6210\u3002 <\/p>\n<p><a href=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image003.png\"><img loading=\"lazy\" title=\"clip_image003\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"clip_image003\" src=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image003_thumb.png\" width=\"634\" height=\"433\"><\/a> <\/p>\n<p><b>\u6aa2\u9a57\u8907\u88fd\u5f8c\u7d50\u679c<\/b><b><\/b> <\/p>\n<p>\u2460 \u67e5\u770b\u6240\u6709\u9805\u76ee\uff0c\u591a\u4e86\u4e00\u7d44DT-B2C2\u7684\u96f2\u7aef\u670d\u52d9\u548cDT-B2C-Web01\u3001DT-B2C-SQL01\u4e8c\u53f0\u865b\u64ec\u6a5f\u5668 <\/p>\n<p><a href=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image004.jpg\"><img loading=\"lazy\" title=\"clip_image004\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"clip_image004\" src=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image004_thumb.jpg\" width=\"916\" height=\"433\"><\/a> <\/p>\n<p>\u2461 \u4ee5\u700f\u89bd\u5668\u76f4\u63a5\u57f7\u884c<a href=\"http:\/\/dt-b2c2.cloudapp.net\/\">http:\/\/dt-b2c2.cloudapp.net\/<\/a> \u53ef\u4ee5\u76f4\u63a5\u700f\u89bd\u4e4b\u524d\u8a2d\u8a08\u597d\u7684\u7db2\u7ad9 <\/p>\n<p><a href=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image005.png\"><img loading=\"lazy\" title=\"clip_image005\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"clip_image005\" src=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image005_thumb.png\" width=\"805\" height=\"292\"><\/a> <\/p>\n<p>\u2462 \u5c07DT-B2C\u96f2\u7aef\u670d\u52d9\u76f8\u95dc\u7684\u6a5f\u5668\u95dc\u6a5f\uff0c\u8207\u4fee\u6539\u5916\u90e8DNS CNAME\uff0c\u5c07b2c.nannong.com\u6307\u5230dt-b2c2.cloudapp.net <\/p>\n<p><a href=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image006.png\"><img loading=\"lazy\" title=\"clip_image006\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"clip_image006\" src=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image006_thumb.png\" width=\"932\" height=\"282\"><\/a> <\/p>\n<p><a href=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image007.png\"><img loading=\"lazy\" title=\"clip_image007\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"clip_image007\" src=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image007_thumb.png\" width=\"395\" height=\"433\"><\/a> <\/p>\n<p>\u2463 \u518d\u6b21\u9023\u7dda\u6e2c\u8a66b2c.nannong.com <\/p>\n<p><a href=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image008.png\"><img loading=\"lazy\" title=\"clip_image008\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"clip_image008\" src=\"http:\/\/i-services.info\/mscloud\/wp-content\/uploads\/2014\/11\/clip_image008_thumb.png\" width=\"701\" height=\"304\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9077\u79fb\u96f2\u7aef\u670d\u52d9\u8207\u865b\u64ec\u6a5f\u5668 \u5be6\u52d9\u4e0a\uff0c\u70ba\u4e86\u78ba\u4fdd\u8cc7\u6599\u7684\u79fb\u8f49\u9806\u5229\u8207\u4e00\u81f4\u6027\uff0c\u7121\u8ad6\u662f\u865b\u64ec\u6a5f\u5668\u3001\u7db2\u7ad9\u6216\u8cc7\u6599\u5eab\u7cfb\u7d71\u79fb\u8f49\u524d\uff0c\u90fd\u5efa\u8b70\u60a8\u5148\u5c07\u5b83\u5011\u95dc\u6a5f\u6216\u8a2d\u5b9a\u70ba\u505c\u6b62\u670d\u52d9\u3002 \u4ee5\u4e0b\u79fb\u8f49\u4f5c\u696d\u90fd\u662f\u5728\u672a\u95dc\u6a5f\u7684\u72c0\u6cc1\u4e0b\u5b8c\u6210\uff0c\u975e\u5e38\u9806\u5229\u3002 \u8907\u88fd\u865b&#46;&#46;&#46;<\/p>\n","protected":false},"author":2,"featured_media":1105,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[29],"tags":[],"_links":{"self":[{"href":"http:\/\/i-services.info\/mscloud\/index.php?rest_route=\/wp\/v2\/posts\/1120"}],"collection":[{"href":"http:\/\/i-services.info\/mscloud\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/i-services.info\/mscloud\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/i-services.info\/mscloud\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/i-services.info\/mscloud\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1120"}],"version-history":[{"count":0,"href":"http:\/\/i-services.info\/mscloud\/index.php?rest_route=\/wp\/v2\/posts\/1120\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/i-services.info\/mscloud\/index.php?rest_route=\/wp\/v2\/media\/1105"}],"wp:attachment":[{"href":"http:\/\/i-services.info\/mscloud\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/i-services.info\/mscloud\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1120"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/i-services.info\/mscloud\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}