This project is read-only.
1
Vote

New-VM creating with Powershell :Failed to add ISO Disk Image located at remote cif share

description

I using hyperV library to create a VM with iso located at remote cif share.
Example:
$New_VM_Name = "REMOTEVM105"
$New_VHD_Name = "c:\VHDs\$($New_VM_Name).VHD"
$Target_Host = "TESTHOST"
$myVM = (New-VM $New_VM_Name -Server $Target_Host)
 
Set-VMMemory $myVM 2048MB
 
Set-VMCPUCount $myVM 2
Add-VMDrive $myVM 0 0
New-VHD $New_VHD_Name 20GB -wait -Server $Target_Host
Add-VMDisk $myVM 0 0 $New_VHD_Name
Add-VMDRIVE $myVM 1 0 -dvd
Add-VMDisk $myVM 1 0 "\172.27.17.1\share\images\win\preboot\test.iso" -dvd
 
Add-VMNIC $myVM -virtualSwitch "Local Area Connection2"
 
Start-VM $myVM
$myVM
 

Error:

User account does not have permission required to open attachment '\172.27.17.1\share\images\win\preboot\test.iso'. Error: 'General access denied error' (0x80070005). (Virtual machine ID 726F0BE6-DC9A-4789-98
2D-E7EEE7ACC693)
 
Please suggest a best way to fix this issue

comments