New Question

Revision history [back]

click to hide/show revision 1
initial version

Windows2019 and MaaS deployment problems

I've been unsuccessfully trying for a week to deploy a windows server 2019 image with Maas 3.1. The commissioning phase seems to be fine but not the deployment. All questions related to the same error log don't have a clear answer. I've generated the image with both packer and windows-imaging-tools so I'm convinced that the problem resides with MaaS. I'm using two virtual machines (Virtual Box) for testing, one with MaaS (A) and the other to deploy the image (B) but I've had the same results with two bare metal machines. After the deployment phase the the machine B restarts and prints the message:

Booting under MAAS direction...
nomodeset ro root=squash:http://192.168.200.142:5248/images/windows/amd64/ga-20.04/win2019/no-such-image/squashfs ip=::::grand-racer:BOOTIF ip6=off overlayroot=tmpfs overlayroot_cfgdisk=disabled cc:{'datasource_list': ['MAAS']}end_cc cloud-config-url=http://192.168.200.142:5248/MAAS/metadata/latest/by-id/xanpcq/?op=get_preseed apparmor=0 log_host_192.168.200.142 log_port=5247 ---A
Loading http://192.168.200.142:5248/images/windows/amd64/ga-20.04/win2019/no-such-image/boot-kernel... failed: No such file or directory
boot:

With packer I've used qcow2 and raw format while with windows-imaging-tools only raw; tar.gz and dd.gz compressions and I've uploaded them with the following command:

maas admin boot-resources create name=windows/win2019 architecture=amd64/generic filetype=tgz title=windows2019 content@=win-image.tar.gz

maas-admin@maas:~$  file win-image.tar.gz 
win-image.tar.gz: gzip compressed data, was "win-image.raw.tar", last modified: Mon Apr 11 13:33:08 2022, from Unix, original size modulo 2^32 360728576

From the MaaS web page I can see that the image is downloaded and synced succesfully. (In this case the image was generated by windows-imaging-tools and the extension was .vhdx out of the creation but ubuntu says it's gzipped and I've uploaded like so)

I'd like to post the while MaaS log file from /var/log/maas/rsyslog/[machine] but I don't have enough points to attach a file so I'll just paste the lines I think are the most relevant:

2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:         finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:         Traceback (most recent call last):
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:           File "/curtin/curtin/commands/main.py", line 202, in main
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:             ret = args.func(args)
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:           File "/curtin/curtin/log.py", line 97, in wrapper
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:             return log_time("TIMED %s: " % msg, func, *args, **kwargs)
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:           File "/curtin/curtin/log.py", line 79, in log_time
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:             return func(*args, **kwargs)
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:           File "/curtin/curtin/commands/block_meta.py", line 113, in block_meta
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:             return meta_simple(args)
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:           File "/curtin/curtin/commands/block_meta.py", line 2128, in meta_simple
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:             rootdev = write_image_to_disk(dd_images[0], devname)
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:           File "/curtin/curtin/commands/block_meta.py", line 171, in write_image_to_disk
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:             return block.get_root_device([devname], paths=paths)
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:           File "/curtin/curtin/block/__init__.py", line 760, in get_root_device
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:             raise ValueError(
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:         ValueError: Did not find any filesystem on ['sda'] that contained one of ['curtin', 'system-data/var/lib/snapd', 'snaps']
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:         Did not find any filesystem on ['sda'] that contained one of ['curtin', 'system-data/var/lib/snapd', 'snaps']
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:         
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]: Stderr: ''
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]: Cloud-init v. 22.1-14-g2e17a0d6-0ubuntu1~20.04.3 running 'modules:final' at Mon, 11 Apr 2022 14:57:49 +0000. Up 56.37 seconds.
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]: 2022-04-11 14:58:11,291 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]: 2022-04-11 14:58:11,303 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_user.py'>) failed
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]: Cloud-init v. 22.1-14-g2e17a0d6-0ubuntu1~20.04.3 finished at Mon, 11 Apr 2022 14:58:11 +0000. Datasource DataSourceMAAS [http://192.168.200.142:5248/MAAS/metadata/curtin].  Up 78.74 seconds

So the problem seems that it doesn't find the curtin folder in the partition, fails the deployment and then falls back to asking an image in a strange path. I've checked and curtin + hooks are present inside the image in the system partition. I'd like to rule out that it's an image problem but I'm also not too familiar with this process and MaaS. I've followed the guide for MaaS 3.1 deb (https://maas.io/docs/snap/3.1/ui/maas-installation#heading--fresh-install-3-1-packages).

Is there a way to get more info on what is causing this?

Windows2019 and MaaS deployment problems

I've been unsuccessfully trying for a week to deploy a windows server 2019 image with Maas 3.1. The commissioning phase seems to be fine but not the deployment. All questions related to the same error log don't have a clear answer. I've generated the image with both packer and windows-imaging-tools so I'm convinced that the problem resides with MaaS. I'm using two virtual machines (Virtual Box) for testing, one with MaaS (A) and the other to deploy the image (B) but I've had the same results with two bare metal machines. After the deployment phase the the machine B restarts and prints the message:

Booting under MAAS direction...
nomodeset ro root=squash:http://192.168.200.142:5248/images/windows/amd64/ga-20.04/win2019/no-such-image/squashfs ip=::::grand-racer:BOOTIF ip6=off overlayroot=tmpfs overlayroot_cfgdisk=disabled cc:{'datasource_list': ['MAAS']}end_cc cloud-config-url=http://192.168.200.142:5248/MAAS/metadata/latest/by-id/xanpcq/?op=get_preseed apparmor=0 log_host_192.168.200.142 log_port=5247 ---A
Loading http://192.168.200.142:5248/images/windows/amd64/ga-20.04/win2019/no-such-image/boot-kernel... failed: No such file or directory
boot:

With packer I've used qcow2 and raw format while with windows-imaging-tools only raw; tar.gz and dd.gz compressions and I've uploaded them with the following command:

maas admin boot-resources create name=windows/win2019 architecture=amd64/generic filetype=tgz title=windows2019 content@=win-image.tar.gz

maas-admin@maas:~$  file win-image.tar.gz 
win-image.tar.gz: gzip compressed data, was "win-image.raw.tar", last modified: Mon Apr 11 13:33:08 2022, from Unix, original size modulo 2^32 360728576

From the MaaS web page I can see that the image is downloaded and synced succesfully. (In this case the image was generated by windows-imaging-tools and the extension was .vhdx out of the creation but ubuntu says it's gzipped and I've uploaded like so)

I'd like to post the while MaaS log file from /var/log/maas/rsyslog/[machine] but I don't have enough points to attach a file so I'll just paste the lines I think are the most relevant:

2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:         finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:         Traceback (most recent call last):
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:           File "/curtin/curtin/commands/main.py", line 202, in main
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:             ret = args.func(args)
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:           File "/curtin/curtin/log.py", line 97, in wrapper
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:             return log_time("TIMED %s: " % msg, func, *args, **kwargs)
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:           File "/curtin/curtin/log.py", line 79, in log_time
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:             return func(*args, **kwargs)
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:           File "/curtin/curtin/commands/block_meta.py", line 113, in block_meta
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:             return meta_simple(args)
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:           File "/curtin/curtin/commands/block_meta.py", line 2128, in meta_simple
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:             rootdev = write_image_to_disk(dd_images[0], devname)
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:           File "/curtin/curtin/commands/block_meta.py", line 171, in write_image_to_disk
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:             return block.get_root_device([devname], paths=paths)
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:           File "/curtin/curtin/block/__init__.py", line 760, in get_root_device
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:             raise ValueError(
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:         ValueError: Did not find any filesystem on ['sda'] that contained one of ['curtin', 'system-data/var/lib/snapd', 'snaps']
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:         Did not find any filesystem on ['sda'] that contained one of ['curtin', 'system-data/var/lib/snapd', 'snaps']
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]:         
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]: Stderr: ''
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]: Cloud-init v. 22.1-14-g2e17a0d6-0ubuntu1~20.04.3 running 'modules:final' at Mon, 11 Apr 2022 14:57:49 +0000. Up 56.37 seconds.
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]: 2022-04-11 14:58:11,291 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]: 2022-04-11 14:58:11,303 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_user.py'>) failed
2022-04-11T14:58:11+00:00 grand-racer cloud-init[1494]: Cloud-init v. 22.1-14-g2e17a0d6-0ubuntu1~20.04.3 finished at Mon, 11 Apr 2022 14:58:11 +0000. Datasource DataSourceMAAS [http://192.168.200.142:5248/MAAS/metadata/curtin].  Up 78.74 seconds

So the problem seems that it doesn't find the curtin folder in the partition, fails the deployment and then falls back to asking an image in a strange path. I've checked and curtin + hooks are present inside the image in the system partition. I'd like to rule out that it's an image problem but I'm also not too familiar with this process and MaaS. I've followed the guide for MaaS 3.1 deb (https://maas.io/docs/snap/3.1/ui/maas-installation#heading--fresh-install-3-1-packages).

Is there a way to get more info on what is causing this?

[edit]

From previous log lines it seems that the MaaS server is serving the image at http://192.168.200.142:5248/images/windows/amd64/generic/win2019/uploaded/root-dd while the image in my case is named root-tgz. I've renamed it to root-dd (path: /var/lib/maas/boot-resources/current/windows/amd64/generic/win2019/uploaded/) and the installation continues without errors ... until the boot phase which ends in boot failure.

Log lines:

2022-04-11T14:58:09+00:00 grand-racer cloud-init[1494]: --2022-04-11 14:58:09--  http://192.168.200.142:5248/images/windows/amd64/generic/win2019/uploaded/root-dd
2022-04-11T14:58:09+00:00 grand-racer cloud-init[1494]: Connecting to 192.168.200.142:5248... connected.
2022-04-11T14:58:09+00:00 grand-racer cloud-init[1494]: HTTP request sent, awaiting response... 404 Not Found
2022-04-11T14:58:09+00:00 grand-racer cloud-init[1494]: 2022-04-11 14:58:09 ERROR 404: Not Found.
2022-04-11T14:58:09+00:00 grand-racer cloud-init[1494]: gzip: stdin: unexpected end of file
2022-04-11T14:58:09+00:00 grand-racer cloud-init[1494]: tar: Child returned status 1
2022-04-11T14:58:09+00:00 grand-racer cloud-init[1494]: tar: Error is not recoverable: exiting now

Is the image supposed to be named root-dd / root-tgz or it's a MaaS bug?