{"id":293,"date":"2019-01-07T09:45:17","date_gmt":"2019-01-07T09:45:17","guid":{"rendered":"http:\/\/techsupportblog.co.uk\/?p=293"},"modified":"2019-03-25T12:36:27","modified_gmt":"2019-03-25T12:36:27","slug":"azure-move-from-asm-to-arm-to-csp-subscription","status":"publish","type":"post","link":"https:\/\/techtodd.co.uk\/index.php\/2019\/01\/07\/azure-move-from-asm-to-arm-to-csp-subscription\/","title":{"rendered":"Azure &#8211; Move from ASM to ARM to CSP Subscription"},"content":{"rendered":"\n<p>When migrating from Classic (ASM) to ARM in Azure you will end up with a Keyvault that contains some credentials (certificates etc) for the VMs that you moved.<\/p>\n\n\n\n<p>This is normal when migrating and does not cause any issues, however when needing to migrate to a different subscription ie. CSP, you will find that you cannot move a VM with a keyvault attached to it. (<a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-resource-manager\/resource-group-move-resources#checklist-before-moving-resources\">https:\/\/docs.microsoft.com\/en-us\/azure\/azure-resource-manager\/resource-group-move-resources#checklist-before-moving-resources<\/a>)<\/p>\n\n\n\n<p>It seems that MS have been planning to fix this but there is no response directly from them on the issue.<\/p>\n\n\n\n<p>As such if you do come across this you will need to run the following commands: (substitute the values for $vmname and $rgname for the relevant ones.<\/p>\n\n\n\n<p><em>Install-Module AzureRM<\/em><br><em>Import-Module AzureRM<\/em><br><br><em>$cred = Get-Credential<\/em><br><br><em>Connect-AzureRmAccount $cred<\/em><br><br><em>$vmName = \u201cVM-Name\u201d<\/em><br><em>$rgName = \u201cVM-RG-Name\u201d<\/em><br><em>$vm = Get-AzureRmVM -ResourceGroupName $rgName -Name $vmName<\/em><br><em><del>$vm.OSProfile.Secrets = New-Object -TypeName \u201cSystem.Collections.Generic.List[Microsoft.Azure.Management.Compute.Models.VaultSecretGroup]\u201d<\/del><\/em><br>Remove-AzureRmVMSecret -VM $vm<br><em>Update-AzureRmVM -ResourceGroupName $rgName -VM $vm<\/em><\/p>\n\n\n\n<p>Link here to the article on this and the fix above is in the comments.<\/p>\n\n\n\n<p><a href=\"https:\/\/cloudpuzzles.net\/2016\/10\/asm-to-arm-migration-and-fun-with-key-vault\/\">https:\/\/cloudpuzzles.net\/2016\/10\/asm-to-arm-migration-and-fun-with-key-vault\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When migrating from Classic (ASM) to ARM in Azure you will end up with a Keyvault that contains some credentials (certificates etc) for the VMs that you moved. This is normal when migrating and does not cause any issues, however when needing to migrate to a different subscription ie. CSP, you will find that you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[26],"tags":[38,40,39],"class_list":["post-293","post","type-post","status-publish","format-standard","hentry","category-azure","tag-csp","tag-keyvault","tag-migration"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Azure - Move from ASM to ARM to CSP Subscription | Tech Todd<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/project1-v4xcrw2sui.live-website.com\/index.php\/2019\/01\/07\/azure-move-from-asm-to-arm-to-csp-subscription\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Azure - Move from ASM to ARM to CSP Subscription | Tech Todd\" \/>\n<meta property=\"og:description\" content=\"When migrating from Classic (ASM) to ARM in Azure you will end up with a Keyvault that contains some credentials (certificates etc) for the VMs that you moved. This is normal when migrating and does not cause any issues, however when needing to migrate to a different subscription ie. CSP, you will find that you [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/project1-v4xcrw2sui.live-website.com\/index.php\/2019\/01\/07\/azure-move-from-asm-to-arm-to-csp-subscription\/\" \/>\n<meta property=\"og:site_name\" content=\"Tech Todd\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-07T09:45:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-03-25T12:36:27+00:00\" \/>\n<meta name=\"author\" content=\"TC\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TC\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/index.php\\\/2019\\\/01\\\/07\\\/azure-move-from-asm-to-arm-to-csp-subscription\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/index.php\\\/2019\\\/01\\\/07\\\/azure-move-from-asm-to-arm-to-csp-subscription\\\/\"},\"author\":{\"name\":\"TC\",\"@id\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/#\\\/schema\\\/person\\\/12f10ae88eec753067405d37c00f9103\"},\"headline\":\"Azure &#8211; Move from ASM to ARM to CSP Subscription\",\"datePublished\":\"2019-01-07T09:45:17+00:00\",\"dateModified\":\"2019-03-25T12:36:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/index.php\\\/2019\\\/01\\\/07\\\/azure-move-from-asm-to-arm-to-csp-subscription\\\/\"},\"wordCount\":192,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/#\\\/schema\\\/person\\\/12f10ae88eec753067405d37c00f9103\"},\"keywords\":[\"CSP\",\"keyvault\",\"Migration\"],\"articleSection\":[\"Azure\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/index.php\\\/2019\\\/01\\\/07\\\/azure-move-from-asm-to-arm-to-csp-subscription\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/index.php\\\/2019\\\/01\\\/07\\\/azure-move-from-asm-to-arm-to-csp-subscription\\\/\",\"url\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/index.php\\\/2019\\\/01\\\/07\\\/azure-move-from-asm-to-arm-to-csp-subscription\\\/\",\"name\":\"Azure - Move from ASM to ARM to CSP Subscription | Tech Todd\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/#website\"},\"datePublished\":\"2019-01-07T09:45:17+00:00\",\"dateModified\":\"2019-03-25T12:36:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/index.php\\\/2019\\\/01\\\/07\\\/azure-move-from-asm-to-arm-to-csp-subscription\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/index.php\\\/2019\\\/01\\\/07\\\/azure-move-from-asm-to-arm-to-csp-subscription\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/index.php\\\/2019\\\/01\\\/07\\\/azure-move-from-asm-to-arm-to-csp-subscription\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Azure &#8211; Move from ASM to ARM to CSP Subscription\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/#website\",\"url\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/\",\"name\":\"Tech Todd\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/#\\\/schema\\\/person\\\/12f10ae88eec753067405d37c00f9103\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/project1-v4xcrw2sui.live-website.com\\\/#\\\/schema\\\/person\\\/12f10ae88eec753067405d37c00f9103\",\"name\":\"TC\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b3a6951f4b1a2876b9cb71e98dda385477183f62e689405514ba93c705bf95d7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b3a6951f4b1a2876b9cb71e98dda385477183f62e689405514ba93c705bf95d7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b3a6951f4b1a2876b9cb71e98dda385477183f62e689405514ba93c705bf95d7?s=96&d=mm&r=g\",\"caption\":\"TC\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b3a6951f4b1a2876b9cb71e98dda385477183f62e689405514ba93c705bf95d7?s=96&d=mm&r=g\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Azure - Move from ASM to ARM to CSP Subscription | Tech Todd","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/project1-v4xcrw2sui.live-website.com\/index.php\/2019\/01\/07\/azure-move-from-asm-to-arm-to-csp-subscription\/","og_locale":"en_GB","og_type":"article","og_title":"Azure - Move from ASM to ARM to CSP Subscription | Tech Todd","og_description":"When migrating from Classic (ASM) to ARM in Azure you will end up with a Keyvault that contains some credentials (certificates etc) for the VMs that you moved. This is normal when migrating and does not cause any issues, however when needing to migrate to a different subscription ie. CSP, you will find that you [&hellip;]","og_url":"https:\/\/project1-v4xcrw2sui.live-website.com\/index.php\/2019\/01\/07\/azure-move-from-asm-to-arm-to-csp-subscription\/","og_site_name":"Tech Todd","article_published_time":"2019-01-07T09:45:17+00:00","article_modified_time":"2019-03-25T12:36:27+00:00","author":"TC","twitter_card":"summary_large_image","twitter_misc":{"Written by":"TC","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/project1-v4xcrw2sui.live-website.com\/index.php\/2019\/01\/07\/azure-move-from-asm-to-arm-to-csp-subscription\/#article","isPartOf":{"@id":"https:\/\/project1-v4xcrw2sui.live-website.com\/index.php\/2019\/01\/07\/azure-move-from-asm-to-arm-to-csp-subscription\/"},"author":{"name":"TC","@id":"https:\/\/project1-v4xcrw2sui.live-website.com\/#\/schema\/person\/12f10ae88eec753067405d37c00f9103"},"headline":"Azure &#8211; Move from ASM to ARM to CSP Subscription","datePublished":"2019-01-07T09:45:17+00:00","dateModified":"2019-03-25T12:36:27+00:00","mainEntityOfPage":{"@id":"https:\/\/project1-v4xcrw2sui.live-website.com\/index.php\/2019\/01\/07\/azure-move-from-asm-to-arm-to-csp-subscription\/"},"wordCount":192,"commentCount":0,"publisher":{"@id":"https:\/\/project1-v4xcrw2sui.live-website.com\/#\/schema\/person\/12f10ae88eec753067405d37c00f9103"},"keywords":["CSP","keyvault","Migration"],"articleSection":["Azure"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/project1-v4xcrw2sui.live-website.com\/index.php\/2019\/01\/07\/azure-move-from-asm-to-arm-to-csp-subscription\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/project1-v4xcrw2sui.live-website.com\/index.php\/2019\/01\/07\/azure-move-from-asm-to-arm-to-csp-subscription\/","url":"https:\/\/project1-v4xcrw2sui.live-website.com\/index.php\/2019\/01\/07\/azure-move-from-asm-to-arm-to-csp-subscription\/","name":"Azure - Move from ASM to ARM to CSP Subscription | Tech Todd","isPartOf":{"@id":"https:\/\/project1-v4xcrw2sui.live-website.com\/#website"},"datePublished":"2019-01-07T09:45:17+00:00","dateModified":"2019-03-25T12:36:27+00:00","breadcrumb":{"@id":"https:\/\/project1-v4xcrw2sui.live-website.com\/index.php\/2019\/01\/07\/azure-move-from-asm-to-arm-to-csp-subscription\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/project1-v4xcrw2sui.live-website.com\/index.php\/2019\/01\/07\/azure-move-from-asm-to-arm-to-csp-subscription\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/project1-v4xcrw2sui.live-website.com\/index.php\/2019\/01\/07\/azure-move-from-asm-to-arm-to-csp-subscription\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/project1-v4xcrw2sui.live-website.com\/"},{"@type":"ListItem","position":2,"name":"Azure &#8211; Move from ASM to ARM to CSP Subscription"}]},{"@type":"WebSite","@id":"https:\/\/project1-v4xcrw2sui.live-website.com\/#website","url":"https:\/\/project1-v4xcrw2sui.live-website.com\/","name":"Tech Todd","description":"","publisher":{"@id":"https:\/\/project1-v4xcrw2sui.live-website.com\/#\/schema\/person\/12f10ae88eec753067405d37c00f9103"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/project1-v4xcrw2sui.live-website.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/project1-v4xcrw2sui.live-website.com\/#\/schema\/person\/12f10ae88eec753067405d37c00f9103","name":"TC","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/b3a6951f4b1a2876b9cb71e98dda385477183f62e689405514ba93c705bf95d7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b3a6951f4b1a2876b9cb71e98dda385477183f62e689405514ba93c705bf95d7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b3a6951f4b1a2876b9cb71e98dda385477183f62e689405514ba93c705bf95d7?s=96&d=mm&r=g","caption":"TC"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/b3a6951f4b1a2876b9cb71e98dda385477183f62e689405514ba93c705bf95d7?s=96&d=mm&r=g"}}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfa3Hp-4J","_links":{"self":[{"href":"https:\/\/techtodd.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techtodd.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techtodd.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techtodd.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techtodd.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=293"}],"version-history":[{"count":3,"href":"https:\/\/techtodd.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/293\/revisions"}],"predecessor-version":[{"id":320,"href":"https:\/\/techtodd.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/293\/revisions\/320"}],"wp:attachment":[{"href":"https:\/\/techtodd.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techtodd.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techtodd.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}