VMware Communities
promisedev
Contributor
Contributor

Unable to reserve memory

After applying the vmnet and vmmon patch due to upgrading to a new kernel on a debian-based system, I'm getting the following error:

The virtual machine is unable to reserve memory. If selecting Retry does not work, try closing programs on the host machine to free memory first.

For more information about this error, see "http://vmware.com/info?id=19".

I'm trying to run a VM on a machine which has plenty amount of RAM, on top of this a 4GB swap partition is put in place. I reviewed all the threads I found on similar issues and haven't found a solution. The issue happens when both trying to run a 32-bit and 64-bit vms.

If any additional information is required in order to reproduce the issue please let me know.

Things I did to get the VMWare to actually install after upgrading to kernel 4.9:

changed the functions get_user_pages to get_user_pages_remote in hostif.c and userif.c as well as adding a ,1 parameter in the end. Otherwise vmnet and vmmon failed to build.

Fixing the vmnet failed and vmmon failed issue on kernel 4.9 (replace get_user_pages with get_user_pages_remote and add an additional '1' as a parameter at the end)

# cat /usr/lib/vmware/modules/source/vmnet-only/userif.c | grep -C 2 get_user_pages_remote

  down_read(&current->mm->mmap_sem);

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)

  retval = get_user_pages_remote(addr, 1, 1, 0, &page, NULL, 1);

#else

  retval = get_user_pages_remote(current, current->mm, addr,

                          1, 1, 0, &page, NULL);

#

cat /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c | grep -C 2 get_user_pages_remote

  down_read(&current->mm->mmap_sem);

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)

  retval = get_user_pages_remote((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL, 1);

#else

  retval = get_user_pages_remote(current, current->mm, (unsigned long)uvAddr,

                          numPages, 0, 0, ppages, NULL);

# vmware-modconfig --console --install-all; echo "SUCCESS" \(that\'s for the copy-pasters.\)

0 Kudos
4 Replies
bobdtc
Contributor
Contributor

Hello, did you find a solution? i have exactly the same issue. Thanks to your previous post i was able to run VMWare Workstation after the upgrade of my debian kernel (4.9). But right now:

'The virtual machine is unable to reserve memory. If selecting Retry does not work, try closing programs on the host machine to free memory first.'

Then:

'Unable to change virtual machine power state: Internal error'

Regards,

0 Kudos
promisedev
Contributor
Contributor

Still haven't. I guess the issue is up to the VMWare developers now. Probably we should wait for a new version to come up where this is fixed.

0 Kudos
bobdtc
Contributor
Contributor

Finally got it working, apply this following patch: http://rglinuxtech.com/?p=1838

Then be sure you installed your Kernel Headers:

apt-get install linux-headers-$(uname -r)

Then:

cd /usr/lib/vmware/modules/source

tar xf vmmon.tar

tar xf vmnet.tar

cd vmmon-only

make

cd ../vmnet

make

cd ..

mkdir /lib/modules/`uname -r`/misc

cp vmmon.o /lib/modules/`uname -r`/misc/vmmon.ko

cp vmnet.o /lib/modules/`uname -r`/misc/vmnet.ko

depmod -a

/etc/init.d/vmware restart

0 Kudos
promisedev
Contributor
Contributor

I made a small bash script to patch the vmnet failed and vmmon failed issue with vmware sources to run on kernel 4.9: (based on the information you provided)

VMWare vmmon vmnet kernel 4.9 unofficial patch - Direct link vmwkp4.9.tar

0 Kudos