I have a CentOS7.2 named test-CentOS7_64
, which only have one disk(sda
).
and now I have another VM which also have sda
, I want to use the VM to load the test-CentOS7_64
's disk sda
to sdb
, how to do with that?
First you need to attach the disk itself to the VM. (This is the equivalent of connecting a physical disk to a physical machine.) Go to VM > Settings > Hardware > Add, choose to add an existing virtual disk, and select the corresponding .vmdk
file from the other VM that you want to use. The VM might need to be powered off first. Note that you cannot use the same virtual disk simultaneously with different VMs; VMware Workstation should prevent you from doing this, but if you manage to bypass its protections, you'd end up corrupting your virtual disk. Also, if you no longer want that disk in the original VM, you'd be better off moving the .vmdk
file(s) first and then deleting the original VM.
Then you will need to mount the partitions in the guest OS. How you do this will depend on the guest OS; on Windows, you'll need to open the Disk Management tool and assign a drive letter; on Linux, you'll probably need to edit /etc/fstab
.
test-Cent0S7_64
's disk(sda
), then load by an other CentOS server.