Packer hangs when trying to stop temporary Azure VM
2014/10/08 13:37:05 packer-builder-azure: 2014/10/08 13:37:05 operation: &{{http://schemas.microsoft.com/windowsazure Operation} http://schemas.microsoft.com/windowsazure b746cfa2-ab2e-1054-b884-92d02697f63e Succeeded 200 { }}
2014/10/08 13:37:05 ui: ==> azure: Creating Temporary Azure VM...
2014/10/08 13:37:08 packer-builder-azure: 2014/10/08 13:37:08 Exec responce: &{202 Accepted 202 HTTP/1.1 1 1 map[X-Ms-Request-Id:[90b8e9be99bb10d2a3b7ee8dbe3f5450] Date:[Wed, 08 Oct 2014 17:37:07 GMT] Cache-Control:[no-cache] Content-Length:[0] Server:[1.0.6198.130 (rd_rdfe_stable.140925-2236) Microsoft-HTTPAPI/2.0] X-Ms-Servedbyregion:[ussouth2]] 0xc2084fefc0 0 [] false map[] 0xc2082f48f0 0xc2083594a0}
2014/10/08 13:37:08 packer-builder-azure: 2014/10/08 13:37:08 Exec responce: &{200 OK 200 HTTP/1.1 1 1 map[X-Ms-Request-Id:[7fbfebc8c0971a5f81765aebc1e02c83] Date:[Wed, 08 Oct 2014 17:37:07 GMT] Cache-Control:[no-cache] Content-Length:[197] Content-Type:[application/xml; charset=utf-8] Server:[1.0.6198.130 (rd_rdfe_stable.140925-2236) Microsoft-HTTPAPI/2.0] X-Ms-Servedbyregion:[ussouth2]] 0xc2084ff0c0 197 [] false map[] 0xc2082f49c0 0xc2083594a0}
2014/10/08 13:37:08 packer-builder-azure: 2014/10/08 13:37:08 operation: &{{http://schemas.microsoft.com/windowsazure Operation} http://schemas.microsoft.com/windowsazure 90b8e9be-99bb-10d2-a3b7-ee8dbe3f5450 InProgress { }}
2014/10/08 13:37:08 packer-builder-azure: 2014/10/08 13:37:08 Waiting for another 15 seconds...
2014/10/08 13:37:23 packer-builder-azure: 2014/10/08 13:37:23 Exec responce: &{200 OK 200 HTTP/1.1 1 1 map[Content-Length:[232] Content-Type:[application/xml; charset=utf-8] Server:[1.0.6198.130 (rd_rdfe_stable.140925-2236) Microsoft-HTTPAPI/2.0] X-Ms-Servedbyregion:[ussouth2] X-Ms-Request-Id:[2726d88f99021f29ae1655476183fe47] Date:[Wed, 08 Oct 2014 17:37:23 GMT] Cache-Control:[no-cache]] 0xc2084ff500 232 [] false map[] 0xc2082f4a90 0xc2083594a0}
2014/10/08 13:37:23 packer-builder-azure: 2014/10/08 13:37:23 operation: &{{http://schemas.microsoft.com/windowsazure Operation} http://schemas.microsoft.com/windowsazure 90b8e9be-99bb-10d2-a3b7-ee8dbe3f5450 Succeeded 200 { }}
2014/10/08 13:37:23 ui: ==> azure: Polling Temporary Azure VM is ready...
2014/10/08 13:37:23 packer-builder-azure: 2014/10/08 13:37:23 Sleeping for 2 min to make the VM to start
2014/10/08 13:39:25 packer-builder-azure: 2014/10/08 13:39:25 Exec responce: &{200 OK 200 HTTP/1.1 1 1 map[Content-Type:[application/xml; charset=utf-8] Server:[1.0.6198.130 (rd_rdfe_stable.140925-2236) Microsoft-HTTPAPI/2.0] X-Ms-Servedbyregion:[ussouth2] X-Ms-Request-Id:[e0e4023eaf6018e89c48b09e6babb5f8] Date:[Wed, 08 Oct 2014 17:39:25 GMT] Cache-Control:[no-cache] Content-Length:[3254]] 0xc2084ffb80 3254 [] false map[] 0xc2082f4b60 0xc2083594a0}
2014/10/08 13:39:25 packer-builder-azure: 2014/10/08 13:39:25 deployment:
2014/10/08 13:39:25 packer-builder-azure: &{{http://schemas.microsoft.com/windowsazure Deployment} http://schemas.microsoft.com/windowsazure PkrVMfz8d7qr1bl Production d285bdb6afba4febae7939b0482504cd Running UGtyVk1mejhkN3FyMWJs http://pkrsrvfz8d7qr1bl.cloudapp.net/ PFNlcnZpY2VDb25maWd1cmF0aW9uIHhtbG5zOnhzZD0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zPSJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL1NlcnZpY2VIb3N0aW5nLzIwMDgvMTAvU2VydmljZUNvbmZpZ3VyYXRpb24iPg0KICA8Um9sZSBuYW1lPSJQa3JWTWZ6OGQ3cXIxYmwiPg0KICAgIDxJbnN0YW5jZXMgY291bnQ9IjEiIC8+DQogIDwvUm9sZT4NCjwvU2VydmljZUNvbmZpZ3VyYXRpb24+ [{PkrVMfz8d7qr1bl PkrVMfz8d7qr1bl ProvisioningFailed 0 0 Medium Provisioning image FAILED Failed to deploy key pair (0x0A). 100.78.60.42 [{SSH 191.238.242.17 65448 22 tcp}] Started PkrVMfz8d7qr1bl 9a0764828923b6820c61e04e57176c1c { { }} []}] 1 [{PkrVMfz8d7qr1bl PersistentVMRole [{NetworkConfiguration [{22 SSH 65448 tcp 191.238.242.17}]}] [] {ReadWrite PkrVMfz8d7qr1bl-PkrVMfz8d7qr1bl-0-201410081737090203 https://schladen.blob.core.windows.net/images/PkrVMfz8d7qr1bl.vhd 5112500ae3b842c8b9c604889f8753c3__OpenLogic-CentOS-65-20140926 Linux} Medium}] false false 2014-10-08T17:37:07Z 2014-10-08T17:39:25Z [{ }] {2014-09-29T11:15:43Z 2014-10-01T11:15:43Z PersistentVMUpdateScheduled} [{ true PkrVMfz8d7qr1blContractContract}] {{ } []}}
2014/10/08 13:39:25 ui: azure: VM Endpoint: 191.238.242.17:65448
2014/10/08 13:39:25 ui: azure: VM DiskName: PkrVMfz8d7qr1bl-PkrVMfz8d7qr1bl-0-201410081737090203
2014/10/08 13:39:25 ui: azure: VM MediaLink: https://schladen.blob.core.windows.net/images/PkrVMfz8d7qr1bl.vhd
2014/10/08 13:39:25 packer-builder-azure: 2014/10/08 13:39:25 Waiting for SSH, up to timeout: 20m0s
2014/10/08 13:39:25 ui: ==> azure: Waiting for SSH to become available...
2014/10/08 13:39:29 packer-builder-azure: 2014/10/08 13:39:29 Attempting SSH connection...
2014/10/08 13:39:29 packer-builder-azure: 2014/10/08 13:39:29 reconnecting to TCP connection for SSH
2014/10/08 13:39:29 packer-builder-azure: 2014/10/08 13:39:29 handshaking with SSH
2014/10/08 13:39:30 ui: ==> azure: Connected to SSH!
2014/10/08 13:39:30 packer-builder-azure: 2014/10/08 13:39:30 Running the provision hook
2014/10/08 13:39:30 ui: ==> azure: Uploading XXXXXX
2014/10/08 13:39:30 packer-builder-azure: 2014/10/08 13:39:30 opening new ssh session
2014/10/08 13:39:30 packer-builder-azure: 2014/10/08 13:39:30 Starting remote scp process: scp -vt /tmp
2014/10/08 13:39:30 packer-builder-azure: 2014/10/08 13:39:30 Started SCP session, beginning transfers...
2014/10/08 13:39:30 packer-builder-azure: 2014/10/08 13:39:30 Copying input data into temporary file so we can read the length
2014/10/08 13:39:31 packer-provisioner-file: 2014/10/08 13:39:31 [INFO] 38343344 bytes written for 'uploadData'
2014/10/08 13:39:31 [INFO] 38343344 bytes written for 'uploadData'
2014/10/08 13:39:31 packer-command-build: 2014/10/08 13:39:31 [INFO] 38343344 bytes written for 'uploadData'
2014/10/08 13:39:31 [INFO] 38343344 bytes written for 'uploadData'
2014/10/08 13:39:32 packer-builder-azure: 2014/10/08 13:39:32 [DEBUG] Uploading kms-server-1.7.0-SNAPSHOT.jar: perms=C0644 size=38343344
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 SCP session complete, closing stdin pipe.
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 Waiting for SSH session to complete.
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 scp stderr (length 51): Sink: C0644 38343344 kms-server-1.7.0-SNAPSHOT.jar
2014/10/08 13:41:34 ui: ==> azure: Uploading XXXXXXXX
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 opening new ssh session
2014/10/08 13:41:34 packer-provisioner-file: 2014/10/08 13:41:34 [INFO] 250 bytes written for 'uploadData'
2014/10/08 13:41:34 [INFO] 250 bytes written for 'uploadData'
2014/10/08 13:41:34 packer-command-build: 2014/10/08 13:41:34 [INFO] 250 bytes written for 'uploadData'
2014/10/08 13:41:34 [INFO] 250 bytes written for 'uploadData'
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 Starting remote scp process: scp -vt /tmp
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 Started SCP session, beginning transfers...
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 Copying input data into temporary file so we can read the length
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 [DEBUG] Uploading jetty.properties: perms=C0644 size=250
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 SCP session complete, closing stdin pipe.
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 Waiting for SSH session to complete.
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 scp stderr (length 33): Sink: C0644 250 jetty.properties
2014/10/08 13:41:34 ui: ==> azure: Uploading XXXXXXXX
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 opening new ssh session
2014/10/08 13:41:34 [INFO] 2254 bytes written for 'uploadData'
2014/10/08 13:41:34 packer-provisioner-file: 2014/10/08 13:41:34 [INFO] 2254 bytes written for 'uploadData'
2014/10/08 13:41:34 packer-command-build: 2014/10/08 13:41:34 [INFO] 2254 bytes written for 'uploadData'
2014/10/08 13:41:34 [INFO] 2254 bytes written for 'uploadData'
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 Starting remote scp process: scp -vt /tmp
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 Started SCP session, beginning transfers...
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 Copying input data into temporary file so we can read the length
2014/10/08 13:41:34 packer-builder-azure: 2014/10/08 13:41:34 [DEBUG] Uploading jetty_keystore.jks: perms=C0644 size=2254
2014/10/08 13:41:35 packer-builder-azure: 2014/10/08 13:41:35 SCP session complete, closing stdin pipe.
2014/10/08 13:41:35 packer-builder-azure: 2014/10/08 13:41:35 Waiting for SSH session to complete.
2014/10/08 13:41:35 packer-builder-azure: 2014/10/08 13:41:35 scp stderr (length 36): Sink: C0644 2254 jetty_keystore.jks
2014/10/08 13:41:35 ui: ==> azure: XXXXXXXX
2014/10/08 13:41:35 packer-provisioner-file: 2014/10/08 13:41:35 [INFO] 1552 bytes written for 'uploadData'
2014/10/08 13:41:35 [INFO] 1552 bytes written for 'uploadData'
2014/10/08 13:41:35 packer-command-build: 2014/10/08 13:41:35 [INFO] 1552 bytes written for 'uploadData'
2014/10/08 13:41:35 [INFO] 1552 bytes written for 'uploadData'
2014/10/08 13:41:35 packer-builder-azure: 2014/10/08 13:41:35 opening new ssh session
2014/10/08 13:41:35 packer-builder-azure: 2014/10/08 13:41:35 Starting remote scp process: scp -vt /tmp
2014/10/08 13:41:35 packer-builder-azure: 2014/10/08 13:41:35 Started SCP session, beginning transfers...
2014/10/08 13:41:35 packer-builder-azure: 2014/10/08 13:41:35 Copying input data into temporary file so we can read the length
2014/10/08 13:41:35 packer-builder-azure: 2014/10/08 13:41:35 [DEBUG] Uploading kms.service: perms=C0644 size=1552
2014/10/08 13:41:35 packer-builder-azure: 2014/10/08 13:41:35 SCP session complete, closing stdin pipe.
2014/10/08 13:41:35 packer-builder-azure: 2014/10/08 13:41:35 Waiting for SSH session to complete.
2014/10/08 13:41:35 packer-builder-azure: 2014/10/08 13:41:35 scp stderr (length 29): Sink: C0644 1552 kms.service
2014/10/08 13:41:35 ui: ==> azure: Executing OS generalization...
2014/10/08 13:41:35 packer-builder-azure: 2014/10/08 13:41:35 opening new ssh session
2014/10/08 13:41:35 packer-builder-azure: 2014/10/08 13:41:35 starting remote command: sudo /usr/sbin/waagent -force -deprovision && export HISTSIZE=0
2014/10/08 13:41:36 packer-builder-azure: 2014/10/08 13:41:36 remote command exited with '0': sudo /usr/sbin/waagent -force -deprovision && export HISTSIZE=0
2014/10/08 13:41:36 packer-builder-azure: 2014/10/08 13:41:36 OS generalization stdout: WARNING! The waagent service will be stopped.
2014/10/08 13:41:36 packer-builder-azure: WARNING! All SSH host key pairs will be deleted.
2014/10/08 13:41:36 packer-builder-azure: WARNING! Cached DHCP leases will be deleted.
2014/10/08 13:41:36 packer-builder-azure: WARNING! Nameserver configuration in /etc/resolv.conf will be deleted.
2014/10/08 13:41:36 packer-builder-azure: WARNING! root password will be disabled. You will not be able to login as root.
2014/10/08 13:41:36 packer-builder-azure: 2014/10/08 13:41:36 OS generalization stderr:
2014/10/08 13:41:36 ui: ==> azure: Stopping Temporary Azure VM...
^C
[mary@localhost deployment]$ date
Wed Oct 8 14:01:31 EDT 2014
Sample Input:
{
"variables": {
"sn": "XXX",
"psPath": "XXX",
"storage": "XX",
"location": "South Central US",
"size": "Medium",
"label": "XXX",
"home": "XXX"
},
"builders": [
{
"type": "azure",
"publish_settings_path": "{{user psPath
}}",
"subscription_name": "{{user sn
}}",
"storage_account": "{{user storage
}}",
"storage_account_container": "images",
"os_type": "Linux",
"os_image_label": "OpenLogic 6.5",
"location": "{{user location
}}",
"instance_size": "{{user size
}}",
"user_image_label": "{{user label
}}"
}
],
"provisioners": [
{
"type": "file",
"source": "{{user home
}}/XXX.jar",
"destination": "/tmp/XXX.jar"
},
{
"type": "file",
"source": "{{user home
}}/jetty.properties",
"destination": "/tmp/jetty.properties"
},
{
"type": "file",
"source": "{{user home
}}/jetty_keystore.jks",
"destination": "/tmp/jetty_keystore.jks"
},
{
"type": "file",
"source": "{{user home
}}/tools/deployment/pack/kms.service",
"destination": "/tmp/kms.service"
}
]
}