vmware - 实时迁移下会发生什么

标签 vmware virtualization kvm esxi hypervisor

我想了解为执行我的最后一年项目而进行的实时迁移的幕后情况

根据我的理解,两台主机通过SAN共享一个公共(public)存储

1)当虚拟机从一台主机迁移到另一台主机时,虚拟机文件从一台ESXI传输到另一台ESXI,但问题是它们具有共享存储,那么它们将如何传输。

2)VMDK,实时迁移时传输快照文件

现在我有问题

1)仅传输VMDK、.vmx文件

2)通过VMotion,内存页被传输,那么这些内存页是什么,它们是文件,还是物理上的什么

3)迁移代码在哪里,在虚拟机管理程序还是VCenter中

4)我们能否在迁移过程中获取虚拟机、虚拟机管理程序的堆栈跟踪,如果是的话,这怎么可能(我尝试使用 strace 来了解虚拟机(ubuntu)如何调用虚拟机管理程序的基本知识,但这只给了我直到 Linux 系统,而不是超越)

任何人都可以指导我吗?

最佳答案

VMotion overview

Phase 1: Guest Trace Phase

The guest VM is staged for migration during this phase. Traces are placed on the guest memory pages to track any modifications by the guest during the migration. Tracing all of the memory can cause a brief, noticeable drop in workload throughput. The impact is generally proportional to the overall size of guest memory.

Phase 2: Precopy Phase

Because the virtual machine continues to run and actively modify its memory state on the source host during this phase, the memory contents of the virtual machine are copied from the source vSphere host to the destination vSphere host in an iterative process. The first iteration copies all of the memory. Subsequent iterations copy only the memory pages that were modified during the previous iteration. The number of precopy iterations and the number of memory pages copied during each iteration depend on how actively the memory is changed on the source vSphere host, due to the guest’s ongoing operations. The bulk of vMotion network transfer is done during this phase—without taking any significant number of CPU cycles directly from the guest. One would still observe an impact on guest performance, because the write trace fires during the precopy phase will cause a slight slowdown in page writes.

Phase 3: Switchover Phase

During this final phase, the virtual machine is momentarily quiesced on the source vSphere host, the last set of memory changes are copied to the target vSphere host, and the virtual machine is resumed on the target vSphere host. The guest briefly pauses processing during this step. Although the duration of this phase is generally less than a second, it is the most likely phase where the largest impact on guest performance (an abrupt, temporary increase of latency) is observed. The impact depends on a variety of factors not limited to but including network infrastructure, shared storage configuration, host hardware, vSphere version, and dynamic guest workload.

根据我的经验,我会说在第 3 阶段期间我总是会丢失至少 1 个 ping

关于您的问题:

1) 所有数据均通过 TCP/IP 网络传输。除非是Storage VMotion,否则不会传输.vmdk。您可以在 documentation 中找到所有详细信息

2) .nvram是VMware虚拟机内存文件。可以验证所有 VMware VM 文件类型列表 here

3) 所有逻辑都在管理程序中。 vSphere Client/vCenter 是管理产品。 VMware 拥有专有代码库,因此我认为您无法获得实际的源代码。同时欢迎您查看ESXi cli documentation 。由于许可限制,VMotion 调用只能通过客户端完成。

4) guest 操作系统(在您的例子中是 Ubuntu)根本不知道它使用虚拟硬件这一事实。一般来说, guest 操作系统无法跟踪迁移或任何其他 VMware kernel/vmfs 事件。

关于vmware - 实时迁移下会发生什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33211944/

相关文章:

linux - 在KVM VM中挂载共享文件夹错误:mount:unknown filesystem type'9p'

vmware - Jstatd 连接问题

arrays - PowerShell/CLI : "Foreach" loop with multiple arrays

linux - VPS 托管和根访问

linux - 任何 "lxc-*"命令都可以列出搜索模板路径吗?

java - 使用 Libvirt Java API 连接到 QEMU

vmware - "vmStatsProvider"已成功为此虚拟机初始化

ubuntu-16.04 - 如何将Devstack float ip暴露给外界?

linux - 具有无效控制字段的 VM 条目 (vmlaunch)

linux - 桥接 Linux 网络和虚拟化