VMware Cloud Community
Nico27
Contributor
Contributor

Error vmkfstools for clonning

Hello,

I have ESX3i, and i use vmkfstools for creating a clone, but I have an error.

I use this syntax: vmkfstools --server nameserver -i /vmfs/volumes/datastore1/rep1/vm1.vmdk /vmfs/volumes/datastore1/rep2/vm2.vmdk -d thick -a lsilogic

I have this message: "Unable to clone virtual disk : General fault caused b file. The system cannot find the file sprecified"

My directories (rep1 and rep2) exist. My files "vm1.vmdk" exist. My VM is off.

Help me, please

Reply
0 Kudos
15 Replies
dcampbell
Enthusiast
Enthusiast

Try the following

vmkfstools -i /vmfs/volumes/datastore1/rep1/vm1.vmdk /vmfs/volumes/datastore1/rep2/vm2.vmdk

Reply
0 Kudos
Nico27
Contributor
Contributor

Hello,

vmkfstools --server nameserver -i /vmfs/volumes/datastore1/rep1/vm1.vmdk /vmfs/volumes/datastore1/rep2/vm2.vmdk

I have this error: Unable to clone virtual disk : A general system error occured: Internal error

For ESX3i, I must specify the diskformat and adapter type. In your command, i'don't have this parameters, that is wy i have this error.

But, with the parameters, i have the first error.

Reply
0 Kudos
dmaster
VMware Employee
VMware Employee

Hello Nico27,

Did you try using the buslogic adapter instead of the lsilogic ?

Did you try using diskformat thin instead of thick (you can always inflate your disk afterwards ) ?

Nico27
Contributor
Contributor

Hello,

I have the first error: "The system cannot find the file specified"

The "Console Administration Remote CL" is compatible with ESX3i ?

Reply
0 Kudos
Dave_Mishchenko
Immortal
Immortal

The RCLI is compatible with ESXi, it just doesn't work that great yet and it's missing bits that you would find in the SC for ESX. As alternatives

1) Use VMware Converter to clone the VM.

2) Use the unsupported console prompt to run vmkfstools on the host itself instead of using the RCLI.

3) Use the datastore browser in the VI client to copy the file (but it's not doing using vmkfstools but rather doing a cp).

gi-minni
Contributor
Contributor

Yes, indeed I can confirm that this is a bug I had few days ago.

Here my workaround:

1. goto the unsupported shell (with ALT-F1). Type unsupported and enter your root password if you have one.

2. enable SSH Server (edit /etc/inetd.conf and remove the remark before ssh)

3. reboot

4. execute from another appliance (the RCLI appliance is fine) ssh root@<esx3i-server> /sbin/vmkfstools -i <source-vmdk-filepath>x.vmdk <clone-vmdk-filepath>x.vmdk

5. If you wish to control the VMware instances use the VI Perl Toolkit mainly vmcontrol.pl.

6. Goto /usr/local/share/viperltoolkit/apps/vm

7. Execute perl vmcontrol.pl --username <username> --password <password> --server <IP-address or name> --operation <poweron,poweroff,shutdown,suspend,reset,standby,reboot> --vmname <vm-name>

8. If you wish to automate all this stuff make and cronify your script.

Note: You can get help with perl vmcontrol.pl --help

Hope this helps you a bit

Reply
0 Kudos
Nico27
Contributor
Contributor

Hello;

Thanks for the help.

The SSH Server it's enable. When I execute vmkfstools -i x.vmdk x.vmdk I have this error:

DiskLib_Check() failed for source disk The system cannot find the file specified (25).

I'm connect on the ESX3i server with root.

Reply
0 Kudos
phenrichs
Enthusiast
Enthusiast

Had a similar issue. The enginnering team told me I was the first to identify it as a specific bug. Here is the workaround syntax that he sent me.

"

The current workaround is to specify empty string for the destination disk format instead ( -d '' )

For example, the following works:

vmkfstools --server x.x.x.x --username root --password xxx -a lsilogic -d '' -i /vmfs/volumes/46f7e912-667ac1d4-8617-0030485b1722/vm1/vm1.vmdk /vmfs/volumes/46f7e912-667ac1d4-8617-0030485b1722/vm1/vm2gb.vmdk

Note also that the adapter type needs to be specified as well.

"

Hope this helps. It worked for me.

Regards,

Paul

Reply
0 Kudos
Nico27
Contributor
Contributor

Hello,

Phenrichs, you use the ESX3i or ESX, because it's not OK fo me.

I have the error "DiskLib_Check() failed for source disk The system cannot find the file specified (25)."

I tested directly on the server esx3i, and with remote connection with the appliance "Console Administration Remote CLIs".

It's very strange.

Reply
0 Kudos
dmaster
VMware Employee
VMware Employee

Hello Nico27,

I had the same problem as you have..

it's not possible what you trying to do. you canno't clone a disk and give it a disktype of thick.

you don't have to specify the disktype at all.

what you also can do is, use the disktype thin and later inflate the disk.. (vmkfstools -j)

p.s. don't forget to award people with points for correct and usefull answers

Reply
0 Kudos
Nico27
Contributor
Contributor

Hello,

vmkfstools -j don't work: "Failed to open virtual disk (vmfs/volumes/datastore1/.../...vmdk): The system cannot find the file specified (25)", the file exist, i'm sure.

I have been testing:

Create a virtual disk: vmkfstools -c 1048m /vmfs/volumes/datastore1/test/test.vmdk, It's OK.

clonning the disk: vmkfstools -i /vmfs/volumes/datastore1/test/test.vmdk /vmfs/volumes/datastore1/clone/clone.vmdk, It's OK. (I create the folder "clone" before with datastore Browser)

but, I can't clonning a virtual disk created with a VIClient, why? (my syntax it's OK) because "vmkfstools -c" create by default a thick disk

Reply
0 Kudos
dmaster
VMware Employee
VMware Employee

1) you can only use vmkfstools -j when you have created a disk with the disktype thin.

# vmkfstools -c 100M test2.vmdk -d thin

# ll

total 104576

-rw------- 1 root root 104857600 Jul 17 11:27 test2-flat.vmdk

-rw------- 1 root root 394 Jul 17 11:27 test2.vmdk

# vmkfstools -j test2.vmdk

Inflate: 100% done.

#

2) you can also clone disks wich are created with the VI-client (just don't use the disktype thick when you try cloning it)..

make sure the disk is not in use that moment and the virtual machine wich using it has been powered off.

Reply
0 Kudos
Nico27
Contributor
Contributor

IT's ok,

I restarted my physical server.

My mv was arrested, I don't understand, a background task?

Thank.

Reply
0 Kudos
maxsf16
Contributor
Contributor

Verifique no datastore se existe a pasta de destino. Caso não exista, você pode criar por acesso SSH.

     mkdir /vmfs/volumes/datastore1/clone

Depois execute vmkfstools -i "/vmfs/volumes/datastore1/test.vmdk" "/vmfs/volumes/datastore1/clone/clone.vmdk" -d thin

Reply
0 Kudos
a_p_
Leadership
Leadership

I'm afraid that you are 14 years too late with your answer 😉