VMware Communities
SwarupDev
Contributor
Contributor
Jump to solution

VM Ware workstation 15 player Error in opening vmx file is corrupt

I am using VM Ware workstation 15 player in Win 10 laptop. The Guest OS is Ubuntu 18.04 LTS. I had the maximum size of the HD set to 40 GB. The current size has reached 39.4, and today the OS will not open. It tries to when I give the command, but is unable to complete the process of opening and freezes up. I assume it is due to lack of space.

So I went to increase the disc capacity, but when I click on the option to do so it gives the message that "There is not enough space on the file system for the selected operation." My HD has 120 GB, and 12 GB are free. I tried to increase the virtual HD by 6 GB. But I read that there has to be a free space on the HDD equal in size to the Virtual HD size in order to expand it. In reading on the VM ware site it says that one solution for this is to copy the workstation virtual machine to an external drive where there is adequate space, and carry out the expand operation there. After which it can be again moved back to the original location in one's computer.

So I copied the workstation virtual machine to an external drive. When I try to open it there, I get the message "Error in opening, vmx file is corrupt." I read about how to recover or create a new vmx file here, but the first step it gives is: "Log in to the Flash or HTML5 web client as an administrator". I read about this but could not understand how I can do it.

Please kindly guide me so that I can expand the size of my workstation virtual machine.

0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

It's the virtual machine's partitions that you want/need to modify, not the host operation's partitions.

Therefore it's only the VM which you want to boot from from a live CD/ISO. To do this, simply map the gParted ISO image to the VM's CD-ROM drive, and make sure that "Connect at power on" is enabled. Right after powering on the VM, put the focus on the VM's screen, and press the "ESC" key to get the Boot Menu from.

Hint: Pressing "ESC" in time can be challenging. What you can do, is - with VMware Workstation closed - edit the VM's configuration (.vmx) file, and add a boot delay of e.g. 5 seconds.

bios.bootDelay = "5000"

André

View solution in original post

0 Kudos
30 Replies
a_p_
Leadership
Leadership
Jump to solution

If the .vmx file is corrupt, and you still have a current vmware.log file, it should be possible to re-create the .vmx file from the .log file.

I've created a batch script for this, please see HowTo: Recreating a .vmx from the vmware.log file

Caution: In case the VM has active snapshots, make sure that the .vmx file points to the latest snapshot .vmdk file in order to avoid data loss!

André

0 Kudos
SwarupDev
Contributor
Contributor
Jump to solution

Thank you. I will definitely try that if what I am trying now doesn't work.

I created a new virtual OS using the workstation player, but I created it on my external HD, and gave it the same name as my original vmdk file. I then replaced the vmdk of the new virtual OS with a copy of my actual vmdk file. The VM workstation player recognizes this as a new vmware virtual os on my external HDD. So I gave the command to expand the virtual hard disc there from 40 to 46 GB -- and it is going through the process of expanding now. Once it is done I will see if I can open it and if so, will then expand the Ubuntu partition to fill the entire virtual hard disc of 46 GB.

The question I have is: would the reason for my guest Ubuntu OS failing to open today be that it had filled the entire virtual 40 GB hard disc? Could this lack of space be what caused it not to boot? I am just hoping this is the case, and that expanding the virtual hard disc from 40 to 46 GB solves the problem.

0 Kudos
SwarupDev
Contributor
Contributor
Jump to solution

Completed the disc expansion to 46 GB. But when I try to boot it, it still gets stuck at the same place it was before. Here is a screenshot. If you have insight as to what the problem is please let me know. And if you can tell me how to fix it that will be great!

0 Kudos
scott28tt
VMware Employee
VMware Employee
Jump to solution

Moderator: Please do not start multiple threads on the same issue/topic.

The second thread you created has now been deleted.


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Are you able to switch to another terminal by pressing e.g. ALT-F3? If so, please logon, and run df -h to find out about the current disk usage.

Maybe it's possible delete some large (unnecessary) files this way. Once done restart the VM by using the reboot command.

Other than this, you may try to boot the VM from e.g. a gParted Live image, and resize the partitions.

In all cases, make sure that you have a current backup!

André

0 Kudos
SwarupDev
Contributor
Contributor
Jump to solution

Ultimately I got a temporary solution yesterday: In my original virtual machine, the one in my laptop, at the time of boot, by pressing and holding the left shift key I was able to get the Ubuntu boot menu (Grub) to show. And by that I was able to (1) fix defective files needed for boot, and (2) clean the virtual machine and thereby create some space. After doing both these I was able to boot up the virtual machine, and it is working fine (the OS is not using the whole virtual screen, probably something related with vmware tools for linux, but that is not my main concern right now). 

Now the virtual machine is working but only because I was able to create some space. There are 500 mb free in the OS. But I need to expand the virtual machine from 40 GB to 46  GB. This is critically needed, otherwise the same problem is going to happen again. There is nothing I can remove to make it smaller; I've already done that over the last several months and what remains is going to remain. Most of the space is taken by my Thunderbird email, which is extremely large.

So now the main work remaining is to expand the virtual machine, and that requires an amount of free space on the HDD equal or more than the size of the virtual drive; that space I do not have.

So I need to copy the virtual machine to my external drive, expand it by 6 GB, and then copy it back to my internal HDD. This is what I need guidance with. What is the method for copying the virtual machine to the external HDD? Yesterday when I did it that is when I got the whole problem with "vmx file corrupt". So instead of copying the whole virtual machine, should I rather create a new virtual machine (by the same name) on the external HDD, and then just replace the vmdk file created there with my vmdk file? Or, what is the proper way to do this? I am not a tech expert, so please word your explanation in a way I will be able to follow :-).

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Glad to read that you were able to fix the OS so far.

Regarding the virtual disk, it sounds as if you are using a monolithic virtual disk (one single, large .vmdk file). Are you using this format by purpose, or would the default "split" format (multiple .vmdk files) be ok for you too. An advantage of the split format is that an expansion doesn't require the whole .vmdk file to be copied/cloned, i.e. allows an expansion with less disk space, and the expansion will happen in seconds.

If the split format is ok for you, copy the current .vmdk file to your external disk. After copying the .vmdk file ensure that the checksums for the source and the copy match. Then delete the original .vmdk file, and use vmware-vdiskmanager.exe to convert the existing virtual disk into the split format, with the VM's folder as the target location. After that you should be able to resize the virtual disk from the GUI.

Sample command:

vmware-vdiskmanager.exe -r "<external-source>\VMName.vmdk" -t 1 "<VM-Folder>\VMName.vmdk"

Please verify that vmware-vdiskmanager.exe is availabe in the installation directory. I'm using the Pro edition, and I'm currently not shure whether this tool comes with the Player edition.

André

0 Kudos
SwarupDev
Contributor
Contributor
Jump to solution

Hi André,

Thank you for your reply!

I have a few questions below, before I implement your guideline:

If the split format is ok for you

=> yes, it is fine

After copying the .vmdk file ensure that the checksums for the source and the copy match. Then delete the original .vmdk file,

=> So the copy is on my external HDD and the original is on my internal HDD. You want me to delete the original from my internal HDD? It sounds a bit risky. Perhaps I should put two copies of it on the external HDD just in case.

and use vmware-vdiskmanager.exe to convert the existing virtual disk into the split format, with the VM's folder as the target location.

=> So the work will be done on the copy which is on my external HDD, and the target destination will be my VM folder in my internal HDD. Have I understood correctly?

Sample command:

vmware-vdiskmanager.exe -r "<external-source>\VMName.vmdk" -t 1 "<VM-Folder>\VMName.vmdk"

=> So this command will convert the vmdk file from a single monolith to a multi-version having a number of files which together constitute the same vmdk file. Correct?

Please verify that vmware-vdiskmanager.exe is availabe in the installation directory. I'm using the Pro edition, and I'm currently not shure whether this tool comes with the Player edition.

=> The file vmware-vdiskmanager.exe is not in the installation directory of vmware. I had read somewhere in the past couple days that this file is only in the Pro edition. Someone had written online somewhere that one can download the pro edition and use it to do some work with vmware-vdiskmanager.exe, as the Pro edition can be used for free for 30 days. So I had downloaded it, but I have not installed it. Before doing so, wanted to make sure that the Pro installation will not interfere with my Player edition? Can they both be installed on the same machine? Does it sound like this approach should serve the purpose?

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Whether you want to make more than one copy/backup depends on you. If doing so, you should also consider to place the copies/backups on different drives.

Regardless of the number of copies, use a checksum tool to ensure that the copies are healthy.

=> So the work will be done on the copy which is on my external HDD, and the target destination will be my VM folder in my internal HDD. Have I understood correctly?

Not exactly. The command will use the external copy as the source. The source will only be read (not modified) in this case.

=> So this command will convert the vmdk file from a single monolith to a multi-version having a number of files which together constitute the same vmdk file. Correct?

Yes, the target will be a "growable virtual disk split into multiple files" (option: -t 1) as it is named in vmware-vdiskmanager. The result will be a small descriptor file (vmname.vmdk), and multiple data files (vmname-s0xx.vmdk).

=> ... Can they both be installed on the same machine? Does it sound like this approach should serve the purpose?

No. You will have to uninstall VMware Workstation Player first. Unless things changed with the current version (I'm still using v15), the Pro installation contains Player. So there's no need to uninstall/install anything after the conversion.

André

0 Kudos
SwarupDev
Contributor
Contributor
Jump to solution

Whether you want to make more than one copy/backup depends on you. If doing so, you should also consider to place the copies/backups on different drives.

Regardless of the number of copies, use a checksum tool to ensure that the copies are healthy.

=> Ok sure, sounds good. And in that case, once confirmed, I should not need a second copy.

The command will use the external copy as the source. The source will only be read (not modified) in this case.

=> Ok sure, that is clear.

The target will be a "growable virtual disk split into multiple files" (option: -t 1) as it is named in vmware-vdiskmanager. The result will be a small descriptor file (vmname.vmdk), and multiple data files (vmname-s0xx.vmdk).

=> Sounds good. Is there any down side to this multi-file approach? So far I've heard the benefit that one can easily expand the virtual machine's size with the multiple-file version. Any down side? If the monolith has other benefits such as, for example, speed of function (just a guess), then it seems to me once I have gone to the effort of putting a copy of the .vmdk on the EHDD, I could easily enough expand it there if there are benefits to keeping it as a monolith. Just want to get the big picture before I move ahead with this.

You will have to uninstall VMware Workstation Player first. Unless things changed with the current version (I'm still using v15), the Pro installation contains Player. So there's no need to uninstall/install anything after the conversion.

Someone wrote this online about monolith  vs split: "Having split drives is undesirable if you can avoid them and are concerned about performance. The produce the same effect as a badly fragmented drive, for the simple reason that they are multiple fragments on the physical drive. The only reason I can imagine for not using a monolithic drive is if you backup the drive files and your backup software can't deal with a monolithic one for some strange reason. Unless you have a real need to break the drive up into multiple pieces don't do it."

If there are performance issues, there may be more long term benefit by keeping with the monolith? Just asking.

=> Ok, So I would uninstall my Workstation 15 Player, install VMWare 16 Pro (VMware-workstation-full-16.0.0-16894299), and use it for a month as pro, after which it would revert to player. If I've understood, that sounds good.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

I don't think that there's a performance difference between the different sparse file formats.

The split file format basically eliminates the need to copy/clone the whole file in case of expansions, or cleanups which requires less temporary disk space, and allows expansions in seconds, regardless of the virtual disk's size.

Since the split file format is the default for new virtual disks, and I don't see a reason why not to use it, I usually leave it as is (except for test purposes).

André

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

... after which it would revert to player.

It actually installs both, Pro and Player.

André

0 Kudos
SwarupDev
Contributor
Contributor
Jump to solution

Ok, sounds good. It's probably more of performance difference in theory than in practice, especially for general use purposes like mine. I will go for it in the next day or two as soon as I can get time, and let you know how it goes.

0 Kudos
SwarupDev
Contributor
Contributor
Jump to solution

One follow up question before I move ahead: Increasing the size of the virtual drive does not increase the size of the partition inside. I have read that from a live session booted from ISO, one can do the usual operations with Gparted for increasing the partition size. But it is not clear to me how this is to be accomplished. 

I will need to use a boot-up disc to boot from, rather than booting into my Win 10 OS? And once I boot using the bootup disc, I will have to look inside the Win OS for my documents folder, and therein the virtual machines folder, and therein my virtual machine called Ubuntu 18.04 LTS. Once I open Gparted in the live boot, how will I see virtual disc and the Ubuntu partition inside it? All I have is that vmware .vmdk file called "Ubuntu 18.04 LTS.vmdk". How will Gparted see the partition and do its work?

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

It's the virtual machine's partitions that you want/need to modify, not the host operation's partitions.

Therefore it's only the VM which you want to boot from from a live CD/ISO. To do this, simply map the gParted ISO image to the VM's CD-ROM drive, and make sure that "Connect at power on" is enabled. Right after powering on the VM, put the focus on the VM's screen, and press the "ESC" key to get the Boot Menu from.

Hint: Pressing "ESC" in time can be challenging. What you can do, is - with VMware Workstation closed - edit the VM's configuration (.vmx) file, and add a boot delay of e.g. 5 seconds.

bios.bootDelay = "5000"

André

0 Kudos
SwarupDev
Contributor
Contributor
Jump to solution

Hi André, the conversion went fine. And I have mapped the GParted ISO image to the VM's CD-ROM drive, and made sure that "Connect at power on" is enabled".

But I have not been successful in getting the boot menu. It keeps booting all the way up rather than giving me the boot menu.

So I thought I would implement your suggestion for the 5 second delay. I double clicked on the .vmx file to open it and add the line you provided, but rather than opening some file, it opened a GUI of the configuration options which appear when one opts to edit the virtual machine when it is not open. So, not sure where to put the line bios.bootDelay = "5000" ?

Also: I am wondering whether it may be possible to use GParted from within my VM after it is booted up? I read someone on the web that this can be done.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

The .vmx file is a text file which can be edited via any text editor, e.g. Notepad.


André

0 Kudos
SwarupDev
Contributor
Contributor
Jump to solution

Please see the attached. This is what opens when I click on the .vmx file to  open it. It is not a text file.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

That's the expected behavior, because the .vmx extension is associated with VMware Workstation.

Do not double click the .vmx file, but open it with e.g. Notepad to edit it.


André

0 Kudos