0

Currently I've got a pice of code that lists all the vmFolder.Childentities through pyVmomi, these are used to structurize the VM's in vCenter.

But now I want to change the vmFolder of an existing virtual machine.

PS: I can't show any code because I'm currently at work

Jonas Libbrecht
  • 768
  • 1
  • 8
  • 17

1 Answers1

1

You will want to use the MoveIntoFolder_Task method on the vmFolder. Where "Folder" is the folder to move the VM to and "VMs" is your list of VMs to move, your code would be:

Folder.MoveIntoFolder_Task(VMs)
Rey Abolofia
  • 914
  • 8
  • 12