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 
<https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-8.1-and-8/hh824950(v=win.10)#implicit-answer-file-search-order>
 
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.
>
>
> https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/update-windows-settings-and-scripts-create-your-own-answer-file-sxs
>
> On Tue, Jun 18, 2019 at 1:39 AM Udbhav <[email protected] <javascript:>> 
> 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.
>>
>>
>> https://www.packer.io/docs/builders/hyperv-iso.html#generation-1-vs-generation-2
>>
>>
>> https://www.packer.io/docs/builders/hyperv-iso.html#creating-an-iso-from-a-directory
>>
>> 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 [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/6e29c282-5cf5-4481-8ec1-1ff5c3b8bf57%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/packer-tool/6e29c282-5cf5-4481-8ec1-1ff5c3b8bf57%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/70bb67f8-1436-47d3-aad5-4da5153a1747%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to