Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rsharma0202 opened this issue May 11, 2023 · 1 comment

Comments

@rsharma0202
Copy link

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
@rsharma0202
Copy link
Author

Deployment via PowerShell also not working, is there any change on code which is impacting execution.

image

New-AzResourceGroupDeployment : 4:43:38 PM - Error: Code=InvalidTemplate; Message=Deployment template validation failed: 'The template parameters 'publicIpAddressName,
virtualMachineComputerName, dataDiskResources, publicIpAddressSku, patchMode, osDiskType, networkSecurityGroupRules, networkInterfaceName, virtualNetworkName,
addressPrefixes, publicIpAddressType, dataDisks, subnets, networkSecurityGroupName, subnetName' in the parameters file are not valid; they are not present in the
original template and can therefore not be provided at deployment time. The only supported parameters for this template are 'customRdpPort, virtualMachineName,
virtualMachineSize, virtualMachineGeneration, dataDiskType, dataDiskSize, adminUsername, adminPassword, autoShutdownStatus, autoShutdownTime, autoShutdownTimeZone,
alreadyHaveAWindowsServerLicense'. Please see https://aka.ms/arm-pass-parameter-values for usage details.'.
At line:1 char:1

  • New-AzResourceGroupDeployment -ResourceGroupName $rgname -Name "ASHCI ...
  •   + CategoryInfo          : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
      + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
    
    

New-AzResourceGroupDeployment : The deployment validation failed
At line:1 char:1

  • New-AzResourceGroupDeployment -ResourceGroupName $rgname -Name "ASHCI ...
  •   + CategoryInfo          : CloseError: (:) [New-AzResourceGroupDeployment], InvalidOperationException
      + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant