AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 768377
Accepted
SQL Hammer
SQL Hammer
Asked: 2016-04-06 11:28:22 +0800 CST2016-04-06 11:28:22 +0800 CST 2016-04-06 11:28:22 +0800 CST

Windows Nano Server 2016 CTP4 - 找不到类型 WIM2VHD.WimFile

  • 772

在尝试创建 Windows Nano Server 2016 CTP4 时如何处理此错误的任何想法?

**********************
Windows PowerShell transcript start
Start time: 20160405151609
Username: COMPUTERNAME\Derik
RunAs User: COMPUTERNAME\Derik
Machine: COMPUTERNAME (Microsoft Windows NT 10.0.14295.0)
Host Application: C:\WINDOWS\system32\WindowsPowerShell\v1.0\PowerShell_ISE.exe
Process ID: 15720
PSVersion: 5.1.14295.1000
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.14295.1000
CLRVersion: 4.0.30319.42000
BuildVersion: 10.0.14295.1000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
INFO   : Looking for the requested Windows image in the WIM file
PS>TerminatingError(New-Object): "Cannot find type [WIM2VHD.WimFile]: verify that the assembly containing this type is loaded."
ERROR  : Cannot find type [WIM2VHD.WimFile]: verify that the assembly containing this type is loaded.
INFO   : Log folder is C:\Users\Derik\AppData\Local\Temp\Convert-WindowsImage\3fde98b4-a454-4ce2-86f6-cc15a22cb2b1
INFO   : Done.
**********************
Windows PowerShell transcript end
End time: 20160405151609
**********************

PowerShell代码:

Import-Module 'C:\NanoServerImageGenerator.psm1'

$serverName = "server-name"
$password = ConvertTo-SecureString "strongPassword" -AsPlainText -Force

$VMdir = "E:\VMs\Hyper-V"
$projectDir = Join-Path $VMdir $project
$serverPath = Join-Path $projectDir $servername
$nanoBasePath = Join-Path $serverPath "NanoBase"
$VHDExtension = "vhdx"
$VHDName = "$servername.$VHDExtension"
$VHDPath = Join-Path $serverPath $VHDName

$MediaPath = "\\uncpath\InstallMedia"
$MediaName = "WindowsServer2016_CTP4_X64FRE_EN-US.ISO"
$MediaPath = Join-Path $MediaPath $MediaName

$mountResult = Mount-DiskImage $MediaPath -PassThru
$mountedDriveLetter = ($mountResult | Get-Volume).DriveLetter

$MediaPath = "$mountedDriveLetter`:\"

if(-not (Test-Path $projectDir)) { New-Item $projectDir -ItemType Directory }
if(-not (Test-Path $serverPath)) { New-Item $serverPath -ItemType Directory }
if(-not (Test-Path $nanoBasePath)) { New-Item $nanoBasePath -ItemType Directory }

#<#
New-NanoServerImage `
    -MediaPath $MediaPath `
    -BasePath $nanoBasePath `
    -TargetPath $VHDPath `
    -ComputerName $serverName `
    -OEMDrivers `
    -AdministratorPassword $password `
    -Clustering 
#>

$mountResult | Dismount-DiskImage
windows-server-2016
  • 1 1 个回答
  • 184 Views

1 个回答

  • Voted
  1. Best Answer
    SQL Hammer
    2016-04-06T16:41:37+08:002016-04-06T16:41:37+08:00

    我错过了一个关键步骤。

    cd "C:\NanoServer\"
    .\Convert-WindowsImage.ps1 -WIM 'C:\NanoServer\NanoServer.wim' `
        -VHD 'C:\NanoServer\ClusterNanoServer.vhdx' `
        -VHDFormat VHDX -SizeBytes 10GB -Edition 2 -DiskLayout UEFI
    

    我需要从 Windows Server 2016 安装介质中提供的 NanoServer.wim 文件创建 VHD 或 VHDX 文件。

    • 1

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve