VMware vSphere

 View Only
  • 1.  Cloning a VM from VCenter taking a long time.

    Posted Aug 04, 2016 05:16 AM

    Hi

    I am building an application in which I used VMCreate.run() method in VMCreate class provided in vsphere sdk 6.0.  I could create but there there is no OS found. Then I used VMClone.run() method  to clone a VM ( using vsphere sdk 6.0). I was able to create a clone, but it is taking a long time to create (nearly 1 and a half hours). I tried with a VM in power off mode. Then also the same problem exists.  Can anyone give an answer?

    Thanks

    Saumya



  • 2.  RE: Cloning a VM from VCenter taking a long time.

    Posted Aug 04, 2016 08:21 AM

    I don't deal with vSphere SDK myself.

    but by looking into class and method you are using, I am guessing following.

    VMCreate.run() method

    this is probably to create a new VM from scratch, obviously will not have OS (or VMDK depends upon how you are creating it) at all.

    VMClone.run() method

    since above is to clone an Existing VM, it will pickup entire VM along with it's VMDKs and going through a full clone operation. Amount of time this operation takes depends upon Size of VM (VMDKs) and storage system in place.

    ====== Updates =======

    just went though the documentation, and yes

    VMCreate is to create a new VM from scratch as it's explained on following link, so when you power on this VM, it will report that no OS found.

    VMCreate (VMware vSphere Web Services SDK JAXWS Java Samples Documentation)

    While VMClone class, I was not able to find much about it, may be I didn't spend much time searching.