VMWare Virtual Machine
We all get out of memory after using the VM for some time. If it is true, you are at right place. VM is short form of Virtual Machine in which is a software build to run multiple Operating systems inside existing operating system. It shares the same physical hardware of primary OS and gives the user to experience the multiple platforms in a single shot. In this blog, we will show you, how to increase primary memory in centOS running inside VMware Virtual Machine.
Sometime after installation of VM. IF you are a frequent user of VM, you will generate a lot of data inside VM. And at some point later you will be out of storage memory.
Recently I faced the same and following is the solution to it. If you follow the exact 8-steps you can fix your query within minutes.
Let’s start with VM settings.Refer the below screenshot. Go to the settings and click on HardDisk. Now find Expand option and click on it.
We also see the capacity section which gives information like current size of OS, maximum size,
We will see a window prompt with the option to increase the size. Press up arrow to increase size.
Do not increase a lot at once. As it will take a lot of time to convert the primary memory to virtual memory.Then hit Expand. My recommendation is 15GB, in my case have done 30 GB.
You can increase anytime you want later again.
Once the expansion finishes. We will find a prompt message displayed below:
Now we can see the virtual maximum memory increased in the settings.
Now boot the OS and login to root user. If not in root user you can switch inside with below command.
Once in root user, give below command followed by few options. Please NOTE all commands are listed in red color. Give the exact options shown below respectively.
Once Over with this step, you OS will recognize the memory. Hence needed a reboot.
Again after login come to the root user. Follow the commands listed below to see the details for your memory.
We will increase the volume group so to include the new physical volume we created.
Now we will see how much space we have free in the volume group.
We can check the free space with the below command.
Note: the option free is in uppercase F. lowercase won’t work.
The result means there is 30.99 GB or 7934 extends free. This will vary from the system to system.
This step includes extending of the logical volume.
Note: the command has option L in lower case, many make mistake by taking as 1(one).
Note: The numbers after -l is the exact same number we got by the previous command.will vary system to system.
Now we will stretch/resize the filesystem to include the new space.And we are done already.
This last step will verify we have done things correctly.
We can see the total memory by adding various nodes inside CentOS is aprox 50 GB. Few extra memory is reserved as security.
To leave the root user.
Now are done with the extending the OS memory inside VM. Keep visiting www.acadgild.com for more trending technical blogs.