Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前我有一段代码列出了所有vmFolder.Childentities通过 pyVmomi 的代码,这些代码用于在 vCenter 中对 VM 进行结构化。
vmFolder.Childentities
但现在我想更改现有虚拟机的 vmFolder。
PS:我无法显示任何代码,因为我目前正在工作
您将要MoveIntoFolder_Task在 vmFolder 上使用该方法。其中“文件夹”是将虚拟机移动到的文件夹,“虚拟机”是要移动的虚拟机列表,您的代码将是:
MoveIntoFolder_Task
Folder.MoveIntoFolder_Task(VMs)