LINUX.ORG.RU

Ошибка “SSH handshake error” при билде виртуальной машины в vsphere с помощью packer

 , ,


0

1

Фрагмент логов, где происходит ошибка:

2017/04/06 12:20:29 packer: 2017/04/06 12:20:29 [INFO] Waiting for SSH, up to timeout: 2h46m40s
2017/04/06 12:20:29 ui: [1;32m==> vmware-iso: Waiting for SSH to become available...[0m
2017/04/06 12:20:29 packer: 2017/04/06 12:20:29 opening new ssh session
2017/04/06 12:20:29 packer: 2017/04/06 12:20:29 starting remote command: esxcli --formatter csv network vm list
2017/04/06 12:20:29 packer: 2017/04/06 12:20:29 opening new ssh session
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
2017/04/06 12:20:37 packer: 2017/04/06 12:20:37 handshaking with SSH
2017/04/06 12:20:37 packer: 2017/04/06 12:20:37 handshake error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password keyboard-interactive], no supported methods remain
2017/04/06 12:20:37 packer: 2017/04/06 12:20:37 [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password keyboard-interactive], no supported methods remain

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": "204895de634d07e9fd0ead30f1e84010",
        "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": "3900"
      }
    }
    ]
   }
  ],
}]
}

я бы обратил внимание на

ssh: unable to authenticate, attempted methods [none password keyboard-interactive]
где в конфиге сказано, каким методом аутентификация (по паролю, по ключу и т п)?

Infra_HDC ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.