{"id":2819,"date":"2018-04-26T00:00:00","date_gmt":"2018-04-26T00:00:00","guid":{"rendered":""},"modified":"2025-07-02T06:22:49","modified_gmt":"2025-07-02T13:22:49","slug":"os-disk-swap-managed-disks","status":"publish","type":"post","link":"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/","title":{"rendered":"OS Disk Swap for Managed Virtual Machines now available"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Today, we are excited to announce the availability of the OS Disk Swap capability for VMs using Managed Disks. Until now, this capability was only available for Unmanaged Disks.<\/p>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/04\/91d81f39-e6b6-464f-a066-553086f8c5e2.webp\" alt=\"icon\" class=\"wp-image-12122 webp-format\" data-orig-src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/04\/91d81f39-e6b6-464f-a066-553086f8c5e2.webp\"><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">With this capability, it becomes very easy to restore a previous backup of the OS Disk or swap out the OS Disk for VM troubleshooting without having to delete the VM. To leverage this capability, the VM needs to be in stop deallocated state. After the VM is stop deallocated, the resource ID of the existing Managed OS Disk can be replaced with the resource ID of the new Managed OS Disk. You will need to specify the name of the new disk to swap. Please note that you cannot switch the OS Type of the VM i.e. Switch an OS Disk with Linux for an OS Disk with Windows<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the instructions on how to leverage this capability:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"azure-cli\">Azure CLI<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To read more about using Azure CLI, see&nbsp;<a href=\"https:\/\/docs.microsoft.com\/azure\/virtual-machines\/linux\/os-disk-swap\">Change the OS disk used by an Azure VM using the CLI<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For CLI, use the full resource ID of the new disk to the \u2013osdisk parameter<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>NOTE: required Azure CLI version &gt; 2.0.25<\/em><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; gutter: false; title: ; quick-code: false; notranslate\" title=\"\">\naz vm update \u2013g osrg -n vm2 --os-disk \/subscriptions\/\/resourceGroups\/osrg\/providers\/Microsoft.Compute\n\/disks\/osbackup\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"azure-powershell\">Azure PowerShell<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To read more about using PowerShell, see&nbsp;<a href=\"https:\/\/docs.microsoft.com\/azure\/virtual-machines\/windows\/os-disk-swap\">Change the OS disk used by an Azure VM using PowerShell<\/a>.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; gutter: false; title: ; quick-code: false; notranslate\" title=\"\">\n$vm = Get-AzureRmVM -ResourceGroupName osrg -Name vm2 \n$disk = Get-AzureRmDisk -ResourceGroupName osrg -Name osbackup \nSet-AzureRmVMOSDisk -VM $vm -ManagedDiskId $disk.Id -Name $disk.Name \nUpdate-AzureRmVM -ResourceGroupName osrg -VM $vm\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"java-sdk\">Java SDK<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; gutter: false; title: ; quick-code: false; notranslate\" title=\"\">\nVirtualMachine virtualMachine = azure.virtualMachines().getById(\"\");\n\nvirtualMachine\n    .inner()\n    .storageProfile()\n    .osDisk()\n    .withName(\"\")\n    .managedDisk()\n    .withId(\"\");\n    \nvirtualMachine.update()\n    .apply();\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"go-sdk\">GO SDK<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; auto-links: false; gutter: false; title: ; quick-code: false; notranslate\" title=\"\">\nfunc UpdateVM(ctx context.Context, vmName string, diskId string, diskName string) (vm compute.VirtualMachine, err error) {\n    vm, err = GetVM(ctx, vmName)\n    \n    if err != nil {\n        return\n    }\n    \n    vm.VirtualMachineProperties.StorageProfile.OsDisk.Name = diskName\n    vm.VirtualMachineProperties.StorageProfile.OsDisk.ManagedDisk.Id = diskId\n    \n    vmClient := getVMClient()\n    \n    future, err := vmClient.CreateOrUpdate(ctx, helpers.ResourceGroupName(), vmName, vm)\n    \n    if err != nil {\n        return vm, fmt.Errorf(\"cannot update vm: %v\", err)\n    }\n    \n    err = future.WaitForCompletion(ctx, vmClient.Client)\n    \n    if err != nil {\n        return vm, fmt.Errorf(\"cannot get the vm create or update future response: %v\", err)\n    }\n    \n    return future.Result(vmClient)\n}\n<\/pre><\/div>\n\n<p>Today, we are excited to announce the availability of the OS Disk Swap capability for VMs using Managed Disks. Until now, this capability was only available for Unmanaged Disks.<\/p>\n<p><img decoding=\"async\" title=\"1\" src=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/04\/91d81f39-e6b6-464f-a066-553086f8c5e2.webp\" alt=\"1\" \/><\/p>\n<p>With this capability, it becomes very easy to restore a previous backup of the OS Disk or swap out the OS Disk for VM troubleshooting without having to delete the VM. To leverage this capability, the VM needs to be in stop deallocated state. After the VM is stop deallocated, the resource ID of the existing Managed OS Disk can be replaced with the resource ID of the new Managed OS Disk. You will need to specify the name of the new disk to swap. Please note that you cannot switch the OS Type of the VM i.e. Switch an OS Disk with Linux for an OS Disk with Windows<\/p>\n<p>Here are the instructions on how to leverage this capability:<\/p>\n<h2>Azure CLI<\/h2>\n<p>To read more about using Azure CLI, see <a href=\"https:\/\/docs.microsoft.com\/azure\/virtual-machines\/linux\/os-disk-swap\">Change the OS disk used by an Azure VM using the CLI<\/a>.<\/p>\n<p>For CLI, use the full resource ID of the new disk to the &#8211;osdisk parameter<\/p>\n<p><i style=\"font-family: inherit;font-weight: inherit\">NOTE: required Azure CLI version &gt; 2.0.25<\/i><\/p>\n<pre>az vm update \u2013g osrg -n vm2 --os-disk \/subscriptions\/\/resourceGroups\/osrg\/providers\/Microsoft.Compute\/disks\/osbackup<\/pre>\n<h2>Azure PowerShell<\/h2>\n<p>To read more about using PowerShell, see <a href=\"https:\/\/docs.microsoft.com\/azure\/virtual-machines\/windows\/os-disk-swap\">Change the OS disk used by an Azure VM using PowerShell<\/a>.<\/p>\n<pre>$vm = Get-AzureRmVM -ResourceGroupName osrg -Name vm2 \n$disk = Get-AzureRmDisk -ResourceGroupName osrg -Name osbackup \nSet-AzureRmVMOSDisk -VM $vm -ManagedDiskId $disk.Id -Name $disk.Name \nUpdate-AzureRmVM -ResourceGroupName osrg -VM $vm<\/pre>\n<h2>Java SDK<\/h2>\n<pre>VirtualMachine virtualMachine = azure.virtualMachines().getById(\"\");\n\nvirtualMachine\n    .inner()\n    .storageProfile()\n    .osDisk()\n    .withName(\"\")\n    .managedDisk()\n    .withId(\"\");\n    \nvirtualMachine.update()\n    .apply();<\/pre>\n<h2>GO SDK<\/h2>\n<pre>func UpdateVM(ctx context.Context, vmName string, diskId string, diskName string) (vm compute.VirtualMachine, err error) {\n    vm, err = GetVM(ctx, vmName)\n    \n    if err != nil {\n        return\n    }\n    \n    vm.VirtualMachineProperties.StorageProfile.OsDisk.Name = diskName\n    vm.VirtualMachineProperties.StorageProfile.OsDisk.ManagedDisk.Id = diskId\n    \n    vmClient := getVMClient()\n    \n    future, err := vmClient.CreateOrUpdate(ctx, helpers.ResourceGroupName(), vmName, vm)\n    \n    if err != nil {\n        return vm, fmt.Errorf(\"cannot update vm: %v\", err)\n    }\n    \n    err = future.WaitForCompletion(ctx, vmClient.Client)\n    \n    if err != nil {\n        return vm, fmt.Errorf(\"cannot get the vm create or update future response: %v\", err)\n    }\n    \n    return future.Result(vmClient)\n}<\/pre>","protected":false},"excerpt":{"rendered":"<p>Today, we are excited to announce the availability of the OS Disk Swap capability for VMs using Managed Disks. Until now, this capability was only available for Unmanaged Disks. With this capability, it becomes very easy to restore a previous backup of the OS Disk or swap out the OS Disk for VM troubleshooting without having to delete the VM.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ms_queue_id":[],"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","_alt_title":"","footnotes":"","msx_community_cta_settings":[]},"categories":[1467],"tags":[],"audience":[3055,3053,3056],"content-type":[],"product":[],"tech-community":[],"topic":[],"coauthors":[97],"class_list":["post-2819","post","type-post","status-publish","format-standard","hentry","category-compute","audience-developers","audience-it-decision-makers","audience-it-implementors","review-flag-1680286580-543","review-flag-1680286581-295","review-flag-1680286584-658","review-flag-2-1680286581-601","review-flag-lever-1680286579-649","review-flag-new-1680286579-546","review-flag-vm-1680286585-143"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>OS Disk Swap for Managed Virtual Machines now available | Microsoft Azure Blog<\/title>\n<meta name=\"description\" content=\"Today, we are excited to announce the availability of the OS Disk Swap capability for VMs using Managed Disks. Until now, this capability was only available for Unmanaged Disks. With this capability, it becomes very easy to restore a previous backup of the OS Disk or swap out the OS Disk for VM troubleshooting without having to delete the VM.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"OS Disk Swap for Managed Virtual Machines now available | Microsoft Azure Blog\" \/>\n<meta property=\"og:description\" content=\"Today, we are excited to announce the availability of the OS Disk Swap capability for VMs using Managed Disks. Until now, this capability was only available for Unmanaged Disks. With this capability, it becomes very easy to restore a previous backup of the OS Disk or swap out the OS Disk for VM troubleshooting without having to delete the VM.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Azure Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/microsoftazure\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-26T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-02T13:22:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/04\/91d81f39-e6b6-464f-a066-553086f8c5e2.png\" \/>\n<meta name=\"author\" content=\"Microsoft Azure\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@azure\" \/>\n<meta name=\"twitter:site\" content=\"@azure\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Microsoft Azure\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/\"},\"author\":[{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/microsoft-azure\/\",\"@type\":\"Person\",\"@name\":\"Microsoft Azure\"}],\"headline\":\"OS Disk Swap for Managed Virtual Machines now available\",\"datePublished\":\"2018-04-26T00:00:00+00:00\",\"dateModified\":\"2025-07-02T13:22:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/\"},\"wordCount\":445,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/04\/91d81f39-e6b6-464f-a066-553086f8c5e2.png\",\"articleSection\":[\"Compute\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/\",\"name\":\"OS Disk Swap for Managed Virtual Machines now available | Microsoft Azure Blog\",\"isPartOf\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/04\/91d81f39-e6b6-464f-a066-553086f8c5e2.png\",\"datePublished\":\"2018-04-26T00:00:00+00:00\",\"dateModified\":\"2025-07-02T13:22:49+00:00\",\"description\":\"Today, we are excited to announce the availability of the OS Disk Swap capability for VMs using Managed Disks. Until now, this capability was only available for Unmanaged Disks. With this capability, it becomes very easy to restore a previous backup of the OS Disk or swap out the OS Disk for VM troubleshooting without having to delete the VM.\",\"breadcrumb\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#primaryimage\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/04\/91d81f39-e6b6-464f-a066-553086f8c5e2.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/04\/91d81f39-e6b6-464f-a066-553086f8c5e2.webp\",\"width\":736,\"height\":1125,\"caption\":\"icon\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog home\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Compute\",\"item\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/compute\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"OS Disk Swap for Managed Virtual Machines now available\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#website\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"name\":\"Microsoft Azure Blog\",\"description\":\"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.\",\"publisher\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization\",\"name\":\"Microsoft Azure Blog\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"contentUrl\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp\",\"width\":512,\"height\":512,\"caption\":\"Microsoft Azure Blog\"},\"image\":{\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/microsoftazure\",\"https:\/\/x.com\/azure\",\"https:\/\/www.instagram.com\/microsoftdeveloper\/\",\"https:\/\/www.linkedin.com\/company\/16188386\",\"https:\/\/www.youtube.com\/user\/windowsazure\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117\",\"name\":\"shakir\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g\",\"caption\":\"shakir\"},\"sameAs\":[\"https:\/\/azure.microsoft.com\"],\"url\":\"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"OS Disk Swap for Managed Virtual Machines now available | Microsoft Azure Blog","description":"Today, we are excited to announce the availability of the OS Disk Swap capability for VMs using Managed Disks. Until now, this capability was only available for Unmanaged Disks. With this capability, it becomes very easy to restore a previous backup of the OS Disk or swap out the OS Disk for VM troubleshooting without having to delete the VM.","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:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/","og_locale":"en_US","og_type":"article","og_title":"OS Disk Swap for Managed Virtual Machines now available | Microsoft Azure Blog","og_description":"Today, we are excited to announce the availability of the OS Disk Swap capability for VMs using Managed Disks. Until now, this capability was only available for Unmanaged Disks. With this capability, it becomes very easy to restore a previous backup of the OS Disk or swap out the OS Disk for VM troubleshooting without having to delete the VM.","og_url":"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/","og_site_name":"Microsoft Azure Blog","article_publisher":"https:\/\/www.facebook.com\/microsoftazure","article_published_time":"2018-04-26T00:00:00+00:00","article_modified_time":"2025-07-02T13:22:49+00:00","og_image":[{"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/04\/91d81f39-e6b6-464f-a066-553086f8c5e2.png","type":"","width":"","height":""}],"author":"Microsoft Azure","twitter_card":"summary_large_image","twitter_creator":"@azure","twitter_site":"@azure","twitter_misc":{"Written by":"Microsoft Azure","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#article","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/"},"author":[{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/microsoft-azure\/","@type":"Person","@name":"Microsoft Azure"}],"headline":"OS Disk Swap for Managed Virtual Machines now available","datePublished":"2018-04-26T00:00:00+00:00","dateModified":"2025-07-02T13:22:49+00:00","mainEntityOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/"},"wordCount":445,"commentCount":0,"publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/04\/91d81f39-e6b6-464f-a066-553086f8c5e2.png","articleSection":["Compute"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/","name":"OS Disk Swap for Managed Virtual Machines now available | Microsoft Azure Blog","isPartOf":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#primaryimage"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#primaryimage"},"thumbnailUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/04\/91d81f39-e6b6-464f-a066-553086f8c5e2.png","datePublished":"2018-04-26T00:00:00+00:00","dateModified":"2025-07-02T13:22:49+00:00","description":"Today, we are excited to announce the availability of the OS Disk Swap capability for VMs using Managed Disks. Until now, this capability was only available for Unmanaged Disks. With this capability, it becomes very easy to restore a previous backup of the OS Disk or swap out the OS Disk for VM troubleshooting without having to delete the VM.","breadcrumb":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#primaryimage","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/04\/91d81f39-e6b6-464f-a066-553086f8c5e2.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2018\/04\/91d81f39-e6b6-464f-a066-553086f8c5e2.webp","width":736,"height":1125,"caption":"icon"},{"@type":"BreadcrumbList","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/os-disk-swap-managed-disks\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog home","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/"},{"@type":"ListItem","position":2,"name":"Compute","item":"https:\/\/azure.microsoft.com\/en-us\/blog\/category\/compute\/"},{"@type":"ListItem","position":3,"name":"OS Disk Swap for Managed Virtual Machines now available"}]},{"@type":"WebSite","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#website","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","name":"Microsoft Azure Blog","description":"Get the latest Azure news, updates, and announcements from the Azure blog. From product updates to hot topics, hear from the Azure experts.","publisher":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/azure.microsoft.com\/en-us\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#organization","name":"Microsoft Azure Blog","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","contentUrl":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-content\/uploads\/2024\/06\/microsoft_logo.webp","width":512,"height":512,"caption":"Microsoft Azure Blog"},"image":{"@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/microsoftazure","https:\/\/x.com\/azure","https:\/\/www.instagram.com\/microsoftdeveloper\/","https:\/\/www.linkedin.com\/company\/16188386","https:\/\/www.youtube.com\/user\/windowsazure"]},{"@type":"Person","@id":"https:\/\/azure.microsoft.com\/en-us\/blog\/#\/schema\/person\/c702e5edd662b328b49b7e1180cab117","name":"shakir","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g7664e653ea371ce16eaf75e9fa8952c4","url":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9342c7c05bb16548741bc5cd3a3e3b7ee0c8e746844ad2cc582db5beb5514c6f?s=96&d=mm&r=g","caption":"shakir"},"sameAs":["https:\/\/azure.microsoft.com"],"url":"https:\/\/azure.microsoft.com\/en-us\/blog\/author\/shakir\/"}]}},"msxcm_display_generated_audio":false,"msxcm_animated_featured_image":null,"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Microsoft Azure Blog","distributor_original_site_url":"https:\/\/azure.microsoft.com\/en-us\/blog","push-errors":false,"_links":{"self":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/2819","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/comments?post=2819"}],"version-history":[{"count":2,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/2819\/revisions"}],"predecessor-version":[{"id":44860,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/posts\/2819\/revisions\/44860"}],"wp:attachment":[{"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/media?parent=2819"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/categories?post=2819"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tags?post=2819"},{"taxonomy":"audience","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/audience?post=2819"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/content-type?post=2819"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/product?post=2819"},{"taxonomy":"tech-community","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/tech-community?post=2819"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/topic?post=2819"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/azure.microsoft.com\/en-us\/blog\/wp-json\/wp\/v2\/coauthors?post=2819"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}