VMware Cloud Community
kalpeer
Contributor
Contributor

how to move a partition from one vm to another vm

Hi All,

I am very new to VMware. I am trying to learn the partition and mount points.

VMware server : ESX 5.0

I got some document which says about the Logical partition and it is little clear.

Consider that I have VM (say testvm1) and it has multiple partitions (logical volumes). Say I have logical volume and it is mounted at /opt/test. I have powered (shutdown)off this vm.

Now I need to create a new VM (say testvm2) and need to mount my partition (/opt/test) from the existing VM(testvm1) to new VM(testvm2).

Can you please suggest or help me to do this.

All the VM contains Linux operating system. I am using the VSphere client 5.0.

Thanks in Advance,

Kalai

0 Kudos
3 Replies
weinstein5
Immortal
Immortal

Welceome to the Community - In its simplest sense a virtual machine is comprised by a set of files which includes the configuration file (has an extenstion of .vmx), vmkernel swap files (has an extenstion of .vswp) and a virtual disk filw (with an extension of .vmdk). This vmdek is treated by the vm as if it were a physical disk in that you can format it as a single partition (this what is done most commonly) or divide it up into mutliple partions - I am going to assume you are looking to move a virtual disk from one vm to another which is rather very simple - you edit the settings of the VM and simply add disk and point to existing virtual disk -

An important if you plan to still use this disk on the original VM you will have to make a copy of it -

Also I have move this thread to a more aproriate forum - 

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
kalpeer
Contributor
Contributor

This was very helpful. Thanks a lot for your reply.

From your reply I understood the below points.

1)      Select the new vm and open the edit settings window.

2)      Under the hardware tab, I need to click add button and choose the hard disk option in new popup window.

3)      Then I need to select “use existing virtual disk “and then I need to choose my existing partition from my old vm.

Now I have query is it possible to do this with any script (plugin) from ESX server instead of using the VSphere or any client.

Thanks,

Kalai Smiley Happy

0 Kudos
Datto
Expert
Expert

You might look at Ghost 4 Linux (free) to see if you can extract the Linux partition(s) one by one to an FTP server, then bring them back and pour them into a previously created blank partition of the exact same size using G4L.

Datto

PS: Whoops, I must have misunderstood the question by reading too fast.