Thank you for that.

This is what I ended up with:

"Copying template $source..." | Write-Host
Copy-Item -Path "$source" -Destination "." -recurse
# $base has vmx template folder name
Move-Item $base $stage
"Creating addition virtual disk..." | Write-Host
. "C:\Program Files (x86)\VMware\VMware 
Workstation\vmware-vdiskmanager.exe" -c "$stage\disk2.vmdk" -t 1 -s 60GB -a 
lsilogic

$spec = "scsi1.present = `"TRUE`"
scsi1.virtualdev = `"lsisas1068`"
scsi1:0.filename = `"disk2.vmdk`"
scsi1:0.present = `"TRUE`""
#This is my vmx name
$spec | Add-Content "$stage\packer-windows-2012-base.vmx"

After that I can run packer and in the powershell provisioner execute this 
script:

Get-Disk |
Where partitionstyle -eq 'raw' |
Initialize-Disk -PartitionStyle MBR -PassThru |
New-Partition -AssignDriveLetter -UseMaximumSize |
Format-Volume -FileSystem NTFS -NewFileSystemLabel "disk2" -Confirm:$false

This seems to do the trick.

Andrew


On Monday, 14 August 2017 20:40:26 UTC+12, Alvaro Miranda Aguilera wrote:
>
> Hello.
>
> vmware-vmx doesn't have that option.
>
> but, you can open the VM using VMWARE and add the disk manually.
>
> will be a one time thing, and you get the new template. for the disk you 
> require.
>
> alvaro
>
> On Mon, Aug 14, 2017 at 1:38 AM, <[email protected] <javascript:>> wrote:
>
>> Hello all,
>>
>> I'd like to add hard disks to the machine I'm building with vmware-vmx.
>>
>> What is the best way to achieve that?
>>
>> Thanks,
>> Andrew
>>
>>
>>
>> -- 
>> 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/packer/issues
>> IRC: #packer-tool on Freenode
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/7de91a8f-4cc3-4dbd-b015-7aa5b3f77b9c%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/packer-tool/7de91a8f-4cc3-4dbd-b015-7aa5b3f77b9c%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> 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/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/668b687c-bdc4-4f16-9d91-11121f1e7856%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to