New Question

Revision history [back]

click to hide/show revision 1
initial version

Building Win2016 VHDx using blog's doc

Hi, We've been testing out the win2016 image generation tool provided in the following blog article: https://cloudbase.it/windows-server-2016-openstack-images/

The code we're currently using is the following:

$ErrorActionPreference = "Stop"
Import-Module ..\WinImageBuilder.psm1
$windowsImagePath = "C:\images\my-windows-image.raw.tgz"
$wimFilePath = "D:\Sources\install.wim"
$image = (Get-WimFileImagesInfo -WimFilePath $wimFilePath)[1]
$switchName = 'VRACK'

    New-WindowsOnlineImage -WimFilePath $wimFilePath -ImageName $image.ImageName `
        -WindowsImagePath $windowsImagePath -Type 'MAAS' -ExtraFeatures @() `
        -SizeBytes 30GB -CpuCores 4 -Memory 4GB -SwitchName $switchName `
        -ProductKey $productKey -DiskLayout 'BIOS' `
        -InstallUpdates:$true -AdministratorPassword 'Pa$$w0rd' `
        -PurgeUpdates:$true -DisableSwap:$true

However, we're still getting the following errors while trying to generate the image file:

PS> .\create-windows-online-cloud-image.ps1
Windows online image generation started at: 2017-06-05 4:15:36 PM
Image generation started at: 2017-06-05 4:15:39 PM

Copying: C:\[SOME-PATH]\windows-openstack-imaging-tools\UnattendResources E:\UnattendResources
Downloading Cloudbase-Init...
WARNING: Exception calling "DownloadFile" with "2" argument(s): "The operation has timed out"
WARNING: Exception calling "DownloadFile" with "2" argument(s): "The operation has timed out"
WARNING: Exception calling "DownloadFile" with "2" argument(s): "The operation has timed out"

Invoke-Command : Exception calling "DownloadFile" with "2" argument(s): "The operation has timed out"
At C:\Users\[SOME-PATH]\windows-openstack-imaging-tools\WinImageBuilder.psm1:56 char:20
+             $res = Invoke-Command -ScriptBlock $command
+                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-Command], MethodInvocationException
    + FullyQualifiedErrorId : WebException,Microsoft.PowerShell.Commands.InvokeCommandCommand

Our external vswitch name is "VRACK". The Windows Server 2016 Trial ISO is mounted @ D:\

Any thoughts what might be wrong ?

Thanks,