New Question
0

generate-maas-compatible-image Sysprep Failing

asked 2015-04-12 03:51:18 +0300

Chuntzu gravatar image

Using the appropriate branch link text I end up getting to the VM stage and the first boot powershell prompt fails (it fails to quickly to read actually) and then boots fully to windows. At that point a powershell prompt opens and fails again saying ini.ps1 isnt allowed to execute due to permissions issue with Set-Executionpolicy. I have set in manually in the vm and tried running login, did the updates, and system syspreped, but it dont look like the cloud-init installed since I get this from maas after an attempt to install one of these images on a node

(Stdout: "Unable to find cloudbase-init.cfg.\nUnexpected error while running command.\nCommand: ['/tmp/tmpI66dEC/target/curtin/finalize']\nExit code: 2\nReason: -\nStdout: ''\nStderr: ''\n" Stderr: '')

Then after reboot maas says no kernel is available for the windows image and doesnt boot. But If i bypass pxe the windows install actually boots into a oobe, but doesnt work with maas. I suppose in the end if the powershell prompts executed with the proper executionpolicy during the vm sysprep phase the images would work with maas and I wouldnt have this issue. I am assuming I am just improperly running the deployment scripts. I hope someone can give me information on how to get this to execute properly with the appropriate permissions?

edit retag flag offensive close merge delete

Comments

Hi Chuntzu! To debug this, we need to get the actual error. It works on my system, but we need to see what is happening in your case. I need you to change a couple of the scripts to add a sleep before returning the error. Please add "Start-Sleep 60" at the following lines: http://goo.gl/3csFwUhttp://goo.gl/3linMV I suspect the rest of the errors will be resolved once we get the the root cause of the first one. Please also let me know for which version of windows you are trying to create an image.

gabriel-samfira gravatar imagegabriel-samfira ( 2015-04-12 21:42:26 +0300 )edit

2 answers

Sort by » oldest newest most voted
0

answered 2015-04-15 16:11:29 +0300

Chuntzu gravatar image

Sorry for the late response, work has kept me away. I have some screen shots of the errors but says I need 10 points to post images so I will just describe them for now. Specilize.ps1, ini.psm1. and firstlogon.ps1 all pop up with the powershell error "not digitally signed unauthorizedaccess". This is the case for all versions of windows 8,8.1,10 preview, server 2012, 2012r2. I figured out a temp work around which was to add "unblock-file -path /pathtoselfandotherscripts" at the begging of each of the powershell scripts I included the location to the running script and anything else the script called for when it ran. I am not sure if there is a better way of running this but this was the only way I could properly get the ddtgz images so that maas would deploy them properly. As a side note server 2008r2 does not recognize "unblock-file -path" as this must be a new powershell command. So I am still trying to find a way to create server 2008r2 and windows 7 images.

edit flag offensive delete link more

Comments

I have been unable to reproduce this on my system. One last thing to try. After cloning the repository from github, do an aunblock-file on every file in the repo. After which, edit UnattendTemplate.xml and replace instances of -ExecutionPolicy Remotesigned with: -ExecutionPolicy Bypass. In theory, the RemoteSigned argument passed to powershell should prevent the behaviour you are observing.

gabriel-samfira gravatar imagegabriel-samfira ( 2015-04-25 14:24:32 +0300 )edit

have you been able to get maas to boot your images?

scubabri gravatar imagescubabri ( 2015-11-05 16:44:46 +0300 )edit
0

answered 2015-11-06 11:13:35 +0300

gabriel-samfira gravatar image

Hello,

The first error you see about finalize failing is due to the fact that the cloudbase-init MSI changed the location of where it installs itself. I just committed a a possible fix for that. Make sure you check it out before trying again.

Also, make sure that if you download the repo as zip, you unblock the zip before unarchiving to make sure you do not run into the "script not digitally signed" error:

Start-BitsTransfer https://github.com/gabriel-samfira/windows-openstack-imaging-tools/archive/persist-driver-option.zip
Unblock-File  persist-driver-option.zip

If you have a windows 8.1 installation available, you will be able to use that to generate any windows image up to 8.1. So that means you will be able to generate images for windows 7 as well.

Let me know if it works for you.

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

Question Tools

Stats

Asked: 2015-04-12 03:51:18 +0300

Seen: 556 times

Last updated: Nov 06 '15