cloudbase / windows-imaging-tools

Tools to automate the creation of a Windows image for OpenStack, supporting KVM, Hyper-V, ESXi and more.
Apache License 2.0
680 stars 227 forks source link

Failed to find cloudbase-init install destination #362

Open pankajmalhotra opened 3 years ago

pankajmalhotra commented 3 years ago

Trying to install windows 2012R2 [MAAS], getting following error:

============ 32212254720 bytes (32 GB, 30 GiB) copied, 196.804 s, 164 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 356515840 blocks) or continue with the current setting? Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False) TIMED udevadm_settle(): 0.152 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) Running command ['mount', '/dev/sda1', '/tmp/tmp4dffuaac'] with allowed return codes [0] (capture=False) mount: /tmp/tmp4dffuaac: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error. Running command ['mount', '/dev/sda2', '/tmp/tmp4dffuaac'] with allowed return codes [0] (capture=False) Running command ['umount', '/tmp/tmp4dffuaac'] with allowed return codes [0] (capture=False) Running command ['mount', '/dev/sda3', '/tmp/tmp4dffuaac'] with allowed return codes [0] (capture=False) mount: /tmp/tmp4dffuaac: wrong fs type, bad option, bad superblock on /dev/sda3, missing codepage or helper program, or other error. Running command ['mount', '/dev/sda4', '/tmp/tmp4dffuaac'] with allowed return codes [0] (capture=False) Found path 'curtin' on device '/dev/sda4' Running command ['umount', '/tmp/tmp4dffuaac'] with allowed return codes [0] (capture=False) Running command ['mount', '/dev/sda4', '/tmp/tmpzjg1zprx/target'] with allowed return codes [0] (capture=False) TIMED BLOCK_META: 202.456 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/tmpzjg1zprx/state/network_config with network config: network: config:

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://105.133.7.80:5248/images/windows/amd64/generic/win2012hvr2/uploaded/root-dd'}] to target at /tmp/tmpzjg1zprx/target start: cmd-install/stage-extract/builtin/cmd-extract: acquiring and extracting image from http://105.133.7.80:5248/images/windows/amd64/generic/win2012hvr2/uploaded/root-dd finish: cmd-install/stage-extract/builtin/cmd-extract: SUCCESS: acquiring and extracting image from http://105.133.7.80:5248/images/windows/amd64/generic/win2012hvr2/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/tmpzjg1zprx/target/curtin/curtin-hooks Running command ['/tmp/tmpzjg1zprx/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/tmpzjg1zprx/target running /tmp/tmpzjg1zprx/target/curtin/finalize Running command ['/tmp/tmpzjg1zprx/target/curtin/finalize'] with allowed return codes [0] (capture=False) Traceback (most recent call last): File "/tmp/tmpzjg1zprx/target/curtin/finalize.py", line 141, in curthooks() File "/tmp/tmpzjg1zprx/target/curtin/finalize.py", line 88, in curthooks cloudbaseinit = get_cloudbaseinit_dir(target) File "/tmp/tmpzjg1zprx/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 900, in run_hook_if_exists subp([target_hook]) File "/curtin/curtin/util.py", line 275, in subp return _subp(*args, *kwargs) File "/curtin/curtin/util.py", line 139, in _subp raise ProcessExecutionError(stdout=out, stderr=err, curtin.util.ProcessExecutionError: Unexpected error while running command. Command: ['/tmp/tmpzjg1zprx/target/curtin/finalize'] Exit code: 1 Reason: - Stdout: '' Stderr: '' Unexpected error while running command. Command: ['/tmp/tmpzjg1zprx/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/tmpzjg1zprx/target running /tmp/tmpzjg1zprx/target/curtin/finalize Running command ['/tmp/tmpzjg1zprx/target/curtin/finalize'] with allowed return codes [0] (capture=False) Traceback (most recent call last): File "/tmp/tmpzjg1zprx/target/curtin/finalize.py", line 141, in curthooks() File "/tmp/tmpzjg1zprx/target/curtin/finalize.py", line 88, in curthooks cloudbaseinit = get_cloudbaseinit_dir(target) File "/tmp/tmpzjg1zprx/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 900, in run_hook_if_exists subp([target_hook]) File "/curtin/curtin/util.py", line 275, in subp return _subp(args, **kwargs) File "/curtin/curtin/util.py", line 139, in _subp raise ProcessExecutionError(stdout=out, stderr=err, curtin.util.ProcessExecutionError: Unexpected error while running command. Command: ['/tmp/tmpzjg1zprx/target/curtin/finalize'] Exit code: 1 Reason: - Stdout: '' Stderr: '' Unexpected error while running command. Command: ['/tmp/tmpzjg1zprx/target/curtin/finalize'] Exit code: 1 Reason: - Stdout: '' Stderr: ''

Stderr: ''

pankajmalhotra commented 3 years ago

@ader1990,

Is there anything special needs to be done so that cloudbase-init get installed on windows iso image?

Steps which I am doing,

  1. Download & mount iso windows image on windows 2016 server where Hyper-V is enabled.
  2. Execute New-WindowsCloudImage -ConfigFilePath $configFilePath.
  3. Once image is generated, then deploy it on VM.

Let me know if I am missing anything? Thanks in advance