Packer vmware-iso build ubuntu server 18.04.3 + vmware workstation pro 15

65 views
Skip to first unread message

Marco Mojica

unread,
Jan 16, 2020, 8:14:58 PM1/16/20
to Packer
Hi All,

I am super lost on what my problem is and I have few hints that might give you an idea where I stand right now.

I have successfully build a packer vmware-iso on Ubuntu 18.04.3 Desktop version, the trick was open the VMWare Workstation gui after the installation was completed.

In the other hand in Ubuntu Server I believe I am having problems with the installation of VMWare Workstation since I am getting issues with the libraries and such, I have try many of the link I have found online and nothing seems to fix it

here is the PACKER_LOG=1 output

==> vmware-iso: Starting HTTP server on port 8870
2020/01/17 01:06:04 packer-builder-vmware-iso plugin: Looking for available port between 5900 and 6000
2020/01/17 01:06:04 packer-builder-vmware-iso plugin: Found available port: 5944 on IP: 127.0.0.1
2020/01/17 01:06:04 packer-builder-vmware-iso plugin: Found available VNC port: 127.0.0.1:5944
2020/01/17 01:06:04 packer-builder-vmware-iso plugin: Writing VMX to: output-vmware-iso/ubuntu-18.04.vmx
==> vmware-iso: Starting virtual machine...
    vmware-iso: view the screen of the VM, connect via VNC with the password "c9UBiBZ0" to
    vmware-iso: vnc://127.0.0.1:5944
    vmware-iso: The VM will be run headless, without a GUI. If you want to
2020/01/17 01:06:04 packer-builder-vmware-iso plugin: Executing: /usr/bin/vmrun -T player start output-vmware-iso/ubuntu-18.04.vmx nogui
    vmware-iso: view the screen of the VM, connect via VNC with the password "c9UBiBZ0" to
    vmware-iso: vnc://127.0.0.1:5944
2020/01/17 01:06:05 packer-builder-vmware-iso plugin: stdout: Error: The operation was canceled
2020/01/17 01:06:05 packer-builder-vmware-iso plugin: stderr:
==> vmware-iso: Error starting VM: VMware error: Error: The operation was canceled
==> vmware-iso: Waiting 4.395785156s to give VMware time to clean up...
2020/01/17 01:06:09 packer-builder-vmware-iso plugin: Executing: /usr/bin/vmrun -T player list
2020/01/17 01:06:09 packer-builder-vmware-iso plugin: stdout: Total running VMs: 0
2020/01/17 01:06:09 packer-builder-vmware-iso plugin: stderr:
2020/01/17 01:06:09 packer-builder-vmware-iso plugin: failed to unlock port lockfile: close tcp 127.0.0.1:5944: use of closed network connection
==> vmware-iso: Deleting output directory...
2020/01/17 01:06:09 [INFO] (telemetry) ending vmware-iso
2020/01/17 01:06:09 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2020/01/17 01:06:09 machine readable: vmware-iso,error []string{"Error starting VM: VMware error: Error: The operation was canceled"}
==> Builds finished but no artifacts were created.
2020/01/17 01:06:09 Cancelling builder after context cancellation context canceled
Build 'vmware-iso' errored: Error starting VM: VMware error: Error: The operation was canceled

2020/01/17 01:06:09 [INFO] (telemetry) Finalizing.
==> Some builds didn't complete successfully and had errors:
--> vmware-iso: Error starting VM: VMware error: Error: The operation was canceled

==> Builds finished but no artifacts were created.
2020/01/17 01:06:10 waiting for all plugin processes to complete...
2020/01/17 01:06:10 /usr/bin/packer: plugin process exited

Also, here are some of the links and steps I have done to try debug the issue.



Also I have manually download the library VMware-vix-disklib-6.7.0-8173251.x86_64.tar.gz and register it in ldconfig using the following steps

I extracted and appended the folder to an existing config /etc/ld.so.conf.d/x86_64-linux-gnu.conf  and run ldconfig && updatedb && restart the system

Please help, I am desperate and I don't know what else to do.

I appreciate any help in advance.

Thanks

Alvaro Miranda Aguilera

unread,
Jan 17, 2020, 12:50:58 PM1/17/20
to packe...@googlegroups.com
Hello
Can you explain a bit more please.

- What is your host os?
- Do you have VMWare Workstation Installed?
- Can you create VM manually ? they boot ok ?

now to packer

- what packer version?
- do you have a template that works?

I am not sure if I understand what is failing or where.

Are you just trying to create a VM?

if VMware is healthy then try this templase as base


thanks
alvaro

NOTICE: This communication may contain information which is confidential to First Performance Corporation (FPC). If you are not the intended recipient of this communication, please delete this email, destroy all copies, and alert the sender. If you are the intended recipient of this communication, you should not copy, disclose or distribute this communication without the authority of FPC. Any views expressed in this communication are those of the individual sender, except where the sender specifically states them to be the views of FPC. Except as required by law, FPC does not represent, warrant or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors, harmful code, interception or interference.

--
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 packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/a0d042ab-cfcd-4ab3-aa63-1b9bb4f38ad2%40googlegroups.com.


--
Alvaro

Message has been deleted
Message has been deleted

Marco Mojica

unread,
Jan 20, 2020, 11:24:50 AM1/20/20
to Packer
Hi Alvaro, 

Thank you very much for your help, here are the details you requested.

- What is your host os?
My Host OS is ubuntu server 18.04.3

- Do you have VMWare Workstation Installed?
I have VMWare Workstation Pro installed

- Can you create VM manually ? they boot ok ?
I can't create machines using the output from packer

/usr/bin/vmrun -T player start output-vmware-iso/ubuntu-18.04.vmx nogui
I also tried 
/usr/bin/vmrun -T ws start output-vmware-iso/ubuntu-18.04.vmx nogui

I think that mainly my problem is the vmware workstation installation process, I can't find and non-gui guide to installed so I have done what I think is correct

for example
sudo ./VMWare-workstation-15-pro.bundle --console --eulas-agreed


now to packer

- what packer version?

1.5.1

- do you have a template that works?

I do, it works on Mac with VMWare Fusion
Seems like the link is causing issues, where I can share my config with you? I am using bitbucket

I am not sure if I understand what is failing or where.

Seems like the portion of the packer build process that is failing is the part that starts the vm with the following command
I took it from packer debug log
/usr/bin/vmrun -T ws start output-vmware-iso/ubuntu-18.04.vmx nogui

Are you just trying to create a VM?
I am trying to create a vmware-iso as my final product, using packer vmware-iso builder
https://www.packer.io/docs/builders/vmware-iso.html


Thanks again for your support, I really appreciate it

Have a great weekend



Marco Mojica

unread,
Jan 20, 2020, 12:42:18 PM1/20/20
to Packer
Hi, For however is having the same problem,

I fix it by following the these steps.

  1. install ./VMware-Workstation-Full-15.5.1-15018445.x86_64.bundle --console --eulas-agreed --custom
  2. register the libraries using ldconfig VMware-vix-disklib-6.7.0-8173251.x86_64.tar.gz
  3. after installation is complete reboot the server
  4. after boot ssh to the server with ssh -XC user...@10.0.0.2
  5. sudo /usr/bin/vmware & and click trial which is my case and complete any pending steps (Very important step)
  6. execute packer

On Thursday, January 16, 2020 at 8:14:58 PM UTC-5, Marco Mojica wrote:
Reply all
Reply to author
Forward
0 new messages