vsphere/internal/helper/virtualmachine/virtual_machine_helper.go
func MoveToFolder(client *govmomi.Client, vm *object.VirtualMachine, relative string) error {
	log.Printf("[DEBUG] Moving virtual %q to VM path %q", vm.InventoryPath, relative)
	f, err := folder.VirtualMachineFolderFromObject(client, vm, relative)
	if err != nil {
		return err
	}
	return folder.MoveObjectTo(vm.Reference(), f)
}
func MoveToFolder(client *govmomi.Client, vm *object.VirtualMachine, relative string) error {
	log.Printf("[DEBUG] Moving virtual %q to VM path %q", vm.InventoryPath, relative)
	f, err := folder.VirtualMachineFolderFromObject(client, vm, relative)
	if err != nil {
		return err
	}
	return folder.MoveObjectTo(vm.Reference(), f)
}
func MoveToFolder ( client * govmomi . Client , vm * object . VirtualMachine , relative string ) error { log . Printf ( " " , vm . InventoryPath , relative ) f , err := folder . VirtualMachineFolderFromObject ( client , vm , relative ) if err != nil { return err } return folder . MoveObjectTo ( vm . Reference ( ) , f ) }
// MoveToFolder moves a virtual machine to the specified folder.
MoveToFolder moves a virtual machine to the specified folder .