Setting "Bytes Per Cluster" size while Windows Installation

78 views
Skip to first unread message

Alexander Birkner

unread,
Jun 27, 2017, 5:18:13 AM6/27/17
to Packer
Hello!

I'm using Packer to create qcow2 qemu images for our OpenStack cluster. We have already build some Linux images and that worked great.
Now I wanna create Windows images and all works fine except the partition creation.

Is there a way to execute CMD scripts before the answer files starts? Or easier preparing the volume before the Windows installation starts?

We have a HPE 3PAR storage and this supports deduplication but to get it work we need a custom cluster size for the NTFS partition of 16k.
If someone is interested HPE describes the best practices there: https://www.hpe.com/h20195/v2/getpdf.aspx/a00006358enw.pdf?ver=1.0

Microsoft only supports to set the "Bytes Per Sector" size in the answer file but not the "Bytes Per Cluster" size which needs to be set to 16k for perfect deduplication.

I can only find the way to do it manually:

1. Start Windows installation
2. Press Shift + F10 to open CMD
    a. diskpart
    b. select disk 0
    c. create partition primary size=1000
    d. format quick e. create partition primary
    f. format quick unit=16K
3. Close CMD
4. Install Windows on created partition

Has someone a good idea how to solve this?

Thank you in advance. 

Regards
Alexander

Alvaro Miranda Aguilera

unread,
Jun 27, 2017, 7:32:05 AM6/27/17
to packe...@googlegroups.com
Hello

I am not sure this will work, but I think it should.

Perhaps open a ticket with Microsoft to get a confirmation, after all with the licenses support is included.

You should be able to use:


So you can use diskpart
then format like:
format C:\ /FS:NTFS /A:16K /X" (16K cluster size or whatever you feel is right for you)



--
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/29f17365-abc3-436c-a0d5-4891fec91a10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages