Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I was able to create a good image with no startup errors the following way:

  1. Create the image locally, and load the virtIO drivers. Preferably log into Windows Audit mode while installing any additional drivers, updates, software or customizing settings
  2. DO NOT install cloudbase-init or sysprep the image
  3. Upload the image to OpenStack with glance (let's call it the SEED image)
  4. Create an instance based on the image. If you get any Windows errors during initial launch, try to resolve them (Like by running msoobe in my workaround answer) and boot into Windows. Your goal here is to get Windows to boot up and running on OpenStack emulated hardware. During this phase Windows will adjust itself to perfectly fit the OpenStack emulated hardware - something that would have been difficult to do in a local VM.
  5. Finish updating/customizing your instance in OpenStack if you forgot or simply didn't want to do these updates on your local instance.
  6. Still DO NOT install cloudbase-init or sysprep the image
  7. Shut down the instance and TAKE A SNAPSHOT (let's call it the PREP snapshot)! Remember: a snapshot IS an image! You will later be able to reference this snapshot to make image updates, or even split off new flavors of images if needed.
  8. At this point you don't need the SEED image or the instance you created from it. You can delete both.
  9. Launch a new instance from the PREP snapshot. Notice how Windows doesn't need to do all the hardware adjustments that it did when you launched an instance from the SEED image.
  10. You can now install cloudbase-init and sysprep the instance.
  11. Shut down the system and TAKE A SNAPSHOT (let's call it the IMAGE snapshot).
  12. Test your IMAGE snapshot by launching an instance from it.
  13. Mark the IMAGE snapshot as public and celebrate!

Personally, I feel like this should be the standard process for building new images. Not only do you get an image that was made on the same hardware it will be deployed on, but updating/testing/forking the image will be much faster/easier to do inside OpenStack with the Snapshot functionality as compared to updating the image on your local machine and uploading to glance every time.