Skip to content
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

Open
iamtinu opened this issue Nov 25, 2024 · 18 comments

Comments

@iamtinu
Copy link

iamtinu commented Nov 25, 2024

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

@MggMuggins
Copy link

Hi! Can you open a pull request so that we can more easily see the changes you made here? Thanks!

@nics90
Copy link

nics90 commented Nov 25, 2024

Fixed some typos post which able to build the image:

packer {
  required_version = ">= 1.7.0"
  required_plugins {
    qemu = {
      version = "~> 1.0"
      source  = "github.com/hashicorp/qemu"
    }
  }
}


variable "headless" {
  type        = bool
  default     = false
  description = "Whether VNC viewer should not be launched."
}

variable "disk_size" {
  type    = string
  default = "32G"
}

variable "iso_path" {
  type    = string
  default = ""
}

variable "ovmf_suffix" {
  type    = string
  default = "_4M"
}

variable "filename" {
  type        = string
  default     = "windows.dd.tar.gz"
  description = "The filename of the tarball to produce"
}

variable "is_vhdx" {
  type        = bool
  default     = false
  description = "Whether we are building using a VHDX disk."
}

variable "use_tpm" {
  type        = string
  default     = "false"
  description = "Whether we are building using a virtual TPM device."
}

variable "timeout" {
  type    = string
  default = "1h"
}

locals {
  baseargs = [
    ["-cpu", "host"],
    ["-serial", "stdio"],
    ["-drive", "if=pflash,format=raw,id=ovmf_code,readonly=on,file=/usr/share/OVMF/OVMF_CODE${var.ovmf_suffix}.ms.fd"],
    ["-drive", "if=pflash,format=raw,id=ovmf_vars,file=OVMF_VARS.fd"],
    ["-drive", "file=output-windows_builder/packer-windows_builder,format=raw"],
    ["-cdrom", "${var.iso_path}"],
    ["-drive", "file=drivers.iso,media=cdrom,index=3"],
    ["-boot", "d"]
  ]
  tpmargs = [
    ["-chardev", "socket,id=chrtpm,path=/tmp/swtpm/swtpm-sock"],
    ["-tpmdev", "emulator,id=tpm0,chardev=chrtpm"],
    ["-device", "tpm-tis,tpmdev=tpm0"]
  ]
}

source "qemu" "windows_builder" {
  accelerator       = "kvm"
  boot_command      = [""]
  boot_wait         = "2s"
  communicator      = "none"
  disk_interface    = "ide"
  disk_image        = "${var.is_vhdx}"
  disk_size         = "${var.disk_size}"
  floppy_files      = ["./http/Autounattend.xml", "./http/logon.ps1", "./http/rh.cer"]
  floppy_label      = "flop"
  format            = "raw"
  headless          = "${var.headless}"
  http_directory    = "http"
  iso_checksum      = "none"
  iso_url           = "${var.iso_path}"
  machine_type      = "q35"
  memory            = "4096"
  cpus              = "2"
  net_device        = "e1000"
  qemuargs          = concat(local.baseargs, (var.use_tpm == "yes" ? local.tpmargs : []))
  shutdown_timeout  = "${var.timeout}"
  vnc_bind_address  = "0.0.0.0"
}

build {
  sources = ["source.qemu.windows_builder"]

  post-processor "shell-local" {
    inline = [
      "echo 'Syncing output-windows_builder/packer-windows_builder...'",
      "sync -f output-windows_builder/packer-windows_builder",
      "IMG_FMT=raw",
      "source scripts/setup-nbd",
      "TMP_DIR=$(mktemp -d /tmp/packer-maas-XXXX)",
      "echo 'Adding curtin-hooks to image...'",
      "mount -t ntfs $${nbd}p3 $TMP_DIR || mount -t ext4 $${nbd}p3 $TMP_DIR || mount -t vfat $${nbd}p3 $TMP_DIR",
      "mkdir -p $TMP_DIR/curtin",
      "cp ./curtin/* $TMP_DIR/curtin/",
      "sync -f $TMP_DIR/curtin",
      "umount $TMP_DIR",
      "qemu-nbd -d $nbd",
      "rmdir $TMP_DIR",
      "tar -czf ${var.filename} -C output-windows_builder packer-windows_builder",
      "echo 'Image created: ${var.filename}'"
    ]
    inline_shebang = "/bin/bash -e"
  }

  post-processor "compress" {
    output = "${var.filename}"
  }
}

The installation finished but OS failed to come up with below errors:

image

@alanbach
Copy link
Contributor

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:

$ maas ${PROFILE} boot-resources create name='windows/windows-11' title='Windows 11' architecture='amd64/generic' filetype=ddgz content@=windows11.dd.gz

@nics90
Copy link

nics90 commented Nov 26, 2024

@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'

@iamtinu
Copy link
Author

iamtinu commented Nov 26, 2024

windows.pkr.hcl.txt

I was able to successfully build image and tested successful deployment on a proxmox VM.

Screenshot 2024-11-25 164912

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.

@iamtinu
Copy link
Author

iamtinu commented Nov 26, 2024

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:

$ maas ${PROFILE} boot-resources create name='windows/windows-11' title='Windows 11' architecture='amd64/generic' filetype=ddgz content@=windows11.dd.gz

@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.

@iamtinu
Copy link
Author

iamtinu commented Nov 26, 2024

@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'

@nics90 try the changes I mentioned in the notepad file from my comments. and use that packer file to generate image for deployment

@iamtinu
Copy link
Author

iamtinu commented Nov 26, 2024

Hi! Can you open a pull request so that we can more easily see the changes you made here? Thanks!

@MggMuggins Updated the main thread with a notepad file. rename it and rebuild the image and try deployment then.

@nics90
Copy link

nics90 commented Nov 26, 2024

@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.

@iamtinu
Copy link
Author

iamtinu commented Nov 27, 2024

I cant test on KVM I am using another proxmox server and two baremetal servers. worked for me.

@nics90
Copy link

nics90 commented Nov 27, 2024

Did it work for you on baremetal ? Since I also tried on baremetal, operating system got installed but failed to come up :

image

dellsrv3.maas-installation-output-2024-11-27.log

@iamtinu
Copy link
Author

iamtinu commented Nov 27, 2024

Did it work for you on baremetal ? Since I also tried on baremetal, operating system got installed but failed to come up :

image

dellsrv3.maas-installation-output-2024-11-27.log

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.
If that not works. release the server and quick erase disk . commission the machine again, then deploy.

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:
lspci -k | grep -A 2 PERC

If the drivers for PERC H755 are missing, rebuild the initramfs:
chroot /mnt
update-initramfs -u

Missing Bootloader or EFI Files. The EFI partition (/dev/sda1) was wiped and likely not re-populated with GRUB/bootloader files.
Without these files, the system cannot boot.

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Dec 28, 2024
@tdtmusic2
Copy link

tdtmusic2 commented Jan 9, 2025

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:

writing image to disk {'type': 'dd-tgz', 'uri': 'http://172.17.17.105:5248/images/87b8187/windows/amd64/generic/windowsserver2022/uploaded/root-dd'}, sda
        Running command ['sh', '-c', 'wget "$1" --progress=dot:mega -O - |tar -xOzf -| dd bs=4M of="$2"', '--', 'http://172.17.17.105:5248/images/87b8187/windows/amd64/generic/windowsserver2022/uploaded/root-dd', '/dev/sda'] with allowed return codes [0] (capture=False)
        --2025-01-09 13:10:27--  http://172.17.17.105:5248/images/87b8187/windows/amd64/generic/windowsserver2022/uploaded/root-dd
        Connecting to 172.17.17.105:5248... connected.
        HTTP request sent, awaiting response... 200 OK
        Length: 6645865672 (6.2G) [application/octet-stream]
        Saving to: ‘STDOUT’
        
             0K ....tar: This does not look like a tar archive
        tar: Skipping to next header
        .tar: Exiting with failure status due to previous errors
                                                          0% 99.1M=0.004s
        
        
        Cannot write to ‘-’ (Broken pipe).
        0+0 records in
        0+0 records out
        0 bytes copied, 0.0227721 s, 0.0 kB/s
        Running command ['partprobe', '/dev/sda'] with allowed return codes [0] (capture=False)
        Running command ['udevadm', 'trigger', '/dev/sda'] with allowed return codes [0] (capture=False)
        Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
        TIMED udevadm_settle(): 0.091
        Running command ['vgchange', '--activate=y'] with allowed return codes [0] (capture=True)
        Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
        TIMED udevadm_settle(): 0.019
        Running command ['udevadm', 'trigger', '/dev/sda'] with allowed return codes [0] (capture=False)
        Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
        TIMED udevadm_settle(): 0.042
        Running command ['vgchange', '--activate=y'] with allowed return codes [0] (capture=True)
        Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
        TIMED udevadm_settle(): 0.011
        Running command ['udevadm', 'trigger', '/dev/sda'] with allowed return codes [0] (capture=False)
        Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
        TIMED udevadm_settle(): 0.043
        Running command ['vgchange', '--activate=y'] with allowed return codes [0] (capture=True)
        Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
        TIMED udevadm_settle(): 0.012
        Searching for filesystem on ['sda'] containing one of: ['curtin', 'system-data/var/lib/snapd', 'snaps']
        Running command ['lsblk', '--noheadings', '--bytes', '--pairs', '--output=ALIGNMENT,DISC-ALN,DISC-GRAN,DISC-MAX,DISC-ZERO,FSTYPE,GROUP,KNAME,LABEL,LOG-SEC,MAJ:MIN,MIN-IO,MODE,MODEL,MOUNTPOINT,NAME,OPT-IO,OWNER,PHY-SEC,RM,RO,ROTA,RQ-SIZE,SIZE,STATE,TYPE,UUID', '/dev/sda'] with allowed return codes [0] (capture=True)
        Known partitions []
        TIMED BLOCK_META: 2.539
        finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: FAIL: curtin command block-meta
        Traceback (most recent call last):
          File "/curtin/curtin/commands/main.py", line 202, in main
            ret = args.func(args)
          File "/curtin/curtin/log.py", line 97, in wrapper
            return log_time("TIMED %s: " % msg, func, *args, **kwargs)
          File "/curtin/curtin/log.py", line 79, in log_time
            return func(*args, **kwargs)
          File "/curtin/curtin/commands/block_meta.py", line 120, in block_meta
            return meta_simple(args)
          File "/curtin/curtin/commands/block_meta.py", line 2321, in meta_simple
            rootdev = write_image_to_disk(dd_images[0], devname)
          File "/curtin/curtin/commands/block_meta.py", line 182, in write_image_to_disk
            return block.get_root_device([devname], paths=paths)
          File "/curtin/curtin/block/__init__.py", line 761, in get_root_device
            raise ValueError(
        ValueError: Did not find any filesystem on ['sda'] that contained one of ['curtin', 'system-data/var/lib/snapd', 'snaps']
        Did not find any filesystem on ['sda'] that contained one of ['curtin', 'system-data/var/lib/snapd', 'snaps']
        
Stderr: ''

@alanbach
Copy link
Contributor

alanbach commented Jan 9, 2025

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?

@tdtmusic2
Copy link

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:

rm -f -rf output-* windows.dd.gz http/Autounattend.xml \
drivers.iso windows_builder.img OVMF_VARS.fd
cp -v /usr/share/OVMF/OVMF_VARS_4M.ms.fd OVMF_VARS.fd
'/usr/share/OVMF/OVMF_VARS_4M.ms.fd' -> 'OVMF_VARS.fd'
mkisofs -o drivers.iso -V 'Extra Drivers' -input-charset utf-8 drivers
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 2048
Path table size(bytes): 22
Max brk space used 0
176 extents written (0 MB)
sed s#@VERSION@#"Windows Server 2022 SERVERSTANDARD"#g http/Autounattend.xml.ISO.template > http/Autounattend.xml
packer init . && packer build -var iso_path=/mnt/iso/SERVER_EVAL_x64FRE_en-us.iso \
                -var headless=false \
                -var ovmf_suffix=_4M \
                -var is_vhdx=false \
                -var timeout=1h \
                -var use_tpm= \
                windows.pkr.hcl
Warning: A checksum of 'none' was specified. Since ISO files are so big,
a checksum is highly recommended.

  on windows.pkr.hcl line 74:
  (source code not available)


qemu.windows_builder: output will be in this color.

==> qemu.windows_builder: Retrieving ISO
==> qemu.windows_builder: Trying /mnt/iso/SERVER_EVAL_x64FRE_en-us.iso
==> qemu.windows_builder: Trying /mnt/iso/SERVER_EVAL_x64FRE_en-us.iso
==> qemu.windows_builder: /mnt/iso/SERVER_EVAL_x64FRE_en-us.iso => /mnt/iso/SERVER_EVAL_x64FRE_en-us.iso
==> qemu.windows_builder: Creating floppy disk...
    qemu.windows_builder: Copying files flatly from floppy_files
    qemu.windows_builder: Copying file: ./http/Autounattend.xml
    qemu.windows_builder: Copying file: ./http/logon.ps1
    qemu.windows_builder: Copying file: ./http/rh.cer
    qemu.windows_builder: Done copying files from floppy_files
    qemu.windows_builder: Collecting paths from floppy_dirs
    qemu.windows_builder: Resulting paths from floppy_dirs : []
    qemu.windows_builder: Done copying paths from floppy_dirs
    qemu.windows_builder: Copying files from floppy_content
    qemu.windows_builder: Done copying files from floppy_content
==> qemu.windows_builder: Starting HTTP server on port 8729
    qemu.windows_builder: No communicator is set; skipping port forwarding setup.
==> qemu.windows_builder: Looking for available port between 5900 and 6000 on 0.0.0.0
==> qemu.windows_builder: Starting VM, booting from CD-ROM
==> qemu.windows_builder: Overriding default Qemu arguments with qemuargs template option...
==> qemu.windows_builder: Waiting 2s for boot...
==> qemu.windows_builder: Connecting to VM via VNC (0.0.0.0:5908)
==> qemu.windows_builder: Typing the boot commands over VNC...
    qemu.windows_builder: No communicator is configured -- skipping StepWaitGuestAddress
==> qemu.windows_builder: Waiting for shutdown...
==> qemu.windows_builder: Running post-processor:  (type shell-local)
==> qemu.windows_builder (shell-local): Running local shell script: /tmp/packer-shell2174978315
    qemu.windows_builder (shell-local): Syncing output-windows_builder/packer-windows_builder...
    qemu.windows_builder (shell-local): output-windows_builder/packer-windows_builder
    qemu.windows_builder (shell-local): Loading nbd...
    qemu.windows_builder (shell-local): Using /dev/nbd0
    qemu.windows_builder (shell-local): Binding image to /dev/nbd0...
    qemu.windows_builder (shell-local): /dev/nbd0 disconnected
    qemu.windows_builder (shell-local): Waiting for partitions to be created...
    qemu.windows_builder (shell-local): Adding curtin-hooks to image...
    qemu.windows_builder (shell-local): /dev/nbd0 disconnected
    qemu.windows_builder (shell-local): Image created: windows.dd.tar.gz
==> qemu.windows_builder: Running post-processor:  (type compress)
==> qemu.windows_builder (compress): Using pgzip compression with 4 cores for windows.dd.tar.gz
==> qemu.windows_builder (compress): Tarring windows.dd.tar.gz with pgzip
==> qemu.windows_builder (compress): Archive windows.dd.tar.gz completed
Build 'qemu.windows_builder' finished after 27 minutes 33 seconds.

==> Wait completed after 27 minutes 33 seconds

==> Builds finished. The artifacts of successful builds are:
--> qemu.windows_builder: VM files in directory: output-windows_builder
--> qemu.windows_builder: VM files in directory: output-windows_builder
--> qemu.windows_builder: compressed artifacts in: windows.dd.tar.gz
rm http/Autounattend.xml

@github-actions github-actions bot removed the stale label Jan 10, 2025
@alanbach
Copy link
Contributor

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.

@tdtmusic2
Copy link

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:

2025-01-13 10:15:19 (17.1 MB/s) - written to stdout [6509127766/6509127766]

0+1369175 records in
0+1369175 records out
34359738368 bytes (34 GB, 32 GiB) copied, 373.136 s, 92.1 MB/s
Running command ['partprobe', '/dev/sda'] with allowed return codes [0] (capture=False)
Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 182829696 blocks) or continue with the current setting? 
Running command ['udevadm', 'trigger', '/dev/sda'] with allowed return codes [0] (capture=False)
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED udevadm_settle(): 0.260
Running command ['vgchange', '--activate=y'] with allowed return codes [0] (capture=True)
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED udevadm_settle(): 0.022
Running command ['udevadm', 'trigger', '/dev/sda'] with allowed return codes [0] (capture=False)
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED udevadm_settle(): 0.096
Running command ['vgchange', '--activate=y'] with allowed return codes [0] (capture=True)
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED udevadm_settle(): 0.020
Running command ['udevadm', 'trigger', '/dev/sda'] with allowed return codes [0] (capture=False)
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED udevadm_settle(): 0.091
Running command ['vgchange', '--activate=y'] with allowed return codes [0] (capture=True)
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED udevadm_settle(): 0.014
Searching for filesystem on ['sda'] containing one of: ['curtin', 'system-data/var/lib/snapd', 'snaps']
Running command ['lsblk', '--noheadings', '--bytes', '--pairs', '--output=ALIGNMENT,DISC-ALN,DISC-GRAN,DISC-MAX,DISC-ZERO,FSTYPE,GROUP,KNAME,LABEL,LOG-SEC,MAJ:MIN,MIN-IO,MODE,MODEL,MOUNTPOINT,NAME,OPT-IO,OWNER,PHY-SEC,RM,RO,ROTA,RQ-SIZE,SIZE,STATE,TYPE,UUID', '/dev/sda'] with allowed return codes [0] (capture=True)
Known partitions ['sda1', 'sda2', 'sda3', 'sda4']
Running command ['mount', '/dev/sda1', '/tmp/tmpjveelamx'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmpjveelamx'] with allowed return codes [0] (capture=False)
Running command ['mount', '/dev/sda2', '/tmp/tmpjveelamx'] with allowed return codes [0] (capture=False)
mount: /tmp/tmpjveelamx: wrong fs type, bad option, bad superblock on /dev/sda2, missing codepage or helper program, or other error.
Running command ['mount', '/dev/sda3', '/tmp/tmpjveelamx'] with allowed return codes [0] (capture=False)
Found path 'curtin' on device '/dev/sda3'
Running command ['umount', '/tmp/tmpjveelamx'] with allowed return codes [0] (capture=False)
Running command ['mount', '/dev/sda4', '/tmp/tmpjveelamx'] with allowed return codes [0] (capture=False)
Running command ['umount', '/tmp/tmpjveelamx'] with allowed return codes [0] (capture=False)
Running command ['mount', '/dev/sda3', '/tmp/tmpeqn8vhm5/target'] with allowed return codes [0] (capture=False)
TIMED BLOCK_META: 376.005
finish: cmd-install/stage-partitioning/builtin/cmd-block-meta: SUCCESS: curtin command block-meta
start: cmd-install/stage-network/builtin/cmd-net-meta: curtin command net-meta
net-meta mode is 'custom'.  devices=[]
writing to file /tmp/tmpeqn8vhm5/state/network_config with network config: network:
  config:
  - id: eno1
    mac_address: 80:18:44:f0:79:ac
    mtu: 1500
    name: eno1
    subnets:
    - address: 172.17.17.223/24
      dns_nameservers:
      - 172.17.17.105
      dns_search:
      - maas
      gateway: 172.17.17.1
      type: static
    type: physical
  - id: eno2
    mac_address: 80:18:44:f0:79:ad
    mtu: 1500
    name: eno2
    subnets:
    - type: manual
    type: physical
  - id: eno3
    mac_address: 80:18:44:f0:79:ae
    mtu: 1500
    name: eno3
    subnets:
    - type: manual
    type: physical
  - id: eno4
    mac_address: 80:18:44:f0:79:af
    mtu: 1500
    name: eno4
    subnets:
    - type: manual
    type: physical
  - id: enp193s0f0
    mac_address: 34:80:0d:03:e7:10
    mtu: 1500
    name: enp193s0f0
    subnets:
    - type: manual
    type: physical
  - id: enp193s0f1
    mac_address: 34:80:0d:03:e7:11
    mtu: 1500
    name: enp193s0f1
    subnets:
    - type: manual
    type: physical
  - id: enp193s0f2
    mac_address: 34:80:0d:03:e7:12
    mtu: 1500
    name: enp193s0f2
    subnets:
    - type: manual
    type: physical
  - id: enp193s0f3
    mac_address: 34:80:0d:03:e7:13
    mtu: 1500
    name: enp193s0f3
    subnets:
    - type: manual
    type: physical
  - address:
    - 172.17.17.105
    search:
    - maas
    type: nameserver
  version: 1

finish: cmd-install/stage-network/builtin/cmd-net-meta: SUCCESS: curtin command net-meta
start: cmd-install/stage-extract/builtin/cmd-extract: curtin command extract
Installing sources: [{'type': 'dd-tgz', 'uri': 'http://172.17.17.105:5248/images/0469827/windows/amd64/generic/windowsserver2022standard/uploaded/root-dd'}] to target at /tmp/tmpeqn8vhm5/target
start: cmd-install/stage-extract/builtin/cmd-extract: acquiring and extracting image from http://172.17.17.105:5248/images/0469827/windows/amd64/generic/windowsserver2022standard/uploaded/root-dd
finish: cmd-install/stage-extract/builtin/cmd-extract: SUCCESS: acquiring and extracting image from http://172.17.17.105:5248/images/0469827/windows/amd64/generic/windowsserver2022standard/uploaded/root-dd
Applying write_files from config.
finish: cmd-install/stage-extract/builtin/cmd-extract: SUCCESS: curtin command extract
start: cmd-install/stage-curthooks/builtin/cmd-curthooks: curtin command curthooks
running /tmp/tmpeqn8vhm5/target/curtin/curtin-hooks
Running command ['/tmp/tmpeqn8vhm5/target/curtin/curtin-hooks'] with allowed return codes [0] (capture=False)
finish: cmd-install/stage-curthooks/builtin/cmd-curthooks: SUCCESS: curtin command curthooks
start: cmd-install/stage-hook/builtin/cmd-hook: curtin command hook
Finalizing /tmp/tmpeqn8vhm5/target
running /tmp/tmpeqn8vhm5/target/curtin/finalize
Running command ['/tmp/tmpeqn8vhm5/target/curtin/finalize'] with allowed return codes [0] (capture=False)
Traceback (most recent call last):
  File "/tmp/tmpeqn8vhm5/target/curtin/finalize.py", line 144, in <module>
    curthooks()
  File "/tmp/tmpeqn8vhm5/target/curtin/finalize.py", line 88, in curthooks
    cloudbaseinit = get_cloudbaseinit_dir(target)
  File "/tmp/tmpeqn8vhm5/target/curtin/finalize.py", line 82, in get_cloudbaseinit_dir
    raise ValueError("Failed to find cloudbase-init install destination")
ValueError: Failed to find cloudbase-init install destination
finish: cmd-install/stage-hook/builtin/cmd-hook: FAIL: curtin command hook
Traceback (most recent call last):
  File "/curtin/curtin/commands/main.py", line 202, in main
    ret = args.func(args)
  File "/curtin/curtin/commands/hook.py", line 26, in hook
    curtin.util.run_hook_if_exists(args.target, "finalize")
  File "/curtin/curtin/util.py", line 984, in run_hook_if_exists
    subp([target_hook])
  File "/curtin/curtin/util.py", line 280, in subp
    return _subp(*args, **kwargs)
  File "/curtin/curtin/util.py", line 144, in _subp
    raise ProcessExecutionError(stdout=out, stderr=err,
curtin.util.ProcessExecutionError: Unexpected error while running command.
Command: ['/tmp/tmpeqn8vhm5/target/curtin/finalize']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
Unexpected error while running command.
Command: ['/tmp/tmpeqn8vhm5/target/curtin/finalize']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
curtin: Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'hook']
Exit code: 3
Reason: -
Stdout: start: cmd-install/stage-hook/builtin/cmd-hook: curtin command hook
        Finalizing /tmp/tmpeqn8vhm5/target
        running /tmp/tmpeqn8vhm5/target/curtin/finalize
        Running command ['/tmp/tmpeqn8vhm5/target/curtin/finalize'] with allowed return codes [0] (capture=False)
        Traceback (most recent call last):
          File "/tmp/tmpeqn8vhm5/target/curtin/finalize.py", line 144, in <module>
            curthooks()
          File "/tmp/tmpeqn8vhm5/target/curtin/finalize.py", line 88, in curthooks
            cloudbaseinit = get_cloudbaseinit_dir(target)
          File "/tmp/tmpeqn8vhm5/target/curtin/finalize.py", line 82, in get_cloudbaseinit_dir
            raise ValueError("Failed to find cloudbase-init install destination")
        ValueError: Failed to find cloudbase-init install destination
        finish: cmd-install/stage-hook/builtin/cmd-hook: FAIL: curtin command hook
        Traceback (most recent call last):
          File "/curtin/curtin/commands/main.py", line 202, in main
            ret = args.func(args)
          File "/curtin/curtin/commands/hook.py", line 26, in hook
            curtin.util.run_hook_if_exists(args.target, "finalize")
          File "/curtin/curtin/util.py", line 984, in run_hook_if_exists
            subp([target_hook])
          File "/curtin/curtin/util.py", line 280, in subp
            return _subp(*args, **kwargs)
          File "/curtin/curtin/util.py", line 144, in _subp
            raise ProcessExecutionError(stdout=out, stderr=err,
        curtin.util.ProcessExecutionError: Unexpected error while running command.
        Command: ['/tmp/tmpeqn8vhm5/target/curtin/finalize']
        Exit code: 1
        Reason: -
        Stdout: ''
        Stderr: ''
        Unexpected error while running command.
        Command: ['/tmp/tmpeqn8vhm5/target/curtin/finalize']
        Exit code: 1
        Reason: -
        Stdout: ''
        Stderr: ''
        
Stderr: ''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants