Skip to content

Cannot create a file when that file already exists. Error: 0x800700b7 #40

@rsharma0202

Description

@rsharma0202

Hello,
I'm running this script as instructed and getting below error while trying to initiate offline installation.
Having issue on code line 545.

Write-Verbose "Performing offline installation of Hyper-V to path $path"
Install-WindowsFeature -Vhd $path -Name Hyper-V, RSAT-Hyper-V-Tools, Hyper-V-Powershell -Confirm:$false | Out-Null
Start-Sleep -Seconds 20


Install-WindowsFeature : The request to list features available on the specified server failed.
The image could not be mounted.
Cannot create a file when that file already exists. Error: 0x800700b7
At C:\AzHCI_Sandbox\AzSHCISandbox-main\New-AzSHCISandbox.ps1:545 char:9

  •     Install-WindowsFeature -Vhd $path -Name Hyper-V, RSAT-Hyper-V ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (@{Vhd=\AzSHCIH...Name=localhost}:PSObject) [Install-WindowsFeature],
      DeploymentProviderException
    • FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Mount_Image,Microsoft.Windows.ServerManager.Commands.AddWindows
      FeatureCommand

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions