SSH握手错误。通过打包器进行Bild VM

时间:2017-04-08 13:39:37

标签: linux ssh virtual-machine

我收到以下调试错误:

2017/04/06 12:20:29 packer: 2017/04/06 12:20:29 starting remote command: esxcli --formatter csv network vm port list -w 16370647
2017/04/06 12:20:29 packer: 2017/04/06 12:20:29 [INFO] Attempting SSH connection...
2017/04/06 12:20:29 packer: 2017/04/06 12:20:29 reconnecting to TCP connection for SSH
2017/04/06 12:20:29 packer: 2017/04/06 12:20:29 handshaking with SSH
2017/04/06 12:20:30 packer: 2017/04/06 12:20:30 handshake error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password keyboard-interactive], no supported methods remain
2017/04/06 12:20:30 packer: 2017/04/06 12:20:30 [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password keyboard-interactive], no supported methods remain
2017/04/06 12:20:30 packer: 2017/04/06 12:20:30 [DEBUG] Detected authentication error. Increasing handshake attempts.
2017/04/06 12:20:37 packer: 2017/04/06 12:20:37 [INFO] Attempting SSH connection...
2017/04/06 12:20:37 packer: 2017/04/06 12:20:37 reconnecting to TCP connection for SSH

JSON文件:

{
    "variables": {
        "type": "vmware-iso",
        "architecture": "386",
        "name": "alpine",
        "monitor": "vga=788",
        "remote_type": "esx5",
        "remote_host": "ххх.ххх.ххх.хx",
        "remote_datastore": "ххх",
        "remote_username": "root",
        "remote_password": "qwerty",
        "guest": "otherlinux-64",
        "disk_size": "7000",
        "iso_checksum_type": "md5",
        "iso_url": "alpine.iso",
        "iso_checksum": "204435de634d07e9fd0ead96f1e84043",
        "http_directory": ".",
        "http_port_min": "8000",
        "http_port_max": "9001",
        "cores": "1",
        "memsize": "512",
        "numvcpus": "1",
        "netname": "LAN-xxx.xxx",
        "virtualDev": "e1000"
    },
    "builders": [{
            "type": "vmware-iso",
            "communicator": "ssh",
            "boot_command": [
                "root<enter><wait>",
                "ifconfig eth0 up && udhcpc -i eth0<enter><wait5>",
                "wget http://{{ .HTTPIP }}:{{ .HTTPPort }}/answers<enter><wait>",
                "setup-alpine -f answers<enter><wait10>",
                "qwerty<enter><wait10>",
                "qwerty<enter><wait10>",
                "<wait10><wait10><wait10>",
                "<wait10><wait10><wait10>",
                "<wait10><wait10><wait10>"
            ],
            "remote_type": "{{user `remote_type`}}",
            "remote_host": "{{user `remote_host`}}",
            "remote_datastore": "{{user `remote_datastore`}}",
            "remote_username": "{{user `remote_username`}}",
            "remote_password": "{{user `remote_password`}}",
            "guest_os_type": "{{user `guest`}}",
            "vm_name": "{{user `name`}}",
            "disk_size": "10000",
            "ssh_username": "root",
            "ssh_password": "qwerty",
            "ssh_port": 22,
            "http_directory": "{{user `http_directory`}}",
            "iso_checksum_type": "{{user `iso_checksum_type`}}",
            "iso_url": "{{user `iso_url`}}",
            "iso_checksum": "{{user `iso_checksum`}}",
            "http_port_min": "{{user `http_port_min`}}",
            "http_port_max": "{{user `http_port_max`}}",
            "ssh_wait_timeout": "10000s",
            "keep_registered": true,
            "shutdown_command": "echo 'shutdown -P now' > shutdown.sh; echo 'vagrant'|sudo -S sh 'shutdown.sh'",

            "vmx_data": {
                "cpuid.coresPerSocket": "{{user `cores`}}",
                "memsize": "{{user `memsize`}}",
                "numvcpus": "{{user `numvcpus`}}",
                "ethernet0.networkName": "LAN-xxx.xx",
                "ethernet0.present": "true",
                "ethernet0.virtualDev": "e1000",
                "ethernet0.startConnected": "true",
                "RemoteDisplay.vnc.webSocket.port": "5900"
            }
        }
    ]
}

0 个答案:

没有答案