How to provide unattend.xml for building windows image from a vhdx file?

19 views
Skip to first unread message

Udbhav

unread,
Jun 17, 2019, 7:39:52 PM6/17/19
to Packer
Hi,

As per packer docs for building image from vhdx or iso, unattend.xml needs to be provided in an iso. 

When I am trying to provide unattend.xml as part of answers.iso it's not getting picked up. My base image is in vhdx format.

Any help or directions will be appreciated.


Links for reference.



Thanks
Udbhav

Alvaro Miranda Aguilera

unread,
Jun 18, 2019, 3:01:42 AM6/18/19
to packe...@googlegroups.com
hello.

Have you done this in windows before?

the unattend.xml is read by the Windows installer, from the same ISO or a floppy.

Packer allows you to create a floppy disk with some files, ie unattend.xml

When you use vhdx, do you have the installer? or you are booting from an existing VM?

unattend.xml only works as a response file for the Windows installer.


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/6e29c282-5cf5-4481-8ec1-1ff5c3b8bf57%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Udbhav

unread,
Jun 18, 2019, 12:01:15 PM6/18/19
to Packer
Hi,

Thanks for the help.I am able to resolve the problem now.

As per Packer Docs I created an ISO with Unattend.xml and provided it in "secondary_iso_images" in packer config. It gets picked up then. Earlier I have named it as Autounattend.xml which should work as per Microsoft docs but it doesn't for some reason.

"Have you done this in windows before? The unattend.xml is read by the Windows installer, from the same ISO or a floppy."
This is the first time I am doing it. As per the windows docs it doesn't need to be same ISO or a floppy. It can be any removable drive but unattend.xml needs to be on the root.

"Packer allows you to create a floppy disk with some files, ie unattend.xml"
Yes, Packer does allow that but I am using generation 2 hyper-v, it does not support floppy disk.

"When you use vhdx, do you have the installer? or you are booting from an existing VM? unattend.xml only works as a response file for the Windows installer."
(Please correct me if I am wrong) I guess VHDx is already installed. If you set the boot record it will immediately gets booted. In my case I am providing it to an Hyper-V and its working.

On Tuesday, June 18, 2019 at 12:01:42 AM UTC-7, Alvaro Miranda Aguilera wrote:
hello.

Have you done this in windows before?

the unattend.xml is read by the Windows installer, from the same ISO or a floppy.

Packer allows you to create a floppy disk with some files, ie unattend.xml

When you use vhdx, do you have the installer? or you are booting from an existing VM?

unattend.xml only works as a response file for the Windows installer.


On Tue, Jun 18, 2019 at 1:39 AM Udbhav <udbhav....@gmail.com> wrote:
Hi,

As per packer docs for building image from vhdx or iso, unattend.xml needs to be provided in an iso. 

When I am trying to provide unattend.xml as part of answers.iso it's not getting picked up. My base image is in vhdx format.

Any help or directions will be appreciated.


Links for reference.



Thanks
Udbhav

--
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 packe...@googlegroups.com.


--
Alvaro

Reply all
Reply to author
Forward
0 new messages