Maas 2.8 和 Windows 映像

Maas 2.8 和 Windows 映像

我正在 Maas 2.8 上处理 Windows 服务器映像,但遇到了很多问题。我能够将映像上传到 Maas 区域并将其与 Rack 控制器同步,但在部署期间,在第一次启动时,部署失败。

我用来上传图像的命令。

sudo maas $profile boot-resources create name=windows/win2012r2 architecture=amd64/generic filetype=tgz title=windows2012v3 content@=/home/user/windows-win2012r2-amd64.raw.tgz

The image looks available to deploy, this is the output of the image deployment. 

curtin: Installation started. (19.3-26-g82f23e3d-0ubuntu1~18.04.1)
third party drivers not installed or necessary.
start: cmd-install/stage-partitioning/builtin/cmd-block-meta: curtin command block-meta
get_path_to_storage_volume for volume sda
Processing serial 6000c29a8d35a6c739a39d8d0deafcc6 via udev to 6000c29a8d35a6c739a39d8d0deafcc6
lookup_disks found: ['wwn-0x6000c29a8d35a6c739a39d8d0deafcc6', 'scsi-36000c29a8d35a6c739a39d8d0deafcc6']
lookup_disks realpath(wwn-0x6000c29a8d35a6c739a39d8d0deafcc6)=/dev/sda
Running command ['udevadm', 'info', '--query=property', '--export', '/dev/sda'] with allowed return codes [0] (capture=True)
devsync for /dev/sda
Running command ['partprobe', '/dev/sda'] with allowed return codes [0, 1] (capture=False)
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED udevadm_settle(): 0.039
devsync happy - path /dev/sda now exists
return volume path /dev/sda
get_path_to_storage_volume for volume sda-part1
get_path_to_storage_volume for volume sda
Processing serial 6000c29a8d35a6c739a39d8d0deafcc6 via udev to 6000c29a8d35a6c739a39d8d0deafcc6
lookup_disks found: ['wwn-0x6000c29a8d35a6c739a39d8d0deafcc6', 'scsi-36000c29a8d35a6c739a39d8d0deafcc6']
lookup_disks realpath(wwn-0x6000c29a8d35a6c739a39d8d0deafcc6)=/dev/sda
Running command ['udevadm', 'info', '--query=property', '--export', '/dev/sda'] with allowed return codes [0] (capture=True)
devsync for /dev/sda
Running command ['partprobe', '/dev/sda'] with allowed return codes [0, 1] (capture=False)
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED udevadm_settle(): 0.047
devsync happy - path /dev/sda now exists
return volume path /dev/sda
get_path_to_storage_volume for volume sda-part2
get_path_to_storage_volume for volume sda
Processing serial 6000c29a8d35a6c739a39d8d0deafcc6 via udev to 6000c29a8d35a6c739a39d8d0deafcc6
lookup_disks found: ['wwn-0x6000c29a8d35a6c739a39d8d0deafcc6', 'scsi-36000c29a8d35a6c739a39d8d0deafcc6']
lookup_disks realpath(wwn-0x6000c29a8d35a6c739a39d8d0deafcc6)=/dev/sda
Running command ['udevadm', 'info', '--query=property', '--export', '/dev/sda'] with allowed return codes [0] (capture=True)
devsync for /dev/sda
Running command ['partprobe', '/dev/sda'] with allowed return codes [0, 1] (capture=False)
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED udevadm_settle(): 0.046
devsync happy - path /dev/sda now exists
return volume path /dev/sda
Declared block devices: ['/dev/sda']
start: cmd-install/stage-partitioning/builtin/cmd-block-meta/clear-holders: removing previous storage devices
Running command ['mdadm', '--assemble', '--scan', '-v'] with allowed return codes [0, 1, 2] (capture=True)
mdadm assemble scan results:
mdadm: looking for devices for further assembly
mdadm: cannot open device /dev/sr0: No medium found
mdadm: no recogniseable superblock on /dev/sda
mdadm: no recogniseable superblock on /dev/loop0
mdadm: No arrays found in config file or automatically
Running command ['mdadm', '--detail', '--scan', '-v'] with allowed return codes [0, 1] (capture=True)
mdadm detail scan after assemble:
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED udevadm_settle(): 0.013
Running command ['pvscan', '--cache'] with allowed return codes [0] (capture=True)
Running command ['vgscan', '--mknodes', '--cache'] with allowed return codes [0] (capture=True)
Running command ['vgchange', '--activate=y'] with allowed return codes [0] (capture=True)
Loading kernel module bcache via modprobe
Running command ['modprobe', '--use-blacklist', 'bcache'] with allowed return codes [0] (capture=False)
devname '/sys/class/block/sda' had holders: []
Current device storage tree:
sda
Shutdown Plan:
{'level': 0, 'device': '/sys/class/block/sda', 'dev_type': 'disk'}
shutdown running on holder type: 'disk' syspath: '/sys/class/block/sda'
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)
get_blockdev_sector_size: info:
{
 "sda": {
  "ALIGNMENT": "0",
  "DISC-ALN": "0",
  "DISC-GRAN": "0",
  "DISC-MAX": "0",
  "DISC-ZERO": "0",
  "FSTYPE": "",
  "GROUP": "disk",
  "KNAME": "sda",
  "LABEL": "",
  "LOG-SEC": "512",
  "MAJ:MIN": "8:0",
  "MIN-IO": "512",
  "MODE": "brw-rw----",
  "MODEL": "Virtual disk    ",
  "MOUNTPOINT": "",
  "NAME": "sda",
  "OPT-IO": "0",
  "OWNER": "root",
  "PHY-SEC": "512",
  "RM": "0",
  "RO": "0",
  "ROTA": "1",
  "RQ-SIZE": "128",
  "SIZE": "53687091200",
  "STATE": "running",
  "TYPE": "disk",
  "UUID": "",
  "device_path": "/dev/sda"
 }
}
get_blockdev_sector_size: (log=512, phys=512)
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'] with allowed return codes [0] (capture=True)
Checking if /dev/sda is a swap device
Found swap magic: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
wiping superblock on /dev/sda
wiping /dev/sda attempt 1/4
wiping 1M on /dev/sda at offsets [0, -1048576]
successfully wiped device /dev/sda on attempt 1/4
devname '/sys/class/block/sda' had holders: []
finish: cmd-install/stage-partitioning/builtin/cmd-block-meta/clear-holders: SUCCESS: removing previous storage devices
blockmeta: detected dd-images, using mode=simple
Processing serial 6000c29a8d35a6c739a39d8d0deafcc6 via udev to 6000c29a8d35a6c739a39d8d0deafcc6
lookup_disks found: ['wwn-0x6000c29a8d35a6c739a39d8d0deafcc6', 'scsi-36000c29a8d35a6c739a39d8d0deafcc6']
lookup_disks realpath(wwn-0x6000c29a8d35a6c739a39d8d0deafcc6)=/dev/sda
Running command ['udevadm', 'info', '--query=property', '--export', '/dev/sda'] with allowed return codes [0] (capture=True)
installing in 'custom' mode to 'sda'
writing image to disk {'type': 'dd-tgz', 'uri': 'http://172.20.0.2:5248/images/windows/amd64/generic/win2012r2/uploaded/root-dd'}, sda
Running command ['sh', '-c', 'wget "$1" --progress=dot:mega -O - |tar -xOzf -| dd bs=4M of="$2"', '--', 'http://172.20.0.2:5248/images/windows/amd64/generic/win2012r2/uploaded/root-dd', '/dev/sda'] with allowed return codes [0] (capture=False)
--2020-07-16 15:28:43--  http://172.20.0.2:5248/images/windows/amd64/generic/win2012r2/uploaded/root-dd
Connecting to 172.20.0.2:5248... connected.
HTTP request sent, awaiting response... 404 Not Found
2020-07-16 15:28:43 ERROR 404: Not Found.
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
0+0 records in
0+0 records out
0 bytes copied, 0.0767571 s, 0.0 kB/s
Running command ['partprobe', '/dev/sda'] with allowed return codes [0] (capture=False)
Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
TIMED udevadm_settle(): 0.033
Searching for filesystem on ['sda'] containing one of: ['curtin', 'system-data/var/lib/snapd']
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)
TIMED BLOCK_META: 1.374
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 84, in block_meta
    return meta_simple(args)
  File "/curtin/curtin/commands/block_meta.py", line 1886, in meta_simple
    rootdev = write_image_to_disk(dd_images[0], devname)
  File "/curtin/curtin/commands/block_meta.py", line 127, in write_image_to_disk
    return block.get_root_device([devname], paths=paths)
  File "/curtin/curtin/block/__init__.py", line 587, in get_root_device
    (dev, paths))
