use userdata to get past the installation wizard and set administrator password for Windows guest

asked 2018-01-31 11:19:30 -0600

I’m trying to do an automated installation of Windows 2012 Server GUI R2 on OpenStack. There is already an image uploaded from before (It’s my schools OpenStack and I’m doing a project for my thesis) but after the installation, I can’t use Remote Desktop and I have to go through a couple of manual steps (with the OpenStack console) before RDP starts working.

I have very little experience in working with windows VMs and all I really want to do to get passed the installation and install the necessary steps so that ansible will work on the guest. (I use Ansible to set to set up the VMs with OpenStack cli)

So my goal is exactly the same thing as in this blog ( but for OpenStack and not EC2

After installation I have to do the following three steps: choose a language accept the licence choose a password for the Administrator account

Print screens of manual the manual steps: ( after that, I can use remote desktop

The ws12 also contains an “Admin” account whose password I can get by: nova get-password staging /vagrant/keys/GB-OS-key But like I said before I can’t do remote desktop until I have finished the “installation wizard”

I have tried several things found online and I can create a test.txt file with text in it through userdata (both by using ansible and in the OpenStack GUI) but I have no idea on how to get past the “installation wizard”, I have read a lot in the cloudbase-init docs but unfortunately it hasn’t made me any wiser. And now it feels like I just try stuff blindly…

When creating a file I use following code which works both in Ansible and in the OpenStack GUI

Set-Content -Path "C:\test.txt" -Value "Hello OpenStack instance"

So the problem doesn’t seem to be that I can’t run userdata but rather that I can’t figure out what I need to run to get rid of the installation wizard and run the ansible script from the blog above.

edit retag flag offensive close merge delete