Welcome to the Community,
It depends on whether the directory is on the same, or a different datastore.
In case of a different datastore you may use Storage Migration (in case it's available), otherwise you can use the vmkfstools command line utility to clone the virtual disk to the new datastore/directory (with the VM powered off), and then replace the VM's virtual disk with the cloned one.
If both, the source and target folder are on the same datstore, it is possible to move the .vmdk files to the new folder using the mv command. In case there's already a virtual disk with the same name in the target folder, use the vmkfstools command to rename the source virtual disk prior to moving it.
If you want/need help, please don't hesitate to ask.
Both are in the same datastore. But if I just move the disk to the new directory where there is the new .vmx, should I edit this file or just change the name of vmdk to the same name as the current vmx?
- datastore1 \ vm-abcd \ vm-abcd.vmdk.
- datastore1 \ vm-abcd \ vm-abcd.vmx
- datastore1 \ vm-abcd-v2 \ vm-abcd-v2.vmx
- Using disk of Older VM
Can you confirm that:
- there's no .vmdk file in the new VM's folder yet
- that there are no active sanpshots for the source (current) virtual disk
In this case:
- shut down the VM
- move both, the <vmname>.vmdk as wellas the <vmname>-flat.vmdk to the new folder
- To rename the virtual disk, run: vmkfstools -E <oldname>.vmdk <newname>.vmdk in the VM's folder
- either edit the .vmx file, and set the virtual disk's name to "vmname.vmdk" (without the path information), or replace the virtual disk from the GUI
- in case you edit the .vmx file, reload the .vmx file after editing it (see VMware Knowledge Base )
Ther is another vmdk in new folder.
When I try to move the machine .vmdk (with VMware Client) to the new directory, an error screen appears:
Error: Error caused by file [datastore1] vm-abcd / vm-abcd-000001.vmdk
And the name of old directory has spaces, as "name-aa - anothername - 12345"
In this case rename the virtual disk in the source folder, before moving it to the target folder.
For folder/files with spaces, simply use quotes.
Also don't use the GUI to move, or rename virtual disks. Do this from the command line, using the commands I mentioned in my previous posts.
Most important: The file name you posted belongs to a snapshot! Ensure that you get rid of the VM's snapshots prior to renaming, or moving the files!
I realized that there was an older VM, being the first created and that gave problem. The second and third VMs were created aiming to use the snapshot of this first one (file "name - anothername -000001.vmdk").
In this first VM there is the snapshot, however, I can not delete it.
Anyway, I'm downloading the original "* .vmdk" and "* flat.vmdk" to my computer and then trying to move again.
This needs some clarification?
How exactly are the VM's linked to each other? Please explain as detailed as possible, and attach .vmsd as well as .vmdk descriptor files.