{"id":17900,"date":"2015-04-09T15:16:11","date_gmt":"2015-04-09T15:16:11","guid":{"rendered":"https:\/\/aidanfinn.com\/?p=17900"},"modified":"2015-04-09T15:16:12","modified_gmt":"2015-04-09T15:16:12","slug":"moving-an-azure-vm-to-different-virtual-network","status":"publish","type":"post","link":"https:\/\/aidanfinn.com\/?p=17900","title":{"rendered":"Moving An Azure VM To Different Virtual Network"},"content":{"rendered":"<p>It\u2019s a simple enough operation (PowerShell) to move a virtual machine to a different subnet within a virtual network. But what if you want to move the virtual machine to a <em>different<\/em> virtual network? That\u2019s a bit more complex to do because you cannot just lift the VM to another network.<\/p>\n<p>Instead you will have to:<\/p>\n<p>1: Delete the virtual machine, choosing to keep the attached disks. Doesn\u2019t Azure Backup of Azure Virtual Machines sound like a good idea right now? Go do that first <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" style=\"border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none\" alt=\"Smile\" src=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2015\/04\/wlEmoticon-smile1.png\" \/><\/p>\n<p align=\"center\"><a href=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2015\/04\/image4.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2015\/04\/image_thumb4.png\" width=\"240\" height=\"109\" \/><\/a><\/p>\n<p>2: Create a new virtual machine from the existing disks. The above deletion process keeps the original disks, and deletes the meta data of the VM. You are now going to create new meta data using the remaining disks. This is like moving the hard drives from one broken server to a replacement server. Go into the wizard and instead of selecting a template, choose your old disk. Make sure you know which one it is first \u2013 the name of the old VM (FS1 in this case) is usually in the file name. <\/p>\n<p><a href=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2015\/04\/image5.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto\" border=\"0\" alt=\"image\" src=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2015\/04\/image_thumb5.png\" width=\"500\" height=\"308\" \/><\/a><\/p>\n<p>3: Complete the wizard and select the new virtual network. If this is a new network\/application then you probably will have to create a new cloud service too.<\/p>\n<p>4: Attach any data disks. If the old VM had any data disks then they\u2019ll need to be reattached. Shutdown the VM and attach the disks.<\/p>\n<p><a href=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2015\/04\/image6.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto\" border=\"0\" alt=\"image\" src=\"https:\/\/aidanfinn.com\/wp-content\/uploads\/2015\/04\/image_thumb6.png\" width=\"240\" height=\"168\" \/><\/a><\/p>\n<div id=\"scid:0767317B-992E-4b12-91E0-4F059A8CECA8:fa6e1149-af7c-4274-9d97-d56e2f32645e\" class=\"wlWriterEditableSmartContent\" style=\"float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px\">Technorati Tags: <a href=\"http:\/\/technorati.com\/tags\/Azure\" rel=\"tag\">Azure<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>It\u2019s a simple enough operation (PowerShell) to move a virtual machine to a different subnet within a virtual network. But what if you want to move the virtual machine to a different virtual network? That\u2019s a bit more complex to do because you cannot just lift the VM to another network. Instead you will have &hellip; <a href=\"https:\/\/aidanfinn.com\/?p=17900\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Moving An Azure VM To Different Virtual Network&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":18386,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[5],"tags":[170],"class_list":["post-17900","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","tag-azure"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/aidanfinn.com\/wp-content\/uploads\/2015\/06\/12809137181.png","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/17900","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17900"}],"version-history":[{"count":1,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/17900\/revisions"}],"predecessor-version":[{"id":17901,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/posts\/17900\/revisions\/17901"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=\/wp\/v2\/media\/18386"}],"wp:attachment":[{"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aidanfinn.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}