I have the following template for packer to build an openstack image based 
on a Windows 2016 Core existing image

{
>     "variables": {
>       "windows_admin_user": "Administrator",
>       "windows_admin_password": "******",
>       "source_image": "<source_image_name>",
>       "flavor_name": "<flavor_id>",
>       "network": "<network-id>"
>     },
>     "builders": [ {
>       "type": "openstack",
>       "image_name": "win2016-docker-host",
>       "instance_name": "windows-server-2016-docker.temp",
>       "insecure": true,
>       "availability_zone": "zone1",
>       "source_image": "{{user `source_image`}}",
>       "communicator": "winrm",
>       "flavor": "{{user `flavor_name`}}",
>       "networks": "{{user `network`}}",
>       "winrm_username": "{{user `windows_admin_user`}}",
>       "winrm_password": "{{user `windows_admin_password`}}",
>       "winrm_port": 5986,
>       "winrm_timeout": "1h",
>       "winrm_use_ssl": true,
>       "winrm_insecure": true,
>       "user_data_file": "bootstrap.ps1",
>       "image_disk_format": "qcow2",
>       "use_blockstorage_volume": true,
>       "volume_type": "datera",
>       "volume_size": "80",
>       "endpoint_type":"public",
>       "image_visibility": "public",
>       "security_groups": ["allow-all"],
>       "metadata": { "windows_release": "windows2016core",
>                     "packer_version": "{{ packer_version }}"
>                   }
>       }
>     ],
>     "provisioners": [
>     {
>         "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
>         "scripts": [
>           "scripts/win/enable-rdp.bat"
>         ],
>         "type": "windows-shell"
>       }
>     ]
> }
>
>
The image is created successfully and I was able to see the details of the 
openstack image

+------------------+------------------------------------------------------+
| Field            | Value                                                |
+------------------+------------------------------------------------------+
| checksum         | 374787655efc2bedb1070823e1e77534                     |
| container_format | bare                                                 |
| created_at       | 2019-06-05T15:52:37Z                                 |
| disk_format      | qcow2                                                |
| file             | /v2/images/38e9939f-dbe5-4c30-80e6-c4e19ebb7f4e/file |
| id               | 38e9939f-dbe5-4c30-80e6-c4e19ebb7f4e                 |
| min_disk         | 0                                                    |
| min_ram          | 0                                                    |
| name             | win2016-docker-host                                  |
| owner            | 135cd3e82df64f8d91c00f572137794b                     |
| properties       | os_type='windows'                                    |
| protected        | False                                                |
| schema           | /v2/schemas/image                                    |
| size             | 8120369152                                           |
| status           | active                                               |
| updated_at       | 2019-06-05T15:59:49Z                                 |
| virtual_size     | None                                                 |
| visibility       | public                                               |
+------------------+------------------------------------------------------+


 However,

When I create an instance based on the image I get the Windows *Getting 
Devices Ready* and it takes forever so far 2 hours.

Any advice will be appreciated.

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/0879d20b-98cf-4ffe-86a7-085ab48bca1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to