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: floppy_command section similar to boot_command #13

Open
ghost opened this issue Apr 16, 2021 · 0 comments
Open

Enhancement: floppy_command section similar to boot_command #13

ghost opened this issue Apr 16, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 16, 2021

This issue was originally opened by @mcandre as hashicorp/packer#8057. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Some classic operating systems such as OS/2 Warp require floppy disks to be inserted prior to loading ISO's. And so it would be helpful for Packer to provide a floppy_command section, similar to boot_command, where users can insert and remove virtual floppy diskettes with custom delays between data loads. The user configuration would look like:

floppy_command: [
    "<insert image=floppy-1.img drive=a>",
    "<wait30s>",
    "<enter>",
    "<wait5s>",
    "<remove drive=a>",
    "<wait5s>",
    "<insert image=floppy-2.img drive=a>"
    "<enter>",
    "<wait1m>",
    "<remove drive=a>",
    "<wait5s>"
],
iso_url: "winworldpc.com/os2/...",
boot_command: [
    "..."
]

As a workaround, I found a minor abuse of the guestproperty wait subcommand for the VirtualBox hypervisor, e.g. guestproperty wait <uuid> goodnight-moon --timeout <milliseconds>, followed by controlvm 'os/2' keyboardputscancode... for the Enter scancodes. Followed by controlvm <uuid> savestate to free the VM lock for the rest of the Packer build.

This happens to not depend on VirtualBox guest drivers, and guestproperty wait even exits with a zero code for now. But this could easily break in the future, and digging around with hypervisor details kind of defeats the purpose of using Packer in the first place.

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

No branches or pull requests

0 participants