Hi,
I am trying to clone a VM using vmrun with vSphere/ESX4 using the following command line:
"C:\Program Files\VMware\VMware VIX\vmrun.exe" -T esx -h https://44.1.1.122/sdk -u root -p password clone "[datastore1] Win 2003 Template/Win 2003 Template.vmx" "[datastore1] Win 2003 Template-X/Win 2003 Template-X.vmx" full
but I get the error:
Error: The operation is not supported
What about the operation is not supported? I haven't seen anything that suggests that ESX4 doesn't support clone.
Thanks ahead of time.
CC
To be completely explicit:
ESX supports the operation.
However, the VIX API and vmrun do NOT support the operation against ESX. Cloning a VM is much more complicated in the vSphere environment than it is in a Workstation environment and the current VIX API does not expose that complexity; for instance, Clone in vSphere needs to know which Folder to place the resulting clone.
vmware-vixWrapper-Administrator-xxxx.log contains the following:
Dec 14 06:15:06.530: app-3664| Log for VixWrapper pid=3612 version=1 build=build-207905 option=Release
Dec 14 06:15:06.530: app-3664| The process is 32-bit.
Dec 14 06:15:06.530: app-3664| Host codepage=windows-1252 encoding=windows-1252
Dec 14 06:15:06.530: app-3664| config points to non-existent implementation library 'C:\Program Files\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'
Dec 14 06:15:06.530: app-3664| config points to non-existent implementation library 'C:\Program Files\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'
Dec 14 06:15:06.546: app-3664| config points to non-existent implementation library 'C:\Program Files\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'
Dec 14 06:15:06.546: app-3664| config points to non-existent implementation library 'C:\Program Files\VMware\VMware VIX
ws_server_esx-4\32bit\vix.dll'
Dec 14 06:15:06.546: app-3664| Loading Vix implementation library C:\Program Files\VMware\VMware VIX
VSphere-4.0\32bit\vix.dll
Dec 14 06:15:06.577: app-3664| unable to load func VixHost_OpenVM from library C:\Program Files\VMware\VMware VIX
VSphere-4.0\32bit\vix.dll (127)
vmware-vix-Administrator-xxxx.log contains the following:
Dec 14 06:15:06.608: app| Log for Vix pid=3612 version=-1 build=build-186713 option=Release
Dec 14 06:15:06.608: app| The process is 32-bit.
Dec 14 06:15:06.608: app| Host codepage=windows-1252 encoding=windows-1252
Dec 14 06:15:06.608: app| Foundry Init: setting up global state (0 threads)
Dec 14 06:15:06.608: app| Vix_InitializeGlobalState: vixLogLevel = 0
Dec 14 06:15:06.608: app| Vix_InitializeGlobalState: vixApiTraceLevel = 0
Dec 14 06:15:06.608: app| Vix_InitializeGlobalState: vixDebugPanicOnVixAssert = 0
Dec 14 06:15:06.608: app| Vix_InitializeGlobalState: vixLogRefcountOnFinalRelease = 0
Dec 14 06:15:06.749: app| Debug VMX was requested, but not present. Using standard VMX.
Dec 14 06:15:06.749: app| Stats VMX was requested, but not present. Using standard VMX.
Dec 14 06:15:07.108: app| Host OS: 'Microsoft Windows Server 'Longhorn' Standard Server 6.0.6002, Service Pack 2', product type '3', suite mask '0x0110'.
Dec 14 06:15:07.108: app| HOSTINFO: Seeing Intel CPU, numCoresPerCPU 2 numThreadsPerCore 1.
Dec 14 06:15:07.108: app| HOSTINFO: numPhysCPUs is 0, bumping to 1.
Dec 14 06:15:07.108: app| HOSTINFO: This machine has 1 physical CPUS, 1 total cores, and 1 logical CPUs.
Dec 14 06:15:07.218: app| User does not have permission to read the autorun setting in the registry.
Dec 14 06:15:07.233: app| LOCALE windows-1252 -> NULL User=409 System=409
Dec 14 06:15:07.233: app| VixHost_ConnectEx: version -1, hostType 5, hostName https://44.1.1.122/sdk, hostPort 0, options 528
Dec 14 06:15:07.233: app| HOSTINFO 62151163590 @ 3579545Hz -> 0 @ 1000000Hz
Dec 14 06:15:07.233: app| HOSTINFO ((x * 2399728063) >> 33) + -17362866948
Dec 14 06:15:08.030: app| VixVM_FinalRelease: Close VM socket.
Clone is not supported on ESX. See http://www.vmware.com/pdf/vix180_vmrun_command.pdf
I have probably been mistaken and you can clear this up for me. Is vSphere the same as ESX4 is the same as VMWare server? Or ESX4 is part of vSphere.
In this case, yes. ESX 4 is part of vSphere, and the label VMware Server gets thrown around in docs to cover them as well as the products VMWare Server 1.0 and VMware Server 2.0.
In the specfic case of VIX (and vmun) Clone, only the Workstation product (version 6.5 or later) is supported.
Thanks.
To be completely explicit:
ESX supports the operation.
However, the VIX API and vmrun do NOT support the operation against ESX. Cloning a VM is much more complicated in the vSphere environment than it is in a Workstation environment and the current VIX API does not expose that complexity; for instance, Clone in vSphere needs to know which Folder to place the resulting clone.
To be completely explicit:
ESX supports the operation.
Are you saying its supported in a sense that if it was managed by vCenter, that the clone operation would work OR are you saying that ESX(i) itself actually has a clone function/operation that is not exposed externally? If it's the latter .... is it possible to access ![]()
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
![]()
If you find this information useful, please award points for "correct" or "helpful".
It does work from a vCentre I think. I am working on an automation project and wanted to get off easy using vmrun. Looks like I'm going to be hitting up the vCentre sdk and webservices and writing some code.
I'm aware that it works on vCenter, as the clone operation is only supported with vCenter
My question was around the comment of ESX supporting it
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
![]()
If you find this information useful, please award points for "correct" or "helpful".
ESX, when managed by vCenter Server, supports cloning virtual machines. Sorry for not being clear enough.
Hi William,
did you get this working? I am having the same issue trying to use vmrun to clone a vm on a esx 3.5 host managed with VCenter 2.5.
I am getting Operation is not supported when running the vmrun -T esx clone command
Marc
clone operation is ONLY supported and ONLY works when connecting against vCenter and not individual ESX(i) host.
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
![]()
If you find this information useful, please award points for "correct" or "helpful".
Please see my first comment in this thread. Regardless of whether the host supports the "clone" operation, vmrun ONLY supports cloning with VMware Workstation.
Hi thanks for both answers but now I am even more confused.
One says it's supported with VCeneter (which does not work for me). The other one says it only works with VMWorksation. William did you get it succesfully running with vcenter? Is there any other way we could perform this. We have developers using Linux and they need to be able to create clones of VM's running on ESX(managed by VCenter) out of scripts.
Regards
Marc
I thought an earlier version of vmrun, specifically 1.6.2 supported at least full cloning but I just tried it again with the latest version installed on vMA and it looks like the operation indeed is not supported. I'll need to go back and test 1.6.2, but I swear this had worked but perhaps something changed in the most recent releases.
Update: Now I remember, when VIX 1.6.2 was first released, there was a bug with their cloning and revertToSnapshot operations as I documented on our site - http://engineering.ucsb.edu/~duonglt/vmware/#vmware_vix Guess VMware still hasn't fixed this problem, yet they added support for both ESX(i) and vCenter. Sorry for the confusion
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
![]()
If you find this information useful, please award points for "correct" or "helpful".
