VMware Cloud Community
SteveR123
Enthusiast
Enthusiast
Jump to solution

PowerCLI instantclone?

HI, I've seen some demo's crop up lately on using instantclones from PowerCLI. I have downloaded and installed the extensions, commands are available but not having much luck. Has anyone else been successful in their testing of this new feature?

I've tried the following, which may be incorrect, but am getting the following error:

$vm = get-vm vmforkmaster01

$parentvm =Enable-InstantCloneVM -vm $vm -GuestUser "root"

enable-instantcloneVM : 22/02/2016 12:21:45    Enable-InstantCloneVM        Object reference not set to an instance of an object.   

At line:1 char:12

+ $parentvm =enable-instantcloneVM -vm $vm -GuestUser "root"

+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Enable-InstantCloneVM], VimException

    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.Extensions.InstantClone.Commands.EnableInstantCloneVM

Any thoughts would be much appreciated.

Thanks

Steve

Reply
0 Kudos
1 Solution

Accepted Solutions
alanrenouf
VMware Employee
VMware Employee
Jump to solution

You need to connect to VC, did you already look at the doc that you can download from the flings page and the examples in section 7?

Blog: http://virtu-al.net Twitter: http://twitter.com/alanrenouf Co-author of the PowerCLI Book: http://powerclibook.com

View solution in original post

Reply
0 Kudos
6 Replies
SteveR123
Enthusiast
Enthusiast
Jump to solution

I've moved on slightly. I changed my test to a different ESXi 6 host. when I connect to it I get the following

The operation for the entity "TESTVM" failed with the following message: "The operation is not supported on the

object."   

If I connect via the vCenter managing this host I get :

nable-InstantCloneVM        Enable instant clone operation failed for VM 'TESTVM' with the following error:

   'The session is not authenticated.'

Thanks

Steve

Reply
0 Kudos
alanrenouf
VMware Employee
VMware Employee
Jump to solution

You need to connect to VC, did you already look at the doc that you can download from the flings page and the examples in section 7?

Blog: http://virtu-al.net Twitter: http://twitter.com/alanrenouf Co-author of the PowerCLI Book: http://powerclibook.com
Reply
0 Kudos
SteveR123
Enthusiast
Enthusiast
Jump to solution

Thanks for the reply, I was using VC and an ESXi6 also for testing. This host was in a temp mixed cluster but since upgrading the entire cluster I'm making progress.

Thanks again for the response

Steve

Reply
0 Kudos
japj
Contributor
Contributor
Jump to solution

Hello,

I have a standalone ESXi 6 host (unfortunately vCenter 6 is not rolled out yet internally).

I am also getting the "The operation is not supported on the object." when trying to use Enable-InstantCloneVM against the ESXi host directly.

Will Enable-InstantCloneVM (at some point) be able to be used against a standalone ESXi?

(if not, is this a technical or a licensing reason?)

Do I need to wait for our internal rollout of vCenter 6 in order to benefit from the InstantCloneVM functionality in ESXi 6?

Thanks in advance,

Jeroen

Reply
0 Kudos
atlantauser
Contributor
Contributor
Jump to solution

Same problem. Installed PowerCLI 6.3 Release 1, the vmfork module for 6.3v1, and trying to do a simple fork of a Win 2012 VM.

No idea what's going on, but obviously it doesn't like the command....

PowerCLI C:\Users\VMware\Documents> Connect-VIServer

cmdlet Connect-VIServer at command pipeline position 1

Supply values for the following parameters:

Server[0]: vcenter-lab.mydomain.net

Server[1]:

Name                           Port  User

----                           ----  ----

vcenter-lab.mydomain.net          443   MYDOMAIN\Administrator

PowerCLI C:\Users\VMware\Documents> $vm = Get-vm "HTDC - Windows 2012 R2"

PowerCLI C:\Users\VMware\Documents> $parentForkVM = Enable-InstantCloneVM -vm $v

m -GuestUser "administrator" -GuestPassword "VMware1!" -PostCloneScript C:\Users

\VMware\Documents\vmfork.bat

Enable-InstantCloneVM : 7/21/2016 3:48:42 PM    Enable-InstantCloneVM

Object reference not set to an instance of an object.

At line:1 char:17

+ $parentForkVM = Enable-InstantCloneVM -vm $vm -GuestUser "administrator"

-GuestP ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~

    + CategoryInfo          : NotSpecified: (:) [Enable-InstantCloneVM], VimEx

   ception

    + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomatio

   n.Extensions.InstantClone.Commands.EnableInstantCloneVM

Reply
0 Kudos
atlantauser
Contributor
Contributor
Jump to solution

Figured it out. Host was at 5.5 even though vCenter was 6.0 Update 2.  Hosts must be at 6.0+ I guess?

Reply
0 Kudos