Open tandrez opened 1 year ago
Hi tandrez, funnily enough, I just started playing with MAAS this weekend and got to the same point where a W11 VM gets built fine but ends in a "Failed deployment" state:
I used this as a guide: https://github.com/canonical/packer-maas/blob/d16375241ed5b8f196e3b35f1e4e5c0b9bec41f3/windows10/README.md
I never did create a cloudbase-init-unattend.conf file because the walk-through in the above never mentions it but I saw that you did. Where does that file need to reside? Also, did you use the same guide above or did you use something else? Only reason I ask is because it seems like the information is really sparse. I decided that I'd start putting a Terraform template together that'd build the VM that the MAAS rack+region server be installed on in Proxmox and use Ansible to automate the installation of MAAS and then look to see if I can automate the building of a WIndows Imaging environment using Ansible+Packer and then share it with everyone. Basically it'd be the equivalent of "Kubespray" for MAAS. All people would do is provide their own Windows ISO and it'd just add to MAAS with it ready to be deployed without a failed deployment state at the end. It's a real shame the product doesn't just do this out of the box.
I saw this was posted on June 27th so quite some time had passed. Hopefully you read this and can get back to me to let me know whether you fixed it or still have issues.
Hello,
You can try the Windows image build using this powershell only project -> https://github.com/cloudbase/windows-imaging-tools/blob/master/Examples/create-windows-online-cloud-image.ps1.
From the logs @tandrez, it seems that the Curtin hooks do not replace the placeholder values to correct values.
Thanks.
Thanks much Adrian! Will give this a whirl today. So I'd run this workflow on a Windows host instead of what I was previously using (a Linux host with Packer), correct?
Thanks much Adrian! Will give this a whirl today. So I'd run this workflow on a Windows host instead of what I was previously using (a Linux host with Packer), correct?
I would first check that curting hooks got the correct information and set the correct information in the cloudbase-init config files. Last time I checked, these curtin hooks worked fine also https://github.com/cloudbase/windows-curtin-hooks/tree/master/curtin.
Maybe this information can be helpful to check whether the MAAS image creation was correct: https://github.com/cloudbase/windows-imaging-tools/issues/370#issuecomment-1337736690
Ah, ok, so yes... I have the same curtin hooks your link (just did a diff compare):
Here's the cloudbase output from these curtin config/cloudbase install: https://gist.github.com/ab17182/7f7da8f8a1de995267883a63318c9289
Weird thing is that the walkthrough I had creates "defaultuser" and "defaultpassword" for the user but there's no reference to that account in the cloudbase logs.
None-the-less, I'll start from scratch using your PS1 scripting toolset and see how I get along. I am hoping I won't have to sit there and pick this all apart. Everything I've seen to date has been just either a hodge-podge of disparate tools resulting in inconsistent results or something that almost works but requires tinkering/tweaking to get working. In looking at your link you've provided, it looks like this might be the easiest to use and I'm hoping will provide the desired state at the end.
Ah, ok, so yes... I have the same curtin hooks your link (just did a diff compare):
Here's the cloudbase output from these curtin config/cloudbase install: https://gist.github.com/ab17182/7f7da8f8a1de995267883a63318c9289
Weird thing is that the walkthrough I had creates "defaultuser" and "defaultpassword" for the user but there's no reference to that account in the cloudbase logs.
None-the-less, I'll start from scratch using your PS1 scripting toolset and see how I get along. I am hoping I won't have to sit there and pick this all apart. Everything I've seen to date has been just either a hodge-podge of disparate tools resulting in inconsistent results or something that almost works but requires tinkering/tweaking to get working. In looking at your link you've provided, it looks like this might be the easiest to use and I'm hoping will provide the desired state at the end.
both cloudbase-init.conf and cloudbase-init-unattend.conf look to be wrong, those two should have been updated by the curtin hooks with the proper metadata from MAAS.
There's 3 files in there and I'm thinking I need to modify curtin-hook, right? Am I supposed to populate something in that file (or more than that file) or is MAAS supposed to automagically pass this information at first boot? I'm thinking it's the former since it's not working at the moment. That wasn't outlined/documented in the link I used so this is new info.
Hi,
I'm using Canonical MAAS to deploy Windows 11 and 2022 on baremetal desktops and servers respectively. At the end of the deployment, the machine boots successfully in Windows and I can login without problem. The problem is that the machine hangs in the "Deploying" state in MAAS and eventually change to "Failed deployment" after the deployment timeout (30min). I have figured out that the issue concerns Cloudbase-Init. The logs indicate that it cannot retrieve the metadata from MAAS with an HTTP error 401 Unauthorized (please see log exctract below).
cloudbase-init-unattend.log:
cloudbase-init-unattend.conf:
The thing is that I can access the metadata URL with a web browser on the machine without error (HTTP 200) and when I manually start the cloudbase-init service on the machine, it works (the machine reboots and change to "Deployed" state in MAAS if I do it before the deployment timeout expiration).
I have tried increasing the
retry_count
parameter to100
in case the network was not ready but it does not solve the problem.Link to the thread in MAAS Discourse with more history: Need help to deploy Windows 11 custom image
Any help would be greatly appreciated.