is there a way to change VM configurationLocation and Path

This topic contains 5 replies, has 2 voices, and was last updated by Profile photo of Sam V Sam V 4 years, 1 month ago.

  • Author
    Posts
  • #6836
    Profile photo of Sam V
    Sam V
    Participant

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

    Any idea? Thank you for the help.

     

    Sam

     

  • #6864
    Profile photo of Poshoholic
    Poshoholic
    Member

    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.

  • #6947
    Profile photo of Sam V
    Sam V
    Participant

    I'm using Hyper-V

    Set-VMHardDiskDrive -VMName vmm91 -ControllerType IDE -ControllerNumber 0 -ControllerLocation 0 -Path '\\fcs91.contoso.com\VHD\vmm91\Virtual Hard Disks\vmm91.vhdx'

    set-vm -VMName vmm91 -SmartPagingFilePath '\\fcs91.contoso.com\VHD\vmm91' -SnapshotFileLocation '\\fcs91.contoso.com\VHD\vmm91'

    (get-vm -Name vmm91 | select configurationLocation)

    ConfigurationLocation
    ———————
    \\fcs91\VHD\vmm91

    I'm trying to change that to fcs91.contoso.com\VHD\vmm91

  • #6953
    Profile photo of Poshoholic
    Poshoholic
    Member

    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.

  • #6967
    Profile photo of Sam V
    Sam V
    Participant

    Hi

    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.

  • #6968
    Profile photo of Sam V
    Sam V
    Participant

    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.

You must be logged in to reply to this topic.