VMware Cloud Community
jeffko
Contributor
Contributor
Jump to solution

Difference disks with ESX 3.0.1 (multiple redo logs with same base disk)

Hey all,

I am looking for some advice on what to do about my training environment since I've upgraded to 3.0.1. I have been using difference disks for all my training vm's for a few years. Difference disks have a base disk and then a redo log off that main disk. We copy that redo log file out several times and create several vm's that point to each redo log. Then each student has their own copy of the original disk. It made rolling out student workstations a snap.

Now I am looking for advice on how I can get that same functionality out of ESX 3.0.1.

I saw an old post from Jmills about 2.5.3.

Any ideas would be appreciated.

Jeff

0 Kudos
24 Replies
jeffko
Contributor
Contributor
Jump to solution

Nope all the magic is in the snapshot. Otherwise you get exactly what you are seeing. If you make a snapshot you can copy that snapshot many times over and it will point at the same parent disk. If you have snapshots linked together you will have this issue also. All snapshots have to be at the same level otherwise the newer one will make the older snapshots invalid.

let me try to diagram this...

basedisk.vmdk

\|

\|----- snap.vmdk

\|----- copy of snap1.vmdk <snap1.vmx>

\|----- copy of snap2.vmdk <snap2.vmx>

\|----- copy of snap3.vmdk <snap3.vmx>

\|----- copy of snap4.vmdk <snap4.vmx>

Does that make sense?

So how you pull this off is by changing the name of your copies of your first snapshot. Then you change the name of the scsi0:0 disk in your vmx file and change the name of the disk in the vmdk file.

That is the logic I built into the script. If there is some part of it that doesn't make sense let me know and I'll explain.

Jeff

0 Kudos
zorong
Contributor
Contributor
Jump to solution

Thanks Jeff, makes complete sense -- and so helpful to know! Snapshots your style will definitely be my course of action then. Just out of curiosity, what's the size difference between the original vmdk and the snapshots'?

0 Kudos
jeffko
Contributor
Contributor
Jump to solution

A few other things worth noting. I am having a problem with DRS. On some of the vm's it will come up with the error cannot start vm because a file is in use. This is when the machine has been moved to another host before it was turned on. Currently my workaround is to set DRS to manual, set the vm to start on the original host that it started on, power it up and then vmotion it to another host.

Also the script needs some work to do a better job of handling different virtual switches.

Finally you may notice in the script that it sets the compname variable. We use the vmtools to check the value of this and use that value in a script to change the name to that value. If you don't need it, you can remove it.

Just an FYI.

Jeff

0 Kudos
jeffko
Contributor
Contributor
Jump to solution

The snapshots start at 16MB and then grow in 16MB increments. They don't shrink down. So this is a good fit for very uniform short term things like training servers or test environments. I wouldn't try to roll this out as my standard base image with all my future vm's based off it. It will grow to be very unweildly. It is only for creating very uniform machines and having the flexibility of periodically updating the master file and then being able to quickly roll out the changes to the master image.

Also Don't try to power on 20 VM's at the same time since they are all on the same LUN. You will have timeout problems and who knows what errors you'll get.

Let me know if you have any questions,

Jeff

0 Kudos
aaragao
Contributor
Contributor
Jump to solution

Hi,

Can you provide na updated script ?

Thanks.

0 Kudos