从 vm 内对 linux vmware guest 进行快照

从 vm 内对 linux vmware guest 进行快照

Linux VM 来宾是否可以仅使用 open-vm-tools 套件来请求主机为其自身创建快照。我看到参考资料似乎表明这是可能的,但没有例子。我的测试环境是ESXi 5.5和CentOS 7。

答案1

open-vm-tools 或 vmware 工具无法实现这一点。 https://docs.vmware.com/en/VMware-Tools/12.1.0/vmware-tools-administration-guide.pdf

我相信您看到的快照参考是关于 vmbackup 插件的。它不会启动快照,而是处理静默。 https://github.com/vmware/open-vm-tools/tree/master/open-vm-tools/services/plugins/vmbackup

您可以做的是冻结并克隆操作系统。根据您的最终目标,这可能对您有用。 vmware-rpctool“即时克隆.冻结”vmtoolsd“即时克隆.冻结” https://williamlam.com/2018/04/new-instant-clone-architecture-in-vsphere-6-7-part-1.html

https://williamlam.com/2018/04/new-instant-clone-architecture-in-vsphere-6-7-part-2.html

另一种选择(但不使用 VMware 工具)是从来宾内部运行 Python 脚本或 Java 应用程序等内容。 https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/create_snapshot.py https://developer.vmware.com/samples/1078/vmsnapshot?h=snapshot#

您还可以使用 PowerCLI,但需要在 Linux 虚拟机上安装 PowerShell。 https://developer.vmware.com/docs/powercli/latest/products/vmwarevsphereandvsan/categories/snapshot/ https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.3

我相信大多数备份实用程序都有一个单独的管理器虚拟机来制作快照。使用另一个小型虚拟机来管理快照任务可能是更简单的方法。

相关内容