VMware Cloud Community
shannonadams
Contributor
Contributor
Jump to solution

Cloning an existing VM?

Sorry for the novice question. I am very new to VMware and haven't taken a class yet. We are running VMware ESX Server version 3.5.0.

I have existing virtual machine running Windows 2k3 Server. I would like to make a clone of the VM, but give it a different host name and IP address. Will someone please lead me in the right direction on how to do this?

Thanks,

Shannon

0 Kudos
1 Solution

Accepted Solutions
Dave_Mishchenko
Immortal
Immortal
Jump to solution

Hello Shannon, if you have VirtualCenter managing your host, you can shut down the VM, right click on it and select Clone. If you don't then you can use this procedure. You would run the vmkfstools command at the console or via SSH.

Copy a VM

1) Create a new VM with the specs you want and a small HD.

2) Edit the VM and remove the HD.

3) Copy the VMDK over from the source to new folder with vmkfstools -i /source_path/source.vmdk /dest_path/destination.vmdk

4) Edit the VM, add a HD and use an existing VMDK file - select the new VMDK that was created.

5) Power on the VM and run sysprep, etc.

View solution in original post

0 Kudos
7 Replies
Dave_Mishchenko
Immortal
Immortal
Jump to solution

Hello Shannon, if you have VirtualCenter managing your host, you can shut down the VM, right click on it and select Clone. If you don't then you can use this procedure. You would run the vmkfstools command at the console or via SSH.

Copy a VM

1) Create a new VM with the specs you want and a small HD.

2) Edit the VM and remove the HD.

3) Copy the VMDK over from the source to new folder with vmkfstools -i /source_path/source.vmdk /dest_path/destination.vmdk

4) Edit the VM, add a HD and use an existing VMDK file - select the new VMDK that was created.

5) Power on the VM and run sysprep, etc.

0 Kudos
aguacero
Hot Shot
Hot Shot
Jump to solution

Yup I agree with Dave on this matter. It's pretty straight forward and quick using the VI Client.

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!
0 Kudos
shannonadams
Contributor
Contributor
Jump to solution

Another novice question - how do I get to a command line to run these commands. I am using the Virtual Infrastructure PC Client to connect to the server. But, I don't see an option to drop to a command line.

Thanks for the help,

Shannon

0 Kudos
aguacero
Hot Shot
Hot Shot
Jump to solution

You will need a separate product to remotely connect via SSH to your ESX server. You can use a free product called Putty which would enable you for that. However you will need to enable either ssh access for the user "root" and create another user and then just "sudo" for more powerful commands. To enable ssh for root, I would recommend you download Veeam's RootAccess product which would make it easier than using the manual way of changing some files at the command line.

Links:

http://www.putty.org/ (ssh client)

http://www.veeam.com/vmware-esx-server/root_access/ (enanbles ssh access for root and other user)

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!
0 Kudos
Dave_Mishchenko
Immortal
Immortal
Jump to solution

You'll need a SSH client to run this (or you could run the command at the console of the host). For a SSH client, I would suggest Putty - http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

1) Before you connect to host via SSH, create a new login and check the "grant shell access" option when you create the user. You won't be default be able to use the root login to start a SSH session.

2) Start Putty and connect to your host with the new login.

3) Once you have the session established, run this command su -

4) You'll be prompted for a passwword - enter the root password. You'll now be logged into your host with the root login and you'll be able to run the vmkfstools command.

0 Kudos
aguacero
Hot Shot
Hot Shot
Jump to solution

If you have the VI client, you can clone within this "window" instead of going thru the command line. Definiately download the tools I recommended anyway but for you cloning purpose, Just follow Dave's quideline. He provided you two options to clone. One was thru the VI client and the other was thru the command line. The VI client is easier. As always, learn the command line cause it will help you down the line.

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!
shannonadams
Contributor
Contributor
Jump to solution

Thank you both very much. I was able to clone the server using the command line (and Putty).

Best regards,

Shannon

0 Kudos