===============================================
2019/7 / 28_ first edit ccb_warlock
===============================================
In the recent work done to provide virtual machine discovery, vcenter templates and although you can quickly create a virtual machine template exactly the same, but because of different configurations on the hard drive of each person's request, vmware only support expansion of hard drive configuration.
In doing so the template, designed to be smaller hard drive, and then do the expansion disk, depending on each person's needs just fine.
One, Scene
The initial virtual machine hard disk: 16G
After the expansion of the virtual machine hard disk: 50G
Second, the
df -h
fdisk -l
fdisk / dev / sda
1) Enter "n", the transport; (n: New Partition)
2) do not enter, the transport; (p: primary partition)
3) There are several options do not enter, Enter;
4) Enter "t", Enter; then do not enter, the transport; (t: Set partition number)
5) Enter "L", the transport; then enter "8e", carriage return; (8e: Specifies the partition as Linux LVM)
6) Enter "w", carriage return; (w: save changes)
2.3 restart the virtual machine
reboot
2.4
fdisk -l
2.5
pvcreate /dev/sda3
vgextend centos /dev/sda3
vgdisplay
lvextend -l +100%FREE /dev/mapper/centos-root
xfs_growfs /dev/mapper/centos-root
df -h
1.https://www.cnblogs.com/piaoyang2087/articles/6829225.html
2.https://www.cnblogs.com/kevingrace/p/5825963.html