Possible to run vmware-iso without VNC?

427 views
Skip to first unread message

Keith Baker

unread,
Oct 6, 2016, 3:37:50 AM10/6/16
to Packer
Hi,

I'm running packer on VMWare player, and rather than hack the binary with a hex editor, as I'm not running any boot commands and just running an autounattend.xml (windows box) and then planning to connect with winRM afterwards, is there a way to disable the VNC connection?

My issue is that the machine starts to build and I can watch it building but the VNC connection fails. As I don't need the VNC connection for this build, I'd rather just turn it off than hack the binary.

Thanks

Keith

Alvaro Miranda Aguilera

unread,
Oct 6, 2016, 5:21:53 AM10/6/16
to packe...@googlegroups.com
Hello

My understanding is the VNC is used as console to send the commands for the boot.

Can you share your packer template?

Do you have boot arguments at all ?

If your version of player is higher on whats in packer, then the issue is on the version check rather than VNC part.

Alvaro.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/fbe27c17-2e2c-4daf-90a9-79932641465e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Keith Baker

unread,
Oct 6, 2016, 6:14:04 AM10/6/16
to packe...@googlegroups.com
There aren't any boot arguments

Packer template is:

{
 "variables": {
      "mydatastore": "xxxxx"
    },
 "builders": [
    {
      "iso_checksum_type": "sha1",
      "iso_checksum": "849734f37346385dac2c101e4aacba4626bb141c",
      "communicator": "winrm",
      "winrm_username": "testing",
      "winrm_password": "mytest",
      "boot_wait" : "6h",
      "name": "kb-win-tst-{{isotime \"2006-01-02\"}}",
      "floppy_files": [
        "answer/Autounattend.xml",
        "answer/PackerShutdown.bat",
        ],
           "vmx_data": {
            "ethernet0.networkName": "VM Network",
            "ethernet0.present": "TRUE",
            "ethernet0.virtualDev": "vmxnet3",
            "cpuid.coresPerSocket": "1",
            "memsize": "1024",
            "numvcpus": "1",
            "scsi0:0.fileName": "disk.vmdk",
            "scsi0:0.present": "TRUE",
            "scsi0:0.redo": "",
            "disk_size" : "50000"
          },
      "type": "vmware-iso",
      "winrm_timeout": "94h",
      "shutdown_command": "a:/PackerShutdown.bat",
      "shutdown_timeout": "72h"
      }
    ],

 "provisioners": [

    ],
 "post-processors": [
    {
      "type": "vsphere",
      "host": "xxxxx",
      "username": "xxxxx",
      "password": "xxxxx",
      "datacenter": "xxxx",
      "cluster": "xxxx",
      "resource_pool": " ",
      "datastore": "{{user `mydatastore`}}",
      "vm_folder": "",
      "vm_name": "xxxxxx", 
      "vm_network": "VM Network",
      "insecure" : "true"
      }
    ]
}

I've configured the boot wait to 6h there so i could see if it builds, (as it happens I have another issue where win2012r2 doesn't like the SCSI controller vmware player uses but that's another story) but if I remove that line the output gives me:

==> kb-win-tst-2016-10-06: Deleting output directory...
Build 'kb-win-tst-2016-10-06' errored: Error connecting to VNC: dial tcp 127.0.0.1:5940: connectex: No connection could be made because the target machine actively refused it.

==> Some builds didn't complete successfully and had errors:
--> kb-win-tst-2016-10-06: Error connecting to VNC: dial tcp 127.0.0.1:5940: connectex: No connection could be made because the target machine actively refused it.

==> Builds finished but no artifacts were created.




You received this message because you are subscribed to a topic in the Google Groups "Packer" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/packer-tool/l8knPkBJ5CM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAHqq0ezY8AmECXaO8FtS8Yorkwb39KUCGSs-03hS9U87dbE5Mg%40mail.gmail.com.

Rickard von Essen

unread,
Oct 6, 2016, 1:14:47 PM10/6/16
to packe...@googlegroups.com

I glanced over the code and it looks like it will try to connect even if you don't have any boot command. It would be fairly easy to fix this. PR's is welcome.


Keith Baker

unread,
Oct 7, 2016, 3:13:46 AM10/7/16
to packe...@googlegroups.com
PR's? Sorry I'm not familiar with that acronym, do you mean a feature request? I'd be happy to do that. I think having the option to turn it off if not running boot commands would be very useful, especially for people working in restrictive environments.

Keith Baker

unread,
Oct 7, 2016, 3:19:50 AM10/7/16
to packe...@googlegroups.com
Oh, do you mean a pull request? Sorry, didn't twig. I can have a look at the code. I've not written in go before, I'm generally a python guy, but I can take a look.

Rickard von Essen

unread,
Oct 7, 2016, 5:19:00 AM10/7/16
to packe...@googlegroups.com
Yes, a Pull Request. It should be fairly simple even with no previous Go knowledge if you know a bit of programming. 

Reply all
Reply to author
Forward
0 new messages