Multiple disks and the 'vmdk_name' option?

276 views
Skip to first unread message

Matt Hickok

unread,
Jan 29, 2018, 7:07:51 PM1/29/18
to Packer
Hello, 

If I am producing multiple VMDKs during a vmware-iso build, is there a way to name both disks? There is a 'vmdk_name' field but I don't know how this works with multiple disks. Or would I need to edit the vmx data?

Thanks!

Alvaro Miranda Aguilera

unread,
Jan 30, 2018, 3:13:47 AM1/30/18
to packe...@googlegroups.com
can you test?

vmdk_name (string) - The filename of the virtual disk that'll be created, without the extension. This defaults to "packer".

seems it will use the disk name




--
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/e979e80f-698b-4c0f-beb9-311338234ec4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Matt Hickok

unread,
Jan 30, 2018, 11:19:55 AM1/30/18
to Packer
So that makes sense. If I want the first disk to be named 'os' and the second disk to be named 'data', would I need to set the disknames then? Or is there a different way to do it? I have a feeling I need to modify the vmx data.


On Tuesday, January 30, 2018 at 2:13:47 AM UTC-6, Alvaro Miranda Aguilera wrote:
can you test?

vmdk_name (string) - The filename of the virtual disk that'll be created, without the extension. This defaults to "packer".

seems it will use the disk name



On Tue, Jan 30, 2018 at 1:07 AM, Matt Hickok <matthew...@gmail.com> wrote:
Hello, 

If I am producing multiple VMDKs during a vmware-iso build, is there a way to name both disks? There is a 'vmdk_name' field but I don't know how this works with multiple disks. Or would I need to edit the vmx data?

Thanks!

--
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

Gabo Kete

unread,
Jan 30, 2018, 5:59:53 PM1/30/18
to Packer
Hi Matt

The way I did that is, first of all ,vmdk_name is the option to use to give the disk a name ( see below how I pass a variable to that option  to give the disk a specific name )

"vmdk_name":"{{user \`vmdk\`}}",


Secondly the way I created multiple disk is to modify the vmx data.. but not entirely sure if vmdk_name (string) , if you add multiple entries like

vmdk_name : root-disk
vmdk_name : data-disk

Will be something that works.. I personally do not think so because the option is a string and I'd expect to have an array if that option can create more than one disk...

But is worth the shot .. if that doesn't work, I will recommend you to modify the VMX file and add the disks there

Alvaro Miranda Aguilera

unread,
Jan 30, 2018, 7:58:19 PM1/30/18
to packe...@googlegroups.com
as is packer just the the name as prefix

the process builds then export, however you could use the names you require when you provision the vm

i havent used the vmx to override this, so i can't comment on that

thanks
alvaro

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/b169077a-caf2-4b92-8f98-14e5ab4ab928%40googlegroups.com.

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



--
Alvaro

Niraj Nandane

unread,
Nov 14, 2019, 6:02:00 AM11/14/19
to Packer
I also need this. Anyone got this working?


On Wednesday, January 31, 2018 at 6:28:19 AM UTC+5:30, Alvaro Miranda Aguilera wrote:
as is packer just the the name as prefix

the process builds then export, however you could use the names you require when you provision the vm

i havent used the vmx to override this, so i can't comment on that

thanks
alvaro
To unsubscribe from this group and stop receiving emails from it, send an email to packe...@googlegroups.com.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages