Skip to content
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

VMware builder lstat 'no such file or directory' #3087

Closed
0x4c6565 opened this issue Jan 19, 2016 · 7 comments
Closed

VMware builder lstat 'no such file or directory' #3087

0x4c6565 opened this issue Jan 19, 2016 · 7 comments

Comments

@0x4c6565
Copy link
Contributor

During step 'StepPrepareTools' following the shutting down of the provisioned VM, the following error halts the provisioning:

2016/01/19 12:37:22 ui: ask: ==> vmware-iso: Pausing before cleanup of step 'StepPrepareTools'. Press enter to continue.
==> vmware-iso: Pausing before cleanup of step 'StepPrepareTools'. Press enter to continue.
2016/01/19 12:37:23 ui: scan err: unexpected newline
Build 'vmware-iso' errored: lstat output_windows2008r2: no such file or directory

2016/01/19 12:37:23 ui error: Build 'vmware-iso' errored: lstat output_windows2008r2: no such file or directory
2016/01/19 12:37:23 Waiting on builds to complete...
2016/01/19 12:37:23 Builds completed. Waiting on interrupt barrier...
2016/01/19 12:37:23 machine readable: error-count []string{"1"}
2016/01/19 12:37:23 ui error:
==> Some builds didn't complete successfully and had errors:
2016/01/19 12:37:23 machine readable: vmware-iso,error []string{"lstat output_windows2008r2: no such file or directory"}
2016/01/19 12:37:23 ui error: --> vmware-iso: lstat output_windows2008r2: no such file or directory

I'm unsure how to trace this further, any help would be appreciated!

Lee

@dave2
Copy link
Contributor

dave2 commented Jan 21, 2016

Can you post your packer template, and what version of packer is this against?

@0x4c6565
Copy link
Contributor Author

Hi,

This is against the latest version of packer (manually built). Template is below for the builder:

{

"variables": {
    "username": "Administrator",
    "password": "password",
    "disk_size": "30720",

    "temp_path":"C:\\Windows\\Temp"
},
"builders": [
    {
        "type": "vmware-iso",
        "communicator": "winrm",
        "iso_url": "file:///root/win2008r2.iso",
        "iso_checksum": "9b0cd5b11cc2e92badb74450f0cac03006d3c63a2ada36cb1eb95c1bf4b2608f",
        "iso_checksum_type": "sha256",
        "output_directory": "output_windows2008r2",
        "shutdown_command": "cmd.exe /c shutdown -s -f",
        "disk_size": "{{ user `disk_size`}}",

        "headless": true,
        "guest_os_type": "windows7srv-64",
        "remote_type": "esx5",
        "remote_username": "root",
        "remote_password": "password",
        "remote_host": "172.25.103.156",
        "remote_port": 2020,
        "vnc_port_min": 8443,
        "vnc_port_max": 8444,
        "tools_upload_flavor": "windows",
        "vmx_data": {
            "memsize": "4096",
            "numvcpus": "8",
            "cpuid.coresPerSocket": "4",
            "scsi0.virtualdev": "pvscsi",
            "sched.scsi0:0.shared": "normal",
            "sched.scsi0:0.throughputCap": "off",
            "ethernet0.networkName": "Packer"
        },


        "winrm_username": "{{ user `username`}}",
        "winrm_password": "{{ user `password`}}",
        "winrm_timeout": "10h",
        "winrm_insecure": true,
        "winrm_use_ssl": true,
        "winrm_port": 5986,

        "vm_name": "windows2008r2-{{isotime \"2006-01-02\"}}",
        "boot_wait": "5s",
        "floppy_files": [
            "unattend/ecloud/esx_51/2008r2/Autounattend.xml",
            "drivers/ecloud/esx_51/2008/*"
        ]
    }
]

........................

Cheers,
Lee

@jim3ma
Copy link

jim3ma commented Mar 7, 2016

try to create a dir named "output_windows2008r2" in you working dir, or add format parameter into builder. It maybe be solved in PR #3050

@matt-deboer
Copy link
Contributor

Adding "format": "ovf" into the template got me past this problem on packer 0.10.1.
This was based on the code changes in PR #3050, as mentioned by @jim3mar.

@nickcharlton
Copy link

I've been seeing this error myself and I can confirm that I'm not seeing it on master where #3050 has been merged in. I'd recommend compiling yourself against master whilst we wait for a release.

@0x4c6565
Copy link
Contributor Author

Cheers guys, will give it another go and let you know!

@mwhooker
Copy link
Contributor

looks like this was fixed in #3050

@ghost ghost locked and limited conversation to collaborators Apr 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants