is there a way to change VM configurationLocation and Path

I was able to change the VM SnapShotFileLcation, SmartPagingFileLocation
and stuck trying to change the ConfigurationLocation and Path.
Current path and configurationLocation = “server\vhd\vmm.vhdx”
To new path or ConfigurationLocation = “\vhd\vmm.vhdx”

Any idea? Thank you for the help.




Are you talking about Hyper-V or VMware? Because each have their own set of cmdlets. Can you share what you have so far? It will be much easier for someone to help if they see what you have now and if they can also see whatever errors you are encountering.

I’m using Hyper-V

Set-VMHardDiskDrive -VMName vmm91 -ControllerType IDE -ControllerNumber 0 -ControllerLocation 0 -Path ‘\\VHD\vmm91\Virtual Hard Disks\vmm91.vhdx’

set-vm -VMName vmm91 -SmartPagingFilePath ‘\\VHD\vmm91’ -SnapshotFileLocation ‘\\VHD\vmm91’

(get-vm -Name vmm91 | select configurationLocation)



I’m trying to change that to\VHD\vmm91

Thanks for the reply. That is a host-level setting, not a VM-level setting. See:

Get-VMHost | Format-List * # Look for the VirtualMachinePath property

To change that property, you would use Set-VMHost with the -VirtualMachinePath parameter.


That is not it.
It is the virtual machine’s property ConfigurationLocation that I want to change.
not the host one.
Thanks for getting back so soon.

ok. the property is ReadOnly.

ConfigurationLocation’ is a ReadOnly property.

I will try to move the VM and see what happens.

Thank for you help.