Open NgatiaFrankline opened 2 years ago
Hi @NgatiaFrankline !
My apologies for the late reply.
A bit of context first.
MAAS has 2 methods it uses to install an OS:
Ubuntu and some other Linux OSs are typically installed using the first method. MAAS partitions the disk, formats it according to the partition layout for that nodes, unarchives the OS on the root file system, installs GRUB and reboots.
Windows and other foreign OSs are installed using full disk images. This is similar to how Openstack Ironic installs a new node or how a VM is deployed in a cloud.
Judging by the output from MAAS, it seems that the image was not uploaded as a full disk image and MAAS is attempting to install it using the first method.
If I may ask, how did you upload the image? If you have not already done so, please make sure you've uploaded the image using the following command:
maas admin boot-resources create \
title="Windows Server 2016 Standard" \
name=windows/win2016 \
architecture=amd64/generic \
filetype=ddtgz \
content@=$HOME/windows-win2016-amd64-root-dd
In the above command, the important bits are:
windows/
(or at least this used to be true in previous versions). Windows gets special treatment in MAAS mostly due to licensing. For a list of Windows choices, see: https://git.launchpad.net/maas/tree/src/provisioningserver/drivers/osystem/windows.py?h=3.2#n14ddtgz
image type tells MAAS this is a full disk image (dd
), compressed to tgz
. If your image is not compressed and is in raw format, you can use ddraw
. For a full list of options and possible values, please see:
maas admin boot-resources create --help
Let me know if this helps, and again, my apologies for the late reply.
the same error with maas 3.4 (and 3.3, and 3.2). I have tried win 2k19
Hello @NgatiaFrankline @mykolq,
From the error logs you sent:
http://10.0.0.2:5248/images/windows/amd64/generic/winserver2016STD5/uploaded/root-dd
Connecting to 10.0.0.2:5248... connected.
HTTP request sent, awaiting response... 404 Not Found
gzip: stdin: unexpected end of file
There is an issue on your setup with the URL of the image --> http://10.0.0.2:5248/images/windows/amd64/generic/winserver2016STD5/uploaded/root-dd, it seems it is not a valid URL.
@mykolq do you have the same issue with the URL not being valid?
This is usually a problem with how MAAS was installed or the access to its http storage or with how the Windows image has been created.
Thank you.
sorry for late answer. i' ve used this script https://github.com/cloudbase/windows-imaging-tools/blob/master/Examples/create-windows-cloud-image.ps1, than archived raw to .gz and import it to maas by command like that
maas maas_api_admin boot-resources create name=windows/windowsServer2019dc title="windowsServer2019dc" architecture=amd64/generic content@=/src/maas_files/packer_output/windows-2019/standard.tar.gz
Hello @mykolq,
You need to use the https://github.com/cloudbase/windows-imaging-tools#new-windowsonlineimage New-WindowsOnlineImage command to create a working image.
New-WindowsCloudImage
This command does not require Hyper-V to be enabled, but the generated image
is not ready to be deployed, as it needs to be started manually on another hypervisor.
The image is ready to be used when it shuts down.
You can find a PowerShell example to generate a raw OpenStack Ironic image that also works on KVM
in Examples/create-windows-cloud-image.ps1
Thank you.
Thank you, I am trying this now
Hello @NgatiaFrankline @mykolq,
From the error logs you sent:
http://10.0.0.2:5248/images/windows/amd64/generic/winserver2016STD5/uploaded/root-dd Connecting to 10.0.0.2:5248... connected. HTTP request sent, awaiting response... 404 Not Found gzip: stdin: unexpected end of file
There is an issue on your setup with the URL of the image --> http://10.0.0.2:5248/images/windows/amd64/generic/winserver2016STD5/uploaded/root-dd, it seems it is not a valid URL.
@mykolq do you have the same issue with the URL not being valid?
This is usually a problem with how MAAS was installed or the access to its http storage or with how the Windows image has been created.
Thank you.
sorry for a stupid question. what is the correct way of importing file, created by this script? it seems. i have tried filetype=ddraw, filetype=tgz, filetype=ddtgz and had error in install log like that --2023-11-24 13:57:24-- http://192.168.164.1:5248/images/custom/amd64/generic/win2019dc/uploaded/root-dd Connecting to 192.168.164.1:5248... connected. HTTP request sent, awaiting response... 200 OK Length: 12886999040 (12G) [application/octet-stream] Saving to: ‘STDOUT’ 0K gzip: stdin: not in gzip format .tar: Child died with signal 13
@mykolq
It is best to check the file before hand using the command file
or qemu-img info
to make sure that the image file respects the filetype=ddtgz content@=$HOME/windows-win2016-amd64-root-dd
-- > in this case the image is a .raw.tar.gz file
@mykolq
It is best to check the file before hand using the command
file
orqemu-img info
to make sure that the image file respects thefiletype=ddtgz content@=$HOME/windows-win2016-amd64-root-dd
-- > in this case the image is a .raw.tar.gz file
thanks. it is raw file on script exit. Now there is another error with image Command: ['curtin', 'in-target', '--', 'bash', '-c', 'cloud-init --version || (echo "cloud-init not detected, MAAS will not be able to configure this machine properly" && exit 1)'] Exit code: 127
But i can see Cloudbase-Init folder with files in image (c:\Program Files\Cloudbase Solutions\Cloudbase-Init)
Am trying to prepare a windows server 2016 STD image for MAAS: 3.1.0 using the script in examples: create-windows-cloud-image.ps1 but it dosen't work. Note the script runs successfully and the upload to maas boot resources is successful too. The machine is commissions by Ubuntu 20.04LTS. What could be wrong. Kindly if you need access to my private maas setup for a workround/reproduce the error please info me, we can arrange. Here are my logs:
Events logs:
Installation output