是否可以在不重新创建的情况下更改 Azure 中虚拟机上运行的映像 [英] Is it possible to change the image running on a virtual machine in Azure without recreating it

查看:26
本文介绍了是否可以在不重新创建的情况下更改 Azure 中虚拟机上运行的映像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的开发环境有一堆运行不同版本软件的虚拟机.我希望能够替换在 VM 上运行的托管映像,而无需销毁和重新创建它.

Our development environment has a bunch of virtual machines running different versions of our software. I want to be able to replace the Managed Image that is running on a VM, without having to destroy and recreate it.

图像是使用 packer 创建的,它为它们提供了正确的软件和依赖项.

The images are created using packer, which provisions them with the correct software and dependencies.

机器 A 在 Managed Image v2.5 上运行,它运行依赖于 Tomcat 10 的软件.要修复 v2.2 中的错误,该错误依赖于 Tomcat 9,因此无法在不更改依赖项的情况下在同一 VM 上运行,我必须:

Machine A is running on Managed Image v2.5, which runs software with a dependency on Tomcat 10. To fix a bug in v2.2, which depends on Tomcat 9 and thus cannot run on the same VM without changing the dependencies, I have to:

  1. 销毁虚拟机
  2. 使用相同的参数(名称、大小等)重新创建它,但基于 Managed Image v2.2
  3. 连接网络接口和磁盘
  4. 重启

如果觉得应该有一个更简单的解决方案,可以热交换图像,而无需重新创建完整的虚拟机.我已经考虑过交换操作系统磁盘,但我无法找到一个可以使用托管映像而不是 VHD 的解决方案.

If feel like there should be an easier solution to this, where it is possible to hot-swap the images, without recreating the full virtual machines. I've looked into swapping the OS disk, but I couldn't figure out a solution that would work with Managed Images instead of VHD's.

推荐答案

根据官方文章,不支持.

As per official article, its not Supported.

Microsoft 不支持升级操作系统Microsoft Azure 虚拟机.相反,您应该创建一个新的运行受支持版本的 Azure 虚拟机所需的操作系统,然后迁移工作负载.

Microsoft does not support an upgrade of the operating system of a Microsoft Azure virtual machine. Instead, you should create a new Azure virtual machine that is running the supported version of the operating system that is required and then migrate the workload.

官方文章:https://support.microsoft.com/en-us/help/2721672/microsoft-server-software-support-for-microsoft-azure-virtual-machines

相反,您可以使用 Windows 服务器迁移工具来帮助您进行角色和功能的迁移安装、使用和删除 Windows Server 迁移工具

Instead you can use windows server migration tool that would assist you in roles and feature's migration Install, use, and remove Windows Server migration tools

可以讨论类似问题您对 Azure VM 操作系统进行就地更新/升级吗?

这篇关于是否可以在不重新创建的情况下更改 Azure 中虚拟机上运行的映像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