Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Add ability to build efi VM #1

Open
EYEVO opened this issue Dec 1, 2021 · 2 comments
Open

Enhancement: Add ability to build efi VM #1

EYEVO opened this issue Dec 1, 2021 · 2 comments

Comments

@EYEVO
Copy link

EYEVO commented Dec 1, 2021

I've noticed that the vm's made are of the bios type.
To leverage all the benefits from uefi it would be ideal to be able to make vm's of the efi type.

What I have found if you add to the windows.pkr.hcl it boots just fine:

boot_wait             = "1s"
boot_command          = ["a<enter><wait>a<enter><wait>a<enter><wait>a<enter>"]

However, then when it starts installing, it starts to complain about the unattend file having the wrong partitions. So adding the proper unattended allows you to install in efi mode.

Would be a nice addition to this repo.
Let me know if you need me to test anything.

@andif888
Copy link
Owner

andif888 commented Dec 1, 2021

indeed, efi or efi-secure requires a different disk layout.
In the autounattend.xml you need to change the DiskConfiguration

           <DiskConfiguration>
                <Disk wcm:action="add">
                    <CreatePartitions>
                        <CreatePartition wcm:action="add">
                            <Size>400</Size>
                            <Order>1</Order>
                            <Type>EFI</Type>
                        </CreatePartition>
                        <CreatePartition wcm:action="add">
                            <Size>128</Size>
                            <Order>2</Order>
                            <Type>MSR</Type>
                        </CreatePartition>
                        <CreatePartition wcm:action="add">
                            <Order>3</Order>
                            <Extend>true</Extend>
                            <Type>Primary</Type>
                        </CreatePartition>
                    </CreatePartitions>
                    <DiskID>0</DiskID>
                    <WillWipeDisk>true</WillWipeDisk>
                </Disk>
            </DiskConfiguration>

@andif888
Copy link
Owner

andif888 commented Dec 1, 2021

and obviously the InstallTo to:

                    <InstallTo>
                        <DiskID>0</DiskID>
                        <PartitionID>3</PartitionID>
                    </InstallTo>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants