Resizing the Vmware VMDK Through Ansible script

Hi Team,

I’m looking for ansible script to resize my Existing Virtual machine Primary Hard disk (VMDK).

Cheers

Shiva Shankar S

Hi Shiva,

You can do like this -

HI Abhijeet,

Thanks a lot for your script, I need one more help that after VM HDD space increased on VM level, we need to perform some task on OS level to see the additional disk space, do you have any ansible script or any help from you.

Cheers
Shiva Shankar S

What kind of tasks do you need to run on the OS level? You can either use vmware_vm_shell to run command or add that VM as ansible host using add_host and run command in subsequent plays.

Interested in this too. I got a windows VM with only C drive. I want to resize from 60GB to 70GB

how do i set up the playbook

Dear Abhijeet Kasurde,

Thanks a lot for your script, the disk upgrade on vcenter was successful but windows os can’t boot again (blue screen) after disk is expanded by script

I am using ansible 2.10.8, vcenter 8
Please help me !

Vào lúc 19:15:19 UTC+7 ngày Thứ Tư, 10 tháng 6, 2020, Tony Wong đã viết:

I don’t think vmware support to resize the disk by decrease the volume size directly. Likely the disk shrink already removed some file systems from OS and cause the OS not able to boot up.

Thanks and Best Regards,

Thanh.