azure - 磁盘 UUID 在哪个命名空间中是唯一的?

标签 azure virtual-machine restore

我已将附加数据磁盘的备份恢复到新虚拟机。当我发出命令 sudo blkid 时,我发现它与附加到原始虚拟机的数据磁盘具有相同的 UUID,因此我无需更改 fstab 即可在启动时挂载它。然而,它似乎是一个物理上不同的磁盘,即我可以看到附加到原始虚拟机的磁盘上的文件更新,但看不到恢复的虚拟机。我认为 UUID 将是全局唯一的,但显然不是。那么它在哪个命名空间中是唯一的?

最佳答案

磁盘的 UUID 对于新创建的 VM 始终是唯一的。但是当我们执行下面提到的操作时,UUID 不会保持唯一:

  1. 当我们复制虚拟机的 VHD 时。
  2. 当我们使用虚拟机镜像部署新虚拟机时。
  3. 当我们捕获带有附加数据磁盘的图像时,操作系统 磁盘 UUID 将相同,我们必须复制附件 UUID 也将相同的磁盘。

您的情况是第三个选项,为此您必须创建数据磁盘的副本,如Alexandre Brisebois in his blog所述。 :

a copy of the Data Disks is required to keep the Data Disk UUIDs. Without these disks, a Virtual Machine created from the VM Image would result in a prompt a boot time. This prompt appears because the Virtual Machine is unable to find the Partition UUIDs that match the UUIDs from the fstab. Ultimately, this can result in a failed deployment and create can be challenging to troubleshoot and fix.

在您的情况下,预计文件将存储在原始虚拟机的数据磁盘中,而不是恢复的虚拟机的数据磁盘中。作为解决方案,您只需将数据磁盘与虚拟机分离即可获取操作系统磁盘的镜像,然后从镜像部署新虚拟机后即可附加数据磁盘。

关于azure - 磁盘 UUID 在哪个命名空间中是唯一的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69395706/

相关文章:

ruby - 创建/编辑 Vagrant base box 以预安装 Recipe

amazon-ec2 - VirtualBOX 上的 EC2 实例镜像?

database - SQLite 错误 : Expression tree is too large (maximum depth 1000)

缺少 .NET Core 2.0 和 Azure Web Jobs 3.0 的 Azure 服务总线触发器配置

node.js - 将 sails.js 部署到 Windows Azure 网站

node.js - 在Cosmos DB中使用回送

Azure 数据资源管理器 : How to backup data from table with stream ingestion

hadoop - 如何恢复 yarn 的旧日志?

azure - 通过 VS code 部署 Azure Function 时无法同步触发器

c# - Azure 示例 4-1-MyOrg 引发 "HttpRequestException: Invalid status code in the HttpResponseMessage: Unauthorized."错误