Azure:VM 备份说明

Azure: VM Backup Explained

我正在努力使用捕获工具首次捕获 Linux Azure VM。

第一步是运行sudo waagent –deprovision。 运行 此命令执行以下操作:

  1. Removes SSH host keys (if Provisioning.RegenerateSshHostKeyPair is 'y' in the configuration file)

这是否意味着我的 private/public 密钥将消失,并且我现有的服务器将无法在不将这些密钥复制回原位的情况下通过 SSH 连接到它的对等节点?

  1. Clears nameserver configuration in /etc/resolv.conf

我相信我的自定义 DNS 名称也必须放回原处。

  1. Removes the root user's password from /etc/shadow (if Provisioning.DeleteRootPassword is 'y' in the configuration file)

不熟悉/etc/shadow。我将无法再通过 SSH 访问我的服务器吗?

  1. Removes cached DHCP client leases

我假设这是无害的。

  1. Resets host name to localhost.localdomain

我认为只有设置了自定义主机名才会出现此问题。

  1. Deletes the last provisioned user account (obtained from /var/lib/waagent) and associated data

这是捕获工具本身或我提供的帐户吗?如果是后者,为什么会这样?

您描述的过程是为了创建图像。此映像随后可用于创建多个 VM。 这不同于将已构建的 VM 按原样移动到 Azure。

1) 是的。您正在从 "captured" 映像配置新 VM。您真的不希望多个服务器具有相同的私钥

2) Azure 中的 DNS 在您部署映像的虚拟网络中配置。如果您已针对您的环境正确配置此步骤,则此步骤不会导致任何问题

3) 在创建 VM 时系统会提示您提供 public 密钥以用于 root 身份验证或指定您要使用的 username/password。默认情况下,您将通过 ssh 连接到主机

4) 无害

5) 正确。我相信 linux 虚拟机会被您创建的服务器名称所取代,但我可能是错的。

6) 它为您提供了一台干净的机器(记住这是 "from image"),因此它正在清理它可能创建的所有帐户。

Update For Comments: Here is what Azure recommends for specialized VHDs (windows)

Specialized VHD - a specialized VHD maintains the user accounts, applications and other state data from your original VM. If you intend to use the VHD as-is to create a new VM, ensure the following steps are completed.

Prepare a Windows VHD to upload to Azure. Do not generalize the VM using Sysprep.
Remove any guest virtualization tools and agents that are installed on the VM (i.e. VMware tools).
Ensure the VM is configured to pull its IP address and DNS settings via DHCP. This ensures that the server obtains an IP address

within the VNet when it starts up.