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.
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.
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.
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.
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).
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 :
esxcli system settings kernel set -s fakePmemPct -v 0
Then, restart your VMware ESXi host to apply the changes.
To verify that the simulated "persistent" memory has been disabled, use the command below.
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.
Name Type Configured Runtime Default Description ----------- ----- ---------- ------- ------- ------------------------------ fakePmemPct uint8 0 0 0 Amount of fake persistent memory (in pct of all volatile memory)
® 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.