VMware Cloud Community
darrelleddy
Enthusiast
Enthusiast
Jump to solution

Cloning Question

I want to snap shot Netware during installation at the point where it starts the GUI part of the install. I want to use this as a "GOLD" clone for additional server installs. Using only ESX 3.x and no VC can I accomplish this?

Darrell

0 Kudos
1 Solution

Accepted Solutions
murreyaw
Enthusiast
Enthusiast
Jump to solution

Paul,

The script worked great for me.

View solution in original post

0 Kudos
6 Replies
esiebert7625
Immortal
Immortal
Jump to solution

You can use vmkfstools for this...

o Login to service console

o The format for vmkfstools –i (import) is source vmdk file first followed by the destination vmdk file

o Type “vmkfstools –i /vmfs/volumes/ESX-Local/templates/2003-template.vmdk /vmfs/volumes/ESX-Local/MyVM/MyVM.vmdk”

o Create a new VM and tell it to use an existing drive and select MyVM.vmdk

o Once the VM is powered on you can then run a utility such as NewSid to change the SIDs on the new VM (Windows only). http://www.microsoft.com/technet/sysinternals/Security/NewSid.mspx

o You can also run Sysprep on the original VM prior to copying it.

0 Kudos
darrelleddy
Enthusiast
Enthusiast
Jump to solution

The VM is still running (It is OES Netware). How can I tell what the snapshot files look like as opposed to regular vm files? Or is there a difference.

0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

Snapshots are -delta files, if you run vmkfstools on the non -flat file (the smaller one) it will automatically bring the 2 files (-flat and non-flat files over)

vmdk files – These are the disk files that are created for each virtual hard drive in your VM. There are 3 different types of files that use the vmdk extension, they are:

*–flat.vmdk file - This is the actual raw disk file that is created for each virtual hard drive. Almost all of a .vmdk file's content is the virtual machine's data, with a small portion allotted to virtual machine overhead. This file will be roughly the same size as your virtual hard drive.

*.vmdk file – This isn't the file containing the raw data anymore. Instead it is the disk descriptor file which describes the size and geometry of the virtual disk file. This file is in text format and contains the name of the –flat.vmdk file for which it is associated with and also the hard drive adapter type, drive sectors, heads and cylinders, etc. One of these files will exist for each virtual hard drive that is assigned to your virtual machine. You can tell which –flat.vmdk file it is associated with by opening the file and looking at the Extent Description field.

*–delta.vmdk file - This is the differential file created when you take a snapshot of a VM (also known as REDO log). When you snapshot a VM it stops writing to the base vmdk and starts writing changes to the snapshot delta file. The snapshot delta will initially be small and then start growing as changes are made to the base vmdk file, The delta file is a bitmap of the changes to the base vmdk thus is can never grow larger than the base vmdk. A delta file will be created for each snapshot that you create for a VM. These files are automatically deleted when the snapshot is deleted or reverted in snapshot manager.

0 Kudos
dsanders
Expert
Expert
Jump to solution

I think you will also need to copy the RAM files as well. I have never tried to copy that between machines. Also I am not sure you actually need a snapshot - you may be able to accomplish what you want by simply suspending the virtual machine.

But to answer you original question - I don't think that VC has a built in function to do what you want.

0 Kudos
pgregg
Contributor
Contributor
Jump to solution

Ok, this may seem weird but I believe it will work (actually I just tried it on a live production server and it worked without having to shutdown the server).

To do this you will need my vmclone.pl script from http://www.pgregg.com/projects/vmclone/ and root access on the ESX CLI.

1. Install vmclone as per instructions in the above url.

2. On the running "Gold" master, take a snapshot at the point where you want your GOLD master.

3. Now in the CLI, cd /vmfs/volumes/storage1

4. Type: vmclone "sourcevm" "newclonevm"

(obviously change the names of the machines to what you have and want).

5. Wait till it finishes - It \*will* display errors as it tries to clone the memory swap file and the "current" disk - but that is ok because we don't care about the current state of the machine.

6. Open up "storage1" in the VI client, browse to the new VM folder and add it to the Inventory.

7. Open up the Snapshot Manager for this VM, and click on the snapshot you took in the source and click GOTO.

8. Voila - your clone just came up in the exact state where you left off (powered up, I might add).

On my test, I tried powering up before the GOTO snapshot and was asked to Keep/Create a new UUID - you should click Create. But note that when you revert to the snapshot the machine will power up with the same network/ip settings (if they are set) on the same box, so you might confuse the original source VM with a network conflict.

Hope this is helpful.

Paul Gregg

murreyaw
Enthusiast
Enthusiast
Jump to solution

Paul,

The script worked great for me.

0 Kudos