Additional disks with vmware-vmx

45 views
Skip to first unread message

andr...@gmail.com

unread,
Aug 13, 2017, 7:38:54 PM8/13/17
to Packer
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



Alvaro Miranda Aguilera

unread,
Aug 14, 2017, 4:40:26 AM8/14/17
to packe...@googlegroups.com
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

--
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 packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/7de91a8f-4cc3-4dbd-b015-7aa5b3f77b9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

andr...@gmail.com

unread,
Aug 14, 2017, 5:10:33 AM8/14/17
to Packer
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, <andr...@gmail.com> 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 packer-tool...@googlegroups.com.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages