New Question

Revision history [back]

click to hide/show revision 1
initial version

Unable to generate Nano Server qemu image

Dears, Kindly need your help on it , I was trying the procedure mentioned to prepare Nano qemu image , I am facing the below error message. Any help please.

PS C:\newISO\cloudbase-init-offline-install> .\NewNanoServerImage.ps1 -IsoPath $isoPath -TargetPath "C:\VHDs\Nano.qcow2" -Platform "KVM" -AdministratorPassword $password -AddCloudbaseInit -MaxSize 800MB Mount-DiskImage : The system cannot find the file specified. At C:\newISO\cloudbase-init-offline-install\NewNanoServerImage.ps1:89 char:19 + $isoMountDrive = (Mount-DiskImage $IsoPath -PassThru | Get-Volume).Dr ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (MSFTDiskImage:ROOT/Microsoft/.../MSFTDiskImage) [Mount-DiskImage], Ci mException + FullyQualifiedErrorId : HRESULT 0x80070002,Mount-DiskImage

Dismount-DiskImage : The system cannot find the file specified. At C:\newISO\cloudbase-init-offline-install\NewNanoServerImage.ps1:103 char:5 + Dismount-DiskImage $IsoPath + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (MSFTDiskImage:ROOT/Microsoft/.../MSFTDiskImage) [Dismount-DiskImage], CimException + FullyQualifiedErrorId : HRESULT 0x80070002,Dismount-DiskImage

Import-Module : The specified module ':\NanoServer\NanoServerImageGenerator.psm1' was not loaded because no valid module file was found in any module directory. At C:\newISO\cloudbase-init-offline-install\NewNanoServerImage.ps1:94 char:5 + Import-Module "${isoNanoServerPath}\NanoServerImageGenerator.psm1 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (:\NanoServer\Na...eGenerator.psm1:String) [Import-Module], FileNot FoundException + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

PS C:\newISO\cloudbase-init-offline-install> .\NewNanoServerImage.ps1

cmdlet NewNanoServerImage.ps1 at command pipeline position 1 Supply values for the following parameters: IsoPath: "C:\ISO\WindowsServer2016TechnicalPreview_4.ISO" TargetPath: "C:\VHDs\Nano.qcow2" AdministratorPassword: ** C:\newISO\cloudbase-init-offline-install\NewNanoServerImage.ps1 : Cannot validate argument on parameter 'TargetPath'. The argument ""C:\VHDs\Nano.qcow2"" does not match the ".(vhdx?|raw|raw.gz|raw.tgz|vmdk|qcow2)$" pattern. Supply an argument that matches ".(vhdx?|raw|raw.gz|raw.tgz|vmdk|qcow2)$" and try the command again. At line:1 char:1 + .\NewNanoServerImage.ps1 + ~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [NewNanoServerImage.ps1], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,NewNanoServerImage.ps1

PS C:\newISO\cloudbase-init-offline-install> .\NewNanoServerImage.ps1

cmdlet NewNanoServerImage.ps1 at command pipeline position 1 Supply values for the following parameters: IsoPath: "C:\ISO\WindowsServer2016TechnicalPreview4.ISO" TargetPath: C:\VHDs\Nano.qcow2 AdministratorPassword: **** Mount-DiskImage : The filename, directory name, or volume label syntax is incorrect. At C:\newISO\cloudbase-init-offline-install\NewNanoServerImage.ps1:89 char:19 + $isoMountDrive = (Mount-DiskImage $IsoPath -PassThru | Get-Volume).Dr ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (MSFTDiskImage:ROOT/Microsoft/.../MSFT_DiskImage) [Mount-DiskImage], CimE xception + FullyQualifiedErrorId : HRESULT 0x8007007b,Mount-DiskImage

Dismount-DiskImage : The filename, directory name, or volume label syntax is incorrect. At C:\newISO\cloudbase-init-offline-install\NewNanoServerImage.ps1:103 char:5 + Dismount-DiskImage $IsoPath + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (MSFTDiskImage:ROOT/Microsoft/.../MSFTDiskImage) [Dismount-DiskImage], C imException + FullyQualifiedErrorId : HRESULT 0x8007007b,Dismount-DiskImage

Import-Module : The specified module ':\NanoServer\NanoServerImageGenerator.psm1' was not loaded because no valid module file was found in any module directory. At C:\newISO\cloudbase-init-offline-install\NewNanoServerImage.ps1:94 char:5 + Import-Module "${isoNanoServerPath}\NanoServerImageGenerator.psm1 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (:\NanoServer\Na...eGenerator.psm1:String) [Import-Module], FileNot FoundException + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

PS C:\newISO\cloudbase-init-offline-install>

Sincere Regards, Aneesh