Menu
InformatiWeb Pro
  • Index
  • System admin
  • Virtualization

Login

Registration Password lost ?
FR
  • Windows Server
    • WMS 2012
    • WS2012 R2
    • WS2016
  • Citrix
    • Citrix NetScaler Gateway
    • Citrix XenApp / XenDesktop
    • Citrix XenServer
  • VMware
    • VMware vSphere
    • VMware Workstation
  • Microsoft
    • Hyper-V
  • InformatiWeb Pro
  • Virtualization
  • VMware
  • Use real (PMem) or simulated (vPMem) persistent memory on VMware ESXi 6.7 via virtual disks

Use real (PMem) or simulated (vPMem) persistent memory on VMware ESXi 6.7 via virtual disks

  • VMware
  • VMware ESXi, VMware vSphere
  • 13 January 2023 at 09:53 UTC
  • InformatiWeb
  • 2/2
Previous page

5. Persistent memory retained when restarting a VM

Because persistent memory is set on your VMware ESXi host, the data in it will be preserved.

For the example, we have created a "test.txt" file in this partition.

Restart the virtual machine.

After restarting the virtual machine, you will see that the data on this partition has been preserved.

And the contents of the "test.txt" file have been preserved.

6. Restart the VMware ESXi host

Important : if you have simulated persistent memory on your VMware ESXi host, be aware that the data on it will be lost if you shut down or restart the host.

Confirm restarting your host.

7. Virtual persistent memory (PMem) erased

After restarting your VMware ESXi host, you will see that the amount of virtual (simulated) "persistent" memory is still present.

However, if you look at the hardware configuration of your virtual machine, you will see that the persistent memory hard disk now has a capacity of 0 bytes.
You will also see that the location of your "pmem" datastore is no longer the same.

As you can see, the name of the "PMemDS-" datastore has changed, as well as its location.

8. Replace persistent memory disk

Because the persistent memory was cleared, VMware ESXi recreated a new one when your host started up.
But since its location has changed, the ".vmdk" file previously created in your "PMemDS-..." datastore no longer exists.

If you attempt to start your virtual machine, a "Failed to power on virtual machine" error will appear because the ".vmdk" file affected by the persistent memory disk can't be found.

To begin, delete the virtual hard disk whose location begins with "/vmfs/volumes/pmem".

Confirm the deletion of the associated files from this virtual hard disk (although these files no longer exist in the "PMemDS-..." datastore) by checking the "Delete files from datastore" box.

An error appears since VMware ESXi can't delete the .vmdk file of this virtual hard disk since virtual "persistent" memory was lost when restarting your VMware ESXi host.

Now that the missing persistent memory disk has been removed from your virtual machine configuration, you can again edit your virtual machine to recreate a new one.

Add a new persistent memory disk by clicking on : Add hard disk -> New persistent memory disk.

As expected, the location of this persistent memory disk is the new "PMemDS-..." datastore and the controller used is a SCSI controller.

9. Lost data

Start the virtual machine by clicking on : Power on.

The virtual machine starts correctly.

But, if you open the file explorer, you will see that the partition created previously on the persistent memory disk is obviously gone.

If you go to Windows Disk Management (by right clicking "Manage" on "Computer"), you will see that the disk corresponding to the persistent memory virtual hard disk is not initialized.
The data was therefore effectively lost (in the case where the "persistent" memory was simulated).

10. Disable simulated persistent memory

Before disabling the simulated persistent memory from your VMware ESXi host, it's important to remove any persistent memory disks or NVDIMMs that your virtual machines would use.
To do this, click on "Edit" for the virtual machines concerned.

Delete the persistent memory virtual hard disk by clicking on the small cross to its right.

Confirm the deletion of the .vmdk file associated with this virtual hard disk in the "PMemDS" datastore by checking the "Delete files from datastore" box.
Then, click on : Save.

Note : don't forget to do the same for virtual NVDIMMs that you would have added to virtual machines with a compatible guest operating system.

The virtual machine was successfully reconfigured.

Now that the "persistent" memory on your VMware ESXi host is no longer in use, you can disable it in the command line to reclaim the portion of your random access memory (RAM) that was reserved for it.
To do this, make sure that the SSH protocol is enabled on your VMware ESXi host, then connect to your host using SSH.

Once logged in as "root", type this command :

Bash

esxcli system settings kernel set -s fakePmemPct -v 0

Then, restart your VMware ESXi host to apply the changes.

Bash

reboot

To verify that the simulated "persistent" memory has been disabled, use the command below.

Bash

esxcli system settings kernel list -o fakePmemPct

As you can see, the configured value and the currently used value (Runtime) are now 0.
The simulated "persistent" memory has therefore been disabled.

Plain Text

Name         Type   Configured  Runtime  Default  Description
-----------  -----  ----------  -------  -------  ------------------------------
fakePmemPct  uint8  0           0        0        Amount of fake persistent
                                                  memory (in pct of all volatile
                                                  memory)

Share this tutorial

Partager
Tweet

To see also

  • VMware ESXi 6.7 - Add a physical disk to host

    VMware 7/27/2022

    VMware ESXi 6.7 - Add a physical disk to host

  • VMware ESXi 6.7 - Improve the performance by using a physical HDD

    VMware 12/23/2022

    VMware ESXi 6.7 - Improve the performance by using a physical HDD

  • VMware ESXi 6.7 - Make virtual machines unique

    VMware 9/23/2022

    VMware ESXi 6.7 - Make virtual machines unique

  • VMware ESXi 6.7 - Manually transfer a VM to another VMware ESXi host

    VMware 9/2/2022

    VMware ESXi 6.7 - Manually transfer a VM to another VMware ESXi host

Comments

No comment

Share your opinion

Pinned content

  • Software (System admin)
  • Linux softwares
  • Our programs
  • Terms and conditions
  • Share your opinion

Contact

  • Guest book
  • Technical support
  • Contact

® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.

Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.