1

I need to make some changes to a Hyper-V storage and I need to modify certain settings of each VM on the host.

The values I need to change are:

  • ConfigurationLocation
  • SnapshotFileLocation
  • SmartPagingFilePath
  • Path

I can change the 2nd and the 3rd with this command:

set-vm -VMName $vm -SmartPagingFilePath $newVMPath -SnapshotFileLocation $newVMPath 

However, there are no apparent switches for the "path" and "configurationlocation" parameters. How do I set them with Powershell?

user2629636
  • 774
  • 5
  • 19
  • 40
  • 1
    Have the files already been moved? The `Move-VM` commandlet lets you relocate these files. – Zoredache Jun 28 '17 at 21:02
  • No the files will not need to move. Hyper-V hosts were accessing them with an SOFS share before, such as \\sofsshare\hyper-v\VMX\, which is the same path as c:\ClusterSharedVolume\share\hyper-v\VMX. If only I could change the path/configurationlocation, they would probably work well. (I will of course test this before production) – user2629636 Jun 29 '17 at 13:17

1 Answers1

1

ConfigurationLocation is a read-only property, it just indicates the current file location. AFAIK there's no way to change ConfigurationLocation and Path properties without actually moving the VM.

You can change the default Hyper-V Virtual Machines folder though, but this is not your case..

B.J.Goodman
  • 454
  • 2
  • 6