-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
add super key (vmware builder) #5681
Conversation
I also added proper handling of holding down the A-Z keys, such as for selecting boot options like holding Command+R for Rescue Mode in macOS guests. Example packer.json demonstrating holding down A-Z keys: {
"builders": [
{
"type": "vmware-iso",
"boot_command": [
"<enter><wait10><wait10><wait10><wait10>",
"<tab><spacebar><wait10><wait10><wait10>",
"<leftCtrlOn><leftAltOn>t<leftAltOff><leftCtrlOff><wait10>",
"echo '<rOn><wait5><rOff>'<enter><wait>",
"echo '<ROn><wait5><ROff>'<enter>"
],
"boot_wait": "10s",
"disk_size": 81920,
"guest_os_type": "ubuntu-64",
"iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.3-desktop-amd64.iso",
"iso_checksum_type": "sha256",
"iso_checksum": "1384ac8f2c2a6479ba2a9cbe90a585618834560c477a699a4a7ebe7b5345ddc1",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "1800s",
"shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now",
"vm_name": "packer-hold-az-test",
"vmx_data": {
"memsize": "1024"
}
}
]
} |
Updated PR to add logging for |
Did you look into how macOS is built in https://github.com/timsutton/osx-vm-templates ? |
@rickard-von-essen I have been using Tim Sutton's excellent project there as a basis! Actually, I prefer not to build a VM manually and then import that into packer, but rather stretch macOS happens to make heavy use of Super hotkeys, but this PR would actually be helpful for managing other OS's as well :) |
Wow, after playing with specifically macOS 10.13 High Sierra guest VMs it is now apparent that VMware Tools can no longer be installed without temporarily disabling SIP. This requires Recovery Mode, which requires sending Command+R during boot, which requires being able to send Super and to hold R in Example packer configuration: |
This seems good. the question I have is if we should add this to the other boot command steps now, or wait for support to be added to those with future PRs. I would like the consistency, but it's not something I would hold this up on |
@mwhooker someday someone have to take on the boring task of deduplicating the code for the |
Yes, a thousand times yes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as advertised. thanks.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Add the critical Super key as a
boot_command
term. This key works for Linux guests as the Super key, macOS guests as the Command key, and should work for Windows guests as the Windows key, though Windows deserves additional testing.Note that other builders should also be upgraded to recognize the super key, like VirtualBox. This is just a quick proof of concept based on the current structure of the packer codebase.
Example usage: Raising the music menu in Ubuntu 16.04.
I also tested this PR with macOS guest, using ISO's generated from Apple hardware with https://github.com/mcandre/macos-isos . I'll be publishing my work in progress packer JSON configuration soon from a "macos" branch of my packer-templates.
Closes #5633