VMware Cloud Community
renss78
Contributor
Contributor

VMDK --> Single Growable file in ESXi

Dear VMware users,

As the subject says:

I want to convert a vmdk in a single growable file WITHOUT using the Windows environment. I did used the Windows application(it comes with VMware workstation) vmware-vdiskmanager to convert a vmdk file(xxx-flat.vmdk, xxx.vmdk.) in a single file. This worked fine with the following command:

"C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager" -r Windows8.vmdk -t 0 Windows8-ve.vmdk

Now i want to do it straight in the ESXi environment(i assume this goes via the console), but i do get it to work properly. I tried the following:

I downloaded the 1023856-vdiskmanager-linux.7.0.1.zip from VMware KB: Repairing a virtual disk in Fusion 3.1 and Workstation 7.1.

I ran the program on my ESXi(5.5) console and it works, now i want to convert the vmdk using the following command:

/vmfs/volumes/xx/tools # ./1023856-vmware-vdiskmanager-linux.7.0.1 -r /vmfs/volumes/xx/CentOS/CentOS.vmdk -t 0 /vmfs/volumes/xx/CentOSclone/testvm.vmdk

It outputs the following error:

SSLGetModulePath: readlink failed: No such file or directory

SSLLoadSharedLibrary: Failed to load library libssl.so.0.9.8:./libdir/lib/libssl.so.0.9.8/libssl.so.0.9.8: cannot open shared object file: No such file or directory

Core dump limit is 0 KB.

Child process 5017154 failed to dump core (status 0x6).

VMware Workstation Error:

VMware Workstation unrecoverable error: (app)

SSLLoadSharedLibrary: Failed to load library libssl.so.0.9.8:./libdir/lib/libssl.so.0.9.8/libssl.so.0.9.8: cannot open shared object file: No such file or directory

Please request support.

To collect data to submit to VMware support, select Help > About and click "Collect Support Data". You can also run the "vm-support" script in the Workstation folder directly.

We will respond on the basis of your support entitlement.

How is it possible that everything works in the Microsoft environment but not in the ESXi environment. And another thing: i want to send the converted vmdk file to a remote Linux Server. If i understand correctly this is possible with the same vdiskmanager, right?


Options for remote disks:

     -h <hostname>        : hostname of remote server

     -u <username>        : username for remote server

     -f <filename>        : file containing password

     -P <port>            : optional TCP port number (default: 902)

     -S                   : specifies that the source disk is remote, by default

                            the remote options are assumed to refer to the

                            destination.


Help is appreciated.

Best Regards, Rens

9 Replies
renss78
Contributor
Contributor

Dear Friends,

I just found out that the issue is not in the command but the whole tool is not working properly.

It doesn't matter what command i use, the same error(i pasted it in my previous post) remains.

Help is appreciated.

Best Regards, Rens

0 Kudos
a_p_
Leadership
Leadership

I do not really understand the use case, but for ESXi the command you need to manage virtual disks is vmkfstools. That said, there's nothing like growable files in ESXi. The virtual disk formats in ESXi are thin, thick and eager zeroed thick.

André

0 Kudos
renss78
Contributor
Contributor

There is nothing like growable files?, what is this then?

Disk types:

      0                  : single growable virtual disk

      1                  : growable virtual disk split in 2GB files

      2                  : preallocated virtual disk

      3                  : preallocated virtual disk split in 2GB files

      4                  : preallocated ESX-type virtual disk

      5                  : compressed disk optimized for streaming

      6                  : thin provisioned virtual disk - ESX 3.x and above

So the vmware-vdiskmanager is for what?, the options above are from the diskmanager. Or are you going to tell me this tool is only for VMware workstation on Windows Clients?


Anyway i managed to use vmkfstools and made a clone of the VM, with the following command:

vmkfstools -i /vmfs/volumes/datastore2/CentOS/CentOS.vmdk /vmfs/volumes/datastore2/CentOSclone/CentOS.vmdk -d thin

This command also makes one file of the VM.

But what is the essence of cloning? copy a VM while they are online, so it gives me the following error:

DiskLib_Check() failed for source disk Failed to lock the file (16392).


Now you (probably) going to tell me to use vCenter do do this. But vCenter is only compatible for Windows Server systems... I do not want to use a Windows environment! just want to clone the machines on the ESXi.

Thanks for your response! Smiley Happy

Best Regards, Rens


0 Kudos
a_p_
Leadership
Leadership

... are you going to tell me this tool is only for VMware workstation on Windows Clients?

The vmware-vdiskmanager command line tool is available for Windows, Linux and MAC/OS X.

But vCenter is only compatible for Windows Server systems ...

VMware also offers vCenter Server as a Linux based Appliance.

... copy a VM while they are online, so it gives me the following error ...

As you found out, cloning requires the VM to be powered off. It may however work to create a snapshot of a VM and use its base disk as the source!?

Maybe also an interesting article: How to VMFork aka Instant Clone Nested ESXi? | virtuallyGhetto

André

0 Kudos
renss78
Contributor
Contributor

Hello André,

Thanks for your quick responses!

... are you going to tell me this tool is only for VMware workstation on Windows Clients?

Yes it is, but it is not working in Linux, see error in first post.

But vCenter is only compatible for Windows Server systems ...

Yes but i need to buy it

As you found out, cloning requires the VM to be powered off. It may however work to create a snapshot of a VM and use its base disk as the source!?

Maybe also an interesting article: How to VMFork aka Instant Clone Nested ESXi? | virtuallyGhetto

You mean the base disk of the initial snapshot?, i will read the article..

I just found a very useful post :

Re: Clone a VM directly from single ESXi Host

The last Post from MarelFoodProcessing


Jeroen van Schelt made a bash script which makes snapshots of the VM and a clone. I think the solution is based on a snapshot(as you said, good!).

Best Regards, Rens


0 Kudos
a_p_
Leadership
Leadership

Yes it is, but it is not working in Linux, see error in first post.

Rus it on a Linux system, not on ESXi. The console you have in ESXi is not a full blown Linux distribution, nor does the VMFS file system support this file type.

Yes but i need to buy it

That's correct. If you need it you'll have to pay for it. Btw. did I already ask you what you are doing for a living? In case you produce something that might be useful for me, I'd like to have it (for free of course)! Smiley Wink


Regards

André

0 Kudos
renss78
Contributor
Contributor

That's correct. If you need it you'll have to pay for it. Btw. did I already ask you what you are doing for a living? In case you produce something that might be useful for me, I'd like to have it (for free of course)!

Wauw what a unpleasant off-topic ironic joke is that? on a VMware forum, how rubbish. But you are contradicting yourself, first helping me to find a "free" solution and than link me to a "payed" solution.

But the fact is: we already pay for vCenter... i just find it a unhandy extra package. The issue i have with VMware products is the more products the more confusing it gets, it is decadent.


But this gets totally off-topic.

0 Kudos
a_p_
Leadership
Leadership

I'm actually trying to help, and this was only meant as a joke, nothing else. Sorry.

André

0 Kudos
renss78
Contributor
Contributor

Hello André,

No problem at all. I'm stressing on this matter for quite a while now, that why my reaction was a bit grumpy.

But the script was the solution for my problem!(see screenshot) Smiley Happy.

solution.png

Best Regards, Rens