5

I just installed 14.04 Desktop, using "automatic partition setting" by the installer, with the "encrypt entire hard disk" option. I installed the latest VMWare (version date Apr 17th). Now whenever I launch one of my old VMs (haven't tried making a new one yet), I get a warning dialog box with the following text:

VMware Player recommends 512 MB of system swap space for the set of currently running virtual machines. 0 bytes of system swap space is available. For optimum performance increase the amount of system swap space, or configure all virtual machine memory to use reserved host RAM under Preferences.

...with an OK button underneath. I'm getting it a few seconds after I ask it to launch the VM, but I think it's before it starts booting (but not sure). This message didn't appear in 13.10 with the older VMware Player.

I'm worried I might be doing something seriously wrong. Is it telling me I don't have swap on my host machine? (If so, how can I check that? GParted only shows the top-level partitions, maybe my swap area is inside the encrypted partition.) Do I really need the swap on my host? (I have 8GB of RAM, and I'm running 2 VMs at a time, each with 1 GB of RAM). Should I turn this warning off? (there's a checkbox for that) Or is it telling me my VM doesn't have a swap area? Here's what I get when I type df -h in my VM:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              19G  4.1G   14G  23% /
none                  497M  164K  497M   1% /dev
none                  501M     0  501M   0% /dev/shm
none                  501M   80K  501M   1% /var/run
none                  501M     0  501M   0% /var/lock
none                  501M     0  501M   0% /lib/init/rw

And here's what I get when I type it in my host machine:

Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root  680G   78G  567G  13% /
none                         4.0K     0  4.0K   0% /sys/fs/cgroup
udev                         3.9G  8.0K  3.9G   1% /dev
tmpfs                        789M  1.2M  787M   1% /run
none                         5.0M     0  5.0M   0% /run/lock
none                         3.9G  276K  3.9G   1% /run/shm
none                         100M   84K  100M   1% /run/user
/dev/sda2                    237M   54M  171M  24% /boot
/dev/sda1                    511M  3.4M  508M   1% /boot/efi
/home/karjala/.Private       680G   78G  567G  13% /home/karjala
1
  • My VM used a swap file instead of a swap partition. You can find the link to increasing it here. Aug 21, 2019 at 13:43

4 Answers 4

6

I didn't have a swap area in my host machine. So I created a swap file as described here and that solved my problem. I'm not getting the warning anymore.

1
  • 1
    Also my host machine (with 8GB of RAM) has no hick-ups anymore. It was bad before the swap file.
    – alexk
    Apr 21, 2014 at 19:44
2

If you have enough physical memory installed, you could try fllowing:

  1. close all your vms.
  2. In VMware Edit->Preferences->Memory->Additional Memory, chang "Allow some/most virtual machine memory to be swapped" to "Fit all virtual machine memory into reserved host RAM"
1

This is what I did. Ubuntu 20.04.2 LTS VM player 16.1.1 I had 2G setup, it needed 8G, so I gave 16G for good measure :)

>sudo swapoff --all -v
swapoff /swapfile

>sudo fallocate -l 16G /swapfile

>sudo swapon --all -v
swapon: /swapfile: found signature [pagesize=4096, signature=swap]
swapon: /swapfile: pagesize=4096, swapsize=2147483648, devsize=17179869184
swapon /swapfile

>free
              total        used        free      shared  buff/cache   available
Mem:       65796988     3256216    19500668       85196    43040104    61725084
Swap:      16777212           0    16777212

Now all I need to figure out is how to get VM Player to see my RX480 cards... anyone know how to do this one?

0

While the above solution looks adequate, I was confused with the fact that I had included a 10GB swap partition during installation of 14.04.3. After looking at /etc/fstab I noticed that the line for the swap partition had been commented out during or after installation.

This page (could not mount /dev/mapper/cryptswap1) suggests this is a bug related to encrypting the home directory. I reformatted the partition as swap with GParted (because it was not recognised as such by the system), and verified the UUID (which had changed) with the command:

sudo blkid

Then I edited the line in fstab to include UUID of the swap, and uncommented it. After restarting my machine the system in general, as well as VMWare Workstation 12 Player, successfully recognised the swap partition.

The VM is now much faster. This could explain why things were running very slowly with an older version of the VMWare Player - perhaps the same version that didn't complain about absent swap space.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .