How to set vm disk size using vagrantfile vmware workstation

1,016 views
Skip to first unread message

Matt

unread,
Jul 12, 2016, 6:47:21 AM7/12/16
to Vagrant
Hi,

Does anybody have a solution to setting hdd size (not partitioning, just the disk size) on vagrant up?
The following seems plausible but does not work...yet

 
config.vm.provider "vmware_workstation" do |v|
    v
.gui = true
    v
.vmx["memsize"] = "4096"
    v
.vmx["numvcpus"] = "4"  
    file_to_disk
= File.realpath( "." ).to_s + "/disk.vmdk"
    vdiskmanager
= 'C:\Program Files (x86)\VMware\VMware Workstation\vmware-vdiskmanager.exe'
   
'#{vdiskmanager} -x 40Gb #{file_to_disk}'
end


Any suggestions?

Thanks,

Matt

unread,
Jul 12, 2016, 9:14:21 AM7/12/16
to Vagrant
At the time this runs,  the vmdk is not yet created.

Just saying.



pita.

Alvaro Miranda Aguilera

unread,
Jul 13, 2016, 12:41:53 PM7/13/16
to vagra...@googlegroups.com
Hello

The easiest way is to create a VM with the size you require.

What OS are youy after? have you look into packer ?

Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/3abe0773-dc7d-410c-bd99-836998965edb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

FiZxMiKe

unread,
Apr 17, 2018, 5:06:53 PM4/17/18
to Vagrant
Almost two years later... Any answer to this? I really don't wan to go through the packer process again, and re-upload my box (already burned a week on porting TO windows to make management happy...). Now I need a dev box with more disk space. This should be vagrant-up time configurable, then in provisioning we can expand partition... I Just found out that service fabric requires a butt load of disk space for some reason.

Best,
Michael

Alvaro Miranda Aguilera

unread,
Apr 18, 2018, 4:43:01 AM4/18/18
to vagra...@googlegroups.com
Hello

if you share OS I can help you find a template that can get you started.

since disk is thin provisioning you can set 1TB if you like and size of VM will be small


but start trying to fix an existing one is going bit of anti-clockwise .

the best is create a VM thats fit for what you require and recreate it if dependencies/pre-requirements change.

Alvaro.


To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/237b5771-dd5c-4dea-9934-b874a047b8be%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

FiZxMiKe

unread,
Apr 18, 2018, 9:47:30 AM4/18/18
to Vagrant
I'm using vagrant with VMWare Workstation support (paid) to launch Windows Server 2016 from a Windows 10 box. I understand that creating a new base box is the way to go... I might just have to bite the bullet and do it... not sure why my company makes me use windows when projects take 10x longer to get off the ground (especially if you want to *automate* re-deployment of dev and prod). Others are still in love with mouse-clicks.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages