I'm using Packer with VMWare Workstation 15.5 to build VM templates for our
VMware environment.
Problem: The same process that works to build on a Windows 10 system fails
with `VMware error: Error: The operation was cnceled` when performed on a
Red Hat Linux 7 system.
Working environment:
- Windows 10
- Packer 1.4.4
- VMWare Workstation 15.5.0 build-14665864
Failing environment:
- Red Hat Enterprise Linux 7
- Packer 1.4.4
- VMWare Workstation 15.5.0 build-14665864
The only difference is the OS build environment - packer and VMworkstation
are the same release versions.
When I execute it from the Windows environment, the execution starts
normally:
==> vmware-iso: Building and writing VMX file
==> vmware-iso: Starting HTTP server on port 8802
==> vmware-iso: Starting virtual machine...
vmware-iso: The VM will be run headless, without a GUI. If you want to
vmware-iso: view the screen of the VM, connect via VNC with the
password "hUOf31vh" to
vmware-iso: vnc://127.0.0.1:5964
==> vmware-iso: Waiting 8s for boot...
==> vmware-iso: Connecting to VM via VNC (127.0.0.1:5964)
==> vmware-iso: Typing the boot command over VNC...
==> vmware-iso: Using ssh communicator to connect: 192.168.141.134
==> vmware-iso: Waiting for SSH to become available...
[...the build proceeds normally...]
When I execute it from the Red Hat environment it fails when it executes
the VMware `/usr/bin/vmrun` command:
(with `PACKER_LOG=1` set)
==> vmware-iso: Creating required virtual machine disks
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 [INFO] Creating disk with
Path: RHEL-8-novra-20191021_1433/disk.vmdk and Size: 61440M
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Executing:
/usr/bin/vmware-vdiskmanager -c -s 61440M -a lsilogic -t 0
RHEL-8-novra-20191021_1433/disk.vmdk
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 stdout: Creating disk
'RHEL-8-novra-20191021_1433/disk.vmdk'
2019/10/21 14:34:14 packer: Virtual disk creation successful.
==> vmware-iso: Building and writing VMX file
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 stderr:
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Located networkmapper
configuration file using Player: /etc/vmware/netmap.conf
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Writing VMX to:
RHEL-8-novra-20191021_1433/RHEL-8-novra-20191021_1433.vmx
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Configuring VMX...
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Setting VMX:
'cpuid.coresPerSocket' = '1'
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Setting VMX: 'memsize' =
'8192'
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Setting VMX: 'numvcpus' =
'2'
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Setting VMX:
'ethernet0.virtualDev' = 'vmxnet3'
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Setting VMX:
'virtualHW.version' = '8'
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Setting VMX:
'ethernet0.connectionType' = 'nat'
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Setting VMX:
'applianceView.coverPage.author' = '[email protected]'
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Setting VMX:
'applianceView.coverPage.version' = '20191021_1433'
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Floppy path present,
setting in VMX
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Writing VMX to:
RHEL-8-novra-20191021_1433/RHEL-8-novra-20191021_1433.vmx
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Suppressing messages in VMX
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Found available port: 8214
on IP: 0.0.0.0
==> vmware-iso: Starting HTTP server on port 8214
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Looking for available port
between 5900 and 6000
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Found available port: 5980
on IP: 127.0.0.1
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Found available VNC port:
127.0.0.1:5980
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Writing VMX to:
RHEL-8-novra-20191021_1433/RHEL-8-novra-20191021_1433.vmx
==> vmware-iso: Starting virtual machine...
vmware-iso: view the screen of the VM, connect via VNC with the
password "qlKPz2Bm" to
vmware-iso: vnc://127.0.0.1:5980
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 Executing: /usr/bin/vmrun
-T player start RHEL-8-novra-20191021_1433/RHEL-8-novra-20191021_1433.vmx
nogui
vmware-iso: The VM will be run headless, without a GUI. If you want to
vmware-iso: view the screen of the VM, connect via VNC with the
password "qlKPz2Bm" to
vmware-iso: vnc://127.0.0.1:5980
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 stdout: Error: The
operation was canceled
2019/10/21 14:34:14 packer: 2019/10/21 14:34:14 stderr:
==> vmware-iso: Error starting VM: VMware error: Error: The operation was
canceled
==> vmware-iso: Error starting VM: VMware error: Error: The operation was
canceled
==> vmware-iso: Step "StepRun" failed
==> vmware-iso: [c] Clean up and exit, [a] abort without cleanup, or [r]
retry step (build may fail even if retry succeeds)?
When I try to manually run the "/usr/bin/vmrun -T player start
RHEL-8-novra-20191021_1433/RHEL-8-novra-20191021_1433.vmx nogui" it exits
with the same "VMware error: Error: The operation was canceled", nothing
more:
[u@h Oct-21 14:35:53 W ]$ /usr/bin/vmrun -T player start
RHEL-8-novra-20191021_1433/RHEL-8-novra-20191021_1433.vmx nogui ; echo Exit
code: $?
Error: The operation was canceled
Exit code: 255
[u@h Oct-21 14:35:59 W ]$
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/46b1eac8-1cc9-4a32-a351-05b03dc6edad%40googlegroups.com.