Hello guys I recently started to work with EXSI 6.7 free hypervisor. Am new to powershell and powercli so I started to learn the basic commands. I'am trying to create a machine by copying another. The command is simple: New-VM -Name vm1 -VM (existing powered off vm) but always throws same error: Exception has been thrown by the target of an invocation. I am running latest powercli version 6.5 I've put the command in ps file and ran i thru Powercli. Always the same error. I don't get in where I'am getting this wrong ? Thanks in advance!
Without vCenter, you can export a (powered off) VM to a .ova on your desktop, then Deploy that .ova from your desktop back into the same host.
This thread is related:
best way to copy vmdk file between two esxi with no shared storage
You cannot clone if you are connected to an ESXi host. Connect to your vCenter server by using connect-viserver.
Then you should be able to use the command.
Example: New-VM -Name VM1 -VM VM2 -Datastore datastorename -vmhost hostname -DiskStorageFormat thin
Without vCenter, you can export a (powered off) VM to a .ova on your desktop, then Deploy that .ova from your desktop back into the same host.
This thread is related:
best way to copy vmdk file between two esxi with no shared storage