-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot deploy image after successful build. Is this an issue in windows packer template file. #278
Comments
Hi! Can you open a pull request so that we can more easily see the changes you made here? Thanks! |
Fixed some typos post which able to build the image:
The installation finished but OS failed to come up with below errors: |
Hello Everyone! Please note that Windows images are not tar.gz. They are DD images and need to be imported accordingly in MAAS. Please see the README file for an example also this:
|
@alanbach : I created dd image from the template in the repo, still after deploying getting the same error: 'Unable to mount root fs on unknown block' |
I was able to successfully build image and tested successful deployment on a proxmox VM. Attaching the modified packer file in txt format as github allow limited file extensions for upload. But I think there is some issue on baremetal servers. My two dedicated servers wont go past windows logo. probably bios setting but I doubt it. I have uefi boot enabled, secure boot disabled, and disabled TPM on server and everything works fine in VM. but different story on a baremetal. |
@alanbach You can upload successfully but you will run into error "This does not look like a tar archive" while deployment. Hence the whole thread. |
@MggMuggins Updated the main thread with a notepad file. rename it and rebuild the image and try deployment then. |
@iamtinu : I uploaded the image using below command: maas admin boot-resources create name='windows/win2k19' title='Windows Server 2019' architecture='amd64/generic' filetype='ddtgz' content@=/home/devops/windows2019.dd.tar.gz and I'm using KVM with maas latest version to commission the machine, but got same error. |
I cant test on KVM I am using another proxmox server and two baremetal servers. worked for me. |
Did it work for you on baremetal ? Since I also tried on baremetal, operating system got installed but failed to come up : |
on baremetal my OS installs. that specific error is related to uefi I think. check TPM disabled, CSM disabled, uefi on and correct boot partition is marked as second boot option after setting network boot as first. I think you already installed OS just boot problem. in your previous logs I can also see PERC H755 Front so ensure drivers for the disk controller (PERC H755 Front) are loaded. Check with: If the drivers for PERC H755 are missing, rebuild the initramfs: Missing Bootloader or EFI Files. The EFI partition (/dev/sda1) was wiped and likely not re-populated with GRUB/bootloader files. |
This issue is stale because it has been open for 30 days with no activity. |
Hi everyone. In my case (baremetal), using the built-in packer windows template script resulted in a failed deployment in maas, it didn't even start to download the image and just gave the error This does not look like a tar archive. After replacing the template script with the one in the .txt file above, recreating the image, uploading it to maas and retrying the deployment it actually downloaded the image this time, but then I got these and a failed deployment again:
|
Hello @tdtmusic2 Looking at the above logs, the deployment is failing due to curtin directory missing in the image. I do see your image was uploaded as a dd image which is correct, however the missing curtin directory usually means the build process was never fully completed. Would you please re-run the build process, increase the timeout from the default 1 hour and watch the process closely to see if you get errors / interruptions at any stage? |
Hello. This is the output from the building process, it seems fine to me since it reports success but maybe I'm missing something:
|
Thank you @tdtmusic2! This build looks clean however there are circumstances where deleting and re-importing an image in MAAS does not actually refresh the images cached on Rack Controllers if the same name was used. Do you mind deleting the image, then uploading it using a different name (name= parameter)? Add a suffix of some sort to make it unique then try the deployment again. |
Hi Alan. Did that, but unfortunatelly it's the same result, not sure if the logs are identical but here's the output:
|
The default template file for windows creates a successful build on an ubuntu 24 VM but the build image gives error that:
tar: This does not look like a tar archive
So I figured the error tar This does not look like a tar archive indicates that the downloaded image is not in the expected format (likely not a valid .tar.gz or .tgz archive).
Broken Pipe: The Cannot write to ‘-’ (Broken pipe) error occurs because tar exited prematurely due to the invalid archive format, breaking the data stream to dd.
Filesystem Not Found:
After the failure, no partitions or filesystems are found on /dev/sda, causing the deployment to fail entirely.
I modified default packer file to make a new image file and successfully deployed on a raid filesystem. Can be deployed on other disk layouts too.
Changes :
Filename Updated:
Changed the output filename to .tar.gz for better compatibility with MAAS.
tar.gz Compression:
Updated the post-processor section to compress the output using tar -czf, which produces a .tar.gz file MAAS can decompress
Dynamic Filesystem Mounting:
The mount command now dynamically attempts to mount common filesystem types (ntfs, ext4, vfat) for adding curtin hooks.
Added Output Sync:
Added explicit sync commands to ensure file operations are flushed before moving to the next step.
below is the changed file for successful image building and successful deployment.
windows.pkr.hcl.txt
uploaded instead of pasting code : rename .txt to windows.pkr.hcl. Recreate the image and reupload using
maas yourprofile boot-resources create
name='windows/windows-server'
title='Windows Server 2016'
architecture='amd64/generic'
filetype='ddtgz'
content@=2016.dd.tar.gz
update : dont change filetype while uploading image from ddtgz to tgz
Thank You
The text was updated successfully, but these errors were encountered: