Ask Your Question

modify virtual machine image before upload it to image service (GLANCE)

asked 2015-08-14 04:54:00 -0600

Rochdi gravatar image

Hi, I have successfully deployed Openstack with Hyper-V and I can access to a VM. As we know in Hyper-V, it only supports VHD and VHDX formats no more. The process to upload an image to Openstack is:

  • First, you download a VHD file from any source.
  • Second, you upload it to image service.

  • Finally, you attach it to the new instance.

What I would like to ask is: assuming that we have a vhd file which contains windows 7 and it is already pre-installed and pre-configured, you will find a username and a password which are already set. Therefore, is there any ideas of how we change/modify the username and the password of this VHD before I upload it to the image service (Glance)? I mean I would like to access to the configuration file of windows from a CLI to have the ability of changing them. Also, is there a possibility of modifying them when creating a new instance and attaching to it a VHD? I hope you understand what I want. Best Regards

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-08-14 20:18:58 -0600

larsks gravatar image

There is a version of cloud-init for Windows, which can be used to perform arbitrary system configuration tasks when you first boot an image in OpenStack. This article talks about how you can create a Windows image that uses cloudbase-init.

edit flag offensive delete link more

answered 2015-08-16 04:35:35 -0600

Praveen N gravatar image


With the cloud init its possible to login with desired password(MYSECRET) as below,

password: MYSECRET
chpassword: {expire: True}
ssh_pwauth: True

The below links may be useful,


edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-08-14 04:54:00 -0600

Seen: 154 times

Last updated: Aug 16 '15