ValueError: Did not find any filesystem on ['sda'] that contained one of ['curtin', 'system-data/var/lib/snapd']
Did not find any filesystem on ['sda'] that contained one of ['curtin', 'system-data/var/lib/snapd']
curtin: Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'custom']
Exit code: 3
Reason: -
Stdout: start: cmd-install/stage-partitioning/builtin/cmd-block-meta: curtin command block-meta
        get_path_to_storage_volume for volume sda
        Processing serial 6000c29a8d35a6c739a39d8d0deafcc6 via udev to 6000c29a8d35a6c739a39d8d0deafcc6
        lookup_disks found: ['wwn-0x6000c29a8d35a6c739a39d8d0deafcc6', 'scsi-36000c29a8d35a6c739a39d8d0deafcc6']
        lookup_disks realpath(wwn-0x6000c29a8d35a6c739a39d8d0deafcc6)=/dev/sda
        Running command ['udevadm', 'info', '--query=property', '--export', '/dev/sda'] with allowed return codes [0] (capture=True)
        devsync for /dev/sda
        Running command ['partprobe', '/dev/sda'] with allowed return codes [0, 1] (capture=False)
        Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
        TIMED udevadm_settle(): 0.039
        devsync happy - path /dev/sda now exists
        return volume path /dev/sda
        get_path_to_storage_volume for volume sda-part1
        get_path_to_storage_volume for volume sda
        Processing serial 6000c29a8d35a6c739a39d8d0deafcc6 via udev to 6000c29a8d35a6c739a39d8d0deafcc6
        lookup_disks found: ['wwn-0x6000c29a8d35a6c739a39d8d0deafcc6', 'scsi-36000c29a8d35a6c739a39d8d0deafcc6']
        lookup_disks realpath(wwn-0x6000c29a8d35a6c739a39d8d0deafcc6)=/dev/sda
        Running command ['udevadm', 'info', '--query=property', '--export', '/dev/sda'] with allowed return codes [0] (capture=True)
        devsync for /dev/sda
        Running command ['partprobe', '/dev/sda'] with allowed return codes [0, 1] (capture=False)
        Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
        TIMED udevadm_settle(): 0.047
        devsync happy - path /dev/sda now exists
        return volume path /dev/sda
        get_path_to_storage_volume for volume sda-part2
        get_path_to_storage_volume for volume sda
        Processing serial 6000c29a8d35a6c739a39d8d0deafcc6 via udev to 6000c29a8d35a6c739a39d8d0deafcc6
        lookup_disks found: ['wwn-0x6000c29a8d35a6c739a39d8d0deafcc6', 'scsi-36000c29a8d35a6c739a39d8d0deafcc6']
        lookup_disks realpath(wwn-0x6000c29a8d35a6c739a39d8d0deafcc6)=/dev/sda
        Running command ['udevadm', 'info', '--query=property', '--export', '/dev/sda'] with allowed return codes [0] (capture=True)
        devsync for /dev/sda
        Running command ['partprobe', '/dev/sda'] with allowed return codes [0, 1] (capture=False)
        Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
        TIMED udevadm_settle(): 0.046
        devsync happy - path /dev/sda now exists
        return volume path /dev/sda
        Declared block devices: ['/dev/sda']
        start: cmd-install/stage-partitioning/builtin/cmd-block-meta/clear-holders: removing previous storage devices
        Running command ['mdadm', '--assemble', '--scan', '-v'] with allowed return codes [0, 1, 2] (capture=True)
        mdadm assemble scan results:
        
        mdadm: looking for devices for further assembly
        mdadm: cannot open device /dev/sr0: No medium found
        mdadm: no recogniseable superblock on /dev/sda
        mdadm: no recogniseable superblock on /dev/loop0
        mdadm: No arrays found in config file or automatically
        
        Running command ['mdadm', '--detail', '--scan', '-v'] with allowed return codes [0, 1] (capture=True)
        mdadm detail scan after assemble:
        
        
        Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
        TIMED udevadm_settle(): 0.013
        Running command ['pvscan', '--cache'] with allowed return codes [0] (capture=True)
        Running command ['vgscan', '--mknodes', '--cache'] with allowed return codes [0] (capture=True)
        Running command ['vgchange', '--activate=y'] with allowed return codes [0] (capture=True)
        Loading kernel module bcache via modprobe
        Running command ['modprobe', '--use-blacklist', 'bcache'] with allowed return codes [0] (capture=False)
        devname '/sys/class/block/sda' had holders: []
        Current device storage tree:
        sda
        Shutdown Plan:
        {'level': 0, 'device': '/sys/class/block/sda', 'dev_type': 'disk'}
        shutdown running on holder type: 'disk' syspath: '/sys/class/block/sda'
        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)
        get_blockdev_sector_size: info:
        {
         "sda": {
          "ALIGNMENT": "0",
          "DISC-ALN": "0",
          "DISC-GRAN": "0",
          "DISC-MAX": "0",
          "DISC-ZERO": "0",
          "FSTYPE": "",
          "GROUP": "disk",
          "KNAME": "sda",
          "LABEL": "",
          "LOG-SEC": "512",
          "MAJ:MIN": "8:0",
          "MIN-IO": "512",
          "MODE": "brw-rw----",
          "MODEL": "Virtual disk    ",
          "MOUNTPOINT": "",
          "NAME": "sda",
          "OPT-IO": "0",
          "OWNER": "root",
          "PHY-SEC": "512",
          "RM": "0",
          "RO": "0",
          "ROTA": "1",
          "RQ-SIZE": "128",
          "SIZE": "53687091200",
          "STATE": "running",
          "TYPE": "disk",
          "UUID": "",
          "device_path": "/dev/sda"
         }
        }
        get_blockdev_sector_size: (log=512, phys=512)
        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'] with allowed return codes [0] (capture=True)
        Checking if /dev/sda is a swap device
        Found swap magic: b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
        wiping superblock on /dev/sda
        wiping /dev/sda attempt 1/4
        wiping 1M on /dev/sda at offsets [0, -1048576]
        successfully wiped device /dev/sda on attempt 1/4
        devname '/sys/class/block/sda' had holders: []
        finish: cmd-install/stage-partitioning/builtin/cmd-block-meta/clear-holders: SUCCESS: removing previous storage devices
        blockmeta: detected dd-images, using mode=simple
        Processing serial 6000c29a8d35a6c739a39d8d0deafcc6 via udev to 6000c29a8d35a6c739a39d8d0deafcc6
        lookup_disks found: ['wwn-0x6000c29a8d35a6c739a39d8d0deafcc6', 'scsi-36000c29a8d35a6c739a39d8d0deafcc6']
        lookup_disks realpath(wwn-0x6000c29a8d35a6c739a39d8d0deafcc6)=/dev/sda
        Running command ['udevadm', 'info', '--query=property', '--export', '/dev/sda'] with allowed return codes [0] (capture=True)
        installing in 'custom' mode to 'sda'
        writing image to disk {'type': 'dd-tgz', 'uri': 'http://172.20.0.2:5248/images/windows/amd64/generic/win2012r2/uploaded/root-dd'}, sda
        Running command ['sh', '-c', 'wget "$1" --progress=dot:mega -O - |tar -xOzf -| dd bs=4M of="$2"', '--', 'http://172.20.0.2:5248/images/windows/amd64/generic/win2012r2/uploaded/root-dd', '/dev/sda'] with allowed return codes [0] (capture=False)
        --2020-07-16 15:28:43--  http://172.20.0.2:5248/images/windows/amd64/generic/win2012r2/uploaded/root-dd
        Connecting to 172.20.0.2:5248... connected.
        HTTP request sent, awaiting response... 404 Not Found
        2020-07-16 15:28:43 ERROR 404: Not Found.
        
        
        gzip: stdin: unexpected end of file
        tar: Child returned status 1
        tar: Error is not recoverable: exiting now
        0+0 records in
        0+0 records out
        0 bytes copied, 0.0767571 s, 0.0 kB/s
        Running command ['partprobe', '/dev/sda'] with allowed return codes [0] (capture=False)
        Running command ['udevadm', 'settle'] with allowed return codes [0] (capture=False)
        TIMED udevadm_settle(): 0.033
        Searching for filesystem on ['sda'] containing one of: ['curtin', 'system-data/var/lib/snapd']
        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)
        TIMED BLOCK_META: 1.374
        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 84, in block_meta
            return meta_simple(args)
          File "/curtin/curtin/commands/block_meta.py", line 1886, in meta_simple
            rootdev = write_image_to_disk(dd_images[0], devname)
          File "/curtin/curtin/commands/block_meta.py", line 127, in write_image_to_disk
            return block.get_root_device([devname], paths=paths)
          File "/curtin/curtin/block/__init__.py", line 587, in get_root_device
            (dev, paths))
        ValueError: Did not find any filesystem on ['sda'] that contained one of ['curtin', 'system-data/var/lib/snapd']
        Did not find any filesystem on ['sda'] that contained one of ['curtin', 'system-data/var/lib/snapd']
        
Stderr: ''

答案1

确保图像中安装了 curtin 钩子,并且 maas 中的图像上传如下:

maas root boot-resources create name=windows/win2012r2 architecture=amd64/generic filetype=ddtgz content@=/home/maasctrl/windows-win2012r2-amd64-root-dd

(请注意,您必须使用特定的名称和文件类型才能使其工作)。

参考:使用 MaaS 部署 WinSrv2019 映像时出现问题

相关内容