You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've set headless = false explicitly in the packer config and it still doesn't start the user VNC Viewer.
RealVNC Viewer is installed to the standard location of /Applications/VNC Viewer.app/Contents/MacOS/vncviewer.
I've tried this on 2 different Macs, one Intel, one Arm, one installed from the RealVNC website and the other from brew - both install to the same place.
I also added /Applications/VNC Viewer.app/Contents/MacOS to the PATH in the shell in case the packer command wasn't finding it and even thought perhaps the space in the path may have been a problem so symlinked it to avoid the space
ln -s "/Applications/VNC Viewer.app"~/bin/vncviewer
export PATH+=":$HOME/bin/vncviewer"
which -a
/Users/hari/bin/vncviewer/Contents/MacOS/vncviewer
I can connect vncviewer manually, but when running packer a lot it's just very inconvenient - the plugin should be launching the GUI automatically.
packer build --force ubuntu-arm64.qemu.pkr.hcl
ubuntu.qemu.ubuntu: output will be in this color.
==> ubuntu.qemu.ubuntu: Retrieving ISO
==> ubuntu.qemu.ubuntu: Trying https://cdimage.ubuntu.com/releases/22.04/release/ubuntu-22.04.2-live-server-arm64.iso
==> ubuntu.qemu.ubuntu: Trying https://cdimage.ubuntu.com/releases/22.04/release/ubuntu-22.04.2-live-server-arm64.iso?checksum=sha256%3A12eed04214d8492d22686b72610711882ddf6222b4dc029c24515a85c4874e95
==> ubuntu.qemu.ubuntu: https://cdimage.ubuntu.com/releases/22.04/release/ubuntu-22.04.2-live-server-arm64.iso?checksum=sha256%3A12eed04214d8492d22686b72610711882ddf6222b4dc029c24515a85c4874e95 => /Users/hari/.cache/packer/1bb131b162f10e50ac7d8671a71f4a0e13e36197.iso
==> ubuntu.qemu.ubuntu: Copying hard drive...
==> ubuntu.qemu.ubuntu: Resizing hard drive...
==> ubuntu.qemu.ubuntu: Starting HTTP server on port 8980
==> ubuntu.qemu.ubuntu: Found port for communicator (SSH, WinRM, etc): 3824.
==> ubuntu.qemu.ubuntu: Looking for available port between 5900 and 6000 on 127.0.0.1
==> ubuntu.qemu.ubuntu: Starting VM, booting disk image
==> ubuntu.qemu.ubuntu: Overriding default Qemu arguments with qemuargs template option...
==> ubuntu.qemu.ubuntu: Waiting 5s for boot...
==> ubuntu.qemu.ubuntu: Connecting to VM via VNC (127.0.0.1:5904)
==> ubuntu.qemu.ubuntu: Typing the boot commands over VNC...
ubuntu.qemu.ubuntu: Not using a NetBridge -- skipping StepWaitGuestAddress
==> ubuntu.qemu.ubuntu: Using SSH communicator to connect: 127.0.0.1
==> ubuntu.qemu.ubuntu: Waiting for SSH to become available...
The same thing is happening for me. I have to manually look at the logs and then manually connect via vnc to the given local port. Trying to figure out why it's not opening the window automatically
I figured out what is going on... For some reason on mac when you run qemu with the -vnc option it will not show the normal display unless you add -Display cocoa. I verified that this works with packer by adding the following:
Overview of the Issue
Qemu is not launching the user VNC Viewer automatically on my Macs.
The docs on this page for the
headless
setting implies that it should be launching the vncviewer unlessheadless = true
:https://developer.hashicorp.com/packer/plugins/builders/qemu
I've set
headless = false
explicitly in the packer config and it still doesn't start the user VNC Viewer.RealVNC Viewer is installed to the standard location of
/Applications/VNC Viewer.app/Contents/MacOS/vncviewer
.I've tried this on 2 different Macs, one Intel, one Arm, one installed from the RealVNC website and the other from
brew
- both install to the same place.I also added
/Applications/VNC Viewer.app/Contents/MacOS
to thePATH
in the shell in case thepacker
command wasn't finding it and even thought perhaps the space in the path may have been a problem so symlinked it to avoid the spaceI can connect vncviewer manually, but when running packer a lot it's just very inconvenient - the plugin should be launching the GUI automatically.
Reproduction Steps
I've reproduced this on both Intel and Arm Macs - I have a config for each in that repo
Plugin and Packer version
Simplified Packer Buildfile
https://github.com/HariSekhon/Packer-templates
ubuntu-x86_64.qemu.pkr.hcl
and
ubuntu-arm64.qemu.pkr.hcl
Operating system and Environment details
Intel Mac - macOS 11.7 Big Sur
Arm Mac M1 - macOS 13.4 Ventura
Log Fragments and crash.log files
PACKER_LOG=1
for maximum log detail:The text was updated successfully, but these errors were encountered: