VMware Cloud Community
fun_9990
Contributor
Contributor

How to resolve vi: out of memory error in vmware esxi 6.5

I need to edit vmdk file like this tutorial VMware Knowledge Base

but I get this error message

vi: out of memory

Of course, I powered off some of my virtual servers, but error continued

How can I resolve this problem?

Reply
0 Kudos
7 Replies
a_p_
Leadership
Leadership

What's the size of the .vmdk file you are trying to open in vi?

It should be only a few hundred bytes.

André

Reply
0 Kudos
fun_9990
Contributor
Contributor

In my mentioned video file size is 300GB and my file size is 200GB

Reply
0 Kudos
a_p_
Leadership
Leadership

Each virtual disk in ESXi consists of two files, a header/descriptor .vmdk file, and the data .vmdk file.

The one you may need to edited, when recreating the header file is the small one without "flat" in its name.

André

Reply
0 Kudos
fun_9990
Contributor
Contributor

I think I was in mistake, isn't it?

Reply
0 Kudos
a_p_
Leadership
Leadership

Don't worry, you are welcome to ask here in the communities.

Such thing can be confusing, if you don't work with them from time to time.

André

Reply
0 Kudos
fun_9990
Contributor
Contributor

you made my day

Reply
0 Kudos
a_p_
Leadership
Leadership

If both, the source, and the destination folder are on the same datastore, you can use the native "mv" command to move both files ("backup-disk.vmdk", and "backup-disk-flat.vmdk") to the destination folder.

If you want to move the virtual disk to another datastore, use the "vmkfstools" command to clone the virtual disk, and once migrated successfully, delete the source virtual disk.

sample: vmkfstools -i /vmfs/volumes/source-ds/folder/backup-disk.vmdk /vmfs/target-ds/folder/backup-disk.vmdk

Depening on the required target disk format you may need to add -d [thin|thick] to the command line.

Caution: Both option require special treatment, if snapshots are involved!

André

Reply
0 Kudos