简体   繁体   English

如何将VM克隆到特定的数据存储?

[英]How to clone a VM to a specific Datastore?

I would like to use pyvmomi to clone VMs and attach it to specific datastore (specifically with most free space). 我想使用pyvmomi克隆VM并将其附加到特定的数据存储(特别是具有最大可用空间的存储)。

I couldn't find a solution for this in pysphere therefore I trying luck with pyvmomi but the it seems that learning curve for this library is a bit steeper. 我在pysphere中找不到解决方案,因此我尝试使用pyvmomi运气,但是似乎该库的学习曲线有些陡峭。

Any help? 有什么帮助吗?

pyvmomi gives you access to everything in the VMware vSphere API Reference Documentation . pyvmomi使您可以访问《 VMware vSphere API参考文档》中的所有内容 This includes all the methods for cloning VMs from templates and specifying the datastore. 这包括从模板克隆VM和指定数据存储的所有方法。 Specifically take a look at VirtualMachineRelocateSpec which is a parameter to RelocateVM_Task (the method you will need to clone the VM). 具体来看一下VirtualMachineRelocateSpec ,它是RelocateVM_Task的参数(克隆虚拟机所需的方法)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM