Open jcrben opened 5 years ago
@andrewsomething wonder if you might have a tip since I noticed you added it https://github.com/hashicorp/packer/pull/7060
Hi @jcrben. Unfortunately it looks like this is a DigitalOcean limitation. It is not a restriction on the Packer side. The Packer code in question only looks at the file suffix if the builder returns multiple artifacts.
This error is returned via the DigitalOcean API. For example, using curl directly to import a .ova file:
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $DO_TOKEN" -d '{"name": "Ubuntu_for_Horizon71_1_1.0.ova", "url": "https://download3.vmware.com/software/vmw-tools/horizon_ubuntu/Ubuntu_for_Horizon71_1_1.0.ova", "distribution": "Ubuntu", "region": "nyc3", "description": "VMware Horizon 7.1 environment"}' "https://api.digitalocean.com/v2/images" | jq .
{
"image": {
"created_at": "2019-07-06T23:48:11Z",
"description": "VMware Horizon 7.1 environment",
"distribution": "Ubuntu",
"error_message": "",
"id": 49292794,
"name": "Ubuntu_for_Horizon71_1_1.0.ova",
"regions": [],
"status": "NEW",
"tags": [],
"type": "custom",
"updated_at": "2019-07-06T23:48:11Z"
}
}
# After waiting sometime for the image to be processed on DO's end...
$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $DO_TOKEN" "https://api.digitalocean.com/v2/images/49292794" | jq .
{
"image": {
"id": 49292794,
"name": "Ubuntu_for_Horizon71_1_1.0.ova",
"distribution": "Ubuntu",
"slug": null,
"public": false,
"regions": [],
"created_at": "2019-07-06T23:48:11Z",
"min_disk_size": null,
"type": "custom",
"size_gigabytes": null,
"description": "VMware Horizon 7.1 environment",
"tags": [],
"status": "deleted",
"error_message": "We don't support the compression format of your image. Please try again with a supported format (gzip, bzip2) or an uncompressed image file."
}
}
I'll pass this along internally at DO as it sounds like support didn't completely understand the issue at hand.
Looks like you work at DO so you could get them to accept .ova on their side, but if not it seems like we could adjust the post-processor to unpack the ova and send up the vmdk inside?
You could already do this with the shell-local pp and the artifice pp, probably.
@andrewsomething hear anything about this?
packer version
: 1.4.3When I tried this post-processor, I got the following message:
The .ova includes vmdk https://blog.digitalocean.com/custom-images/ so it seems like it should be able to pull that out?
I opened a ticket with DigitalOcean and they said this:
Note that I did not install cloudinit on this machine (yet) as I was just messing around.