VMware vSphere

 View Only
  • 1.  Edit vmx file after scp vm to new location

    Posted Jun 14, 2020 05:40 AM

    Hello,

    Can anyone tell me if after scp vm files to a new location do I need to edit the vmx file to correct the volume information?  We used scp and moved the multiple vmdk files so we could leverage multiple hosts and get faster performance than svmotion.  We were moving the vm from old infrastructure to new and the old had 1G nics and svmotion overhead was slowing it down further.  So we split up the vmdks and used scp to copy and see about 3x performance which will meet our deadline. 
    The server has 13 disks attached so I think the only way the server will know which is which is to edit the vmx file.

    There are several pieces of information about this online and none mention editing the vmx and even in our testing we did not have to edit but this server has more disks and we didn't have an exact copy to test with. 

    Thanks in advance



  • 2.  RE: Edit vmx file after scp vm to new location

    Posted Jun 14, 2020 08:12 AM

    Hi, you dont need to edit the vmx.

    You are doing with scp the same action as downloading the vm from the datastore and importing it to another one. Just import the VM and thats it.

    But maybe, vMotion is still the better option if you have it. Maybe doing some changes and optimization you will be able to have better performance moving the vm.

    Take a look at this:

    Networking Best Practices for vSphere vMotion

    VMware Knowledge Base  (this is an old kb but works the same)

    Multi NIC vMotion is a cool feature tu use and even more if you have 1gb pNICs.



  • 3.  RE: Edit vmx file after scp vm to new location

    Posted Jun 14, 2020 08:18 AM

    Did you change or rename the VM directory when you paste all the VM's files to the destination?!

    Via whatever method you copy the VM files, you can simply edit the VMX file, while you should be aware of the .vmx structure because it considers that all VMs file reside in its current directory. (until you add for example a new VMDK from another location and in this situation, the VMX file holds the file's address) I think it's better to migrate them if you have the vCenter, or unregister the VM, copy/move all VM files and register it again, if you have the standalone ESXi hosts.



  • 4.  RE: Edit vmx file after scp vm to new location

    Posted Jun 14, 2020 08:30 AM

    If all vDisks stored in the $HOME_DIR than they use relative paths in the *.vmx which means you dont need to edit anything. If you store one or more vDisk in different Datastore than there are absolute paths which means you need to edit.

    Same goes to the Swap or Snaps. If you go with the defaults all is stored on one directory and relative paths.

    Regards,
    Joerg