Ask Your Question
0

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
1

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
0

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

Praveen N gravatar image

Hi,

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

#cloud-config
password: MYSECRET
chpassword: {expire: True}
ssh_pwauth: True

The below links may be useful,

http://docs.openstack.org/image-guide...

http://cloudinit.readthedocs.org/en/l...

Thanks..!!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 77 times

Last updated: Aug 16 '15