VMware Communities
csdibiase
Enthusiast
Enthusiast
Jump to solution

Moving a linked clone from a windows host to a linux host

I have an interesting scenario that I'm kind of stuck on:

I have VMWare Workstation 5.5.3 running on a WindowsXP host for creating VM's to deploy to instances of VMWare Server 1.0.3 running on either a Linux server (Ubuntu 7.04 for what it's worth) or a Windows 2003 server.

To save time and disk space I've been making the VM's linked clones of a base image with multiple snap shots for the different software configurations required. The base VM is static and is pre-copied to the VMWare servers, so all I need to copy when deploying a new VM is the small linked clone.

Deploying to Windows hosts is easy since I can maintain the exact same directory structure on both workstation and server machines. Deploying to Linux is throwing me for a loop. I can't find a way to redirect the linked clone VM to it's parent VM on the Linux box. Interestingly enough it looks like the path to the parent vmdk is embedded in the vmdk itself and not stored in the vmx like I would expect.

So short version: Is there a way to repoint a linked clone at it's parent when changing host OS's?[/b]

I would really rather continue to use linked clones and migrate my hosts to headless Linux instances if at all possible.

Reply
0 Kudos
1 Solution

Accepted Solutions
nick_couchman
Immortal
Immortal
Jump to solution

Yes, you'll need to edit the VMDK file and repoint the parent disk to the correct location. There's a Windows-based tool called SparseED (available on Ulli's site sanbarrow.com) that allows you to grab the header part of the VMDK file, edit it, then put it back. You should be able to use this to edit the VMDK file and point it at the correct parent location.

View solution in original post

Reply
0 Kudos
6 Replies
nick_couchman
Immortal
Immortal
Jump to solution

Yes, you'll need to edit the VMDK file and repoint the parent disk to the correct location. There's a Windows-based tool called SparseED (available on Ulli's site sanbarrow.com) that allows you to grab the header part of the VMDK file, edit it, then put it back. You should be able to use this to edit the VMDK file and point it at the correct parent location.

Reply
0 Kudos
oreeh
Immortal
Immortal
Jump to solution

I assume you use monolithicSparse disks.

There's a bug in WS/Server that regarding pathnames in VMDK descriptors.

Be aware that (depending on the VMDK structure) SparseED may not work - so make a backup first.

If it doesn't work - come back and post and we do it another way.

csdibiase
Enthusiast
Enthusiast
Jump to solution

Thanks, sparseED took me in the right direction but couldn't actually export the descriptor though. I wound up using the dsfi/o that sparseED created to manually export and edit the information.

That is a very annoying bug but now that I know I can better deal with it. Thanks to both of you for your help! This gets me past the last hurdle in the long strange fall down the stairs that has been switching hosts to ubuntu from Windows Smiley Happy

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Copy the linked clone and its parent from one host to the other, and when you power on the linked clone, it should tell you that it can't find its parent and ask you where it is. Is that not working?

Reply
0 Kudos
csdibiase
Enthusiast
Enthusiast
Jump to solution

Nope, I simply get an error that the parent vmdk can't be found, I never get an option to specify it's location.

Hacking the reletive path into the child's vmdk did work well though.

Reply
0 Kudos
csdibiase
Enthusiast
Enthusiast
Jump to solution

for the benefit of others here is what I had to do since sparseED didn't seem to actually work:

If SparseED doesn't work it should at least extract and create dsfo.exe and dsfi.exe for extracting and injecting information into the vmdk. If that's the case start by extracting the header with the following command:

dsfo.exe "C:\Machines\MachineToEdit\Windows Server 2003 Standard Edition-000004-cl3.vmdk" 512 800 MachineToEdit.txt[/code]

That will generate a text file with the header information. In that file is at "parentFileNameHint" parameter. Change it from:

parentFileNameHint="C:\Machines\Base\Windows Server 2003 SP1\Windows Server 2003 Standard Edition-000004-cl2-000004.vmdk"[/code]

to:

parentFileNameHint="../Base/Windows Server 2003 SP1/Windows Server 2003 Standard Edition-000004-cl2-000004.vmdk"[/code]

Then run dsfi with the following command to reinject the header information:

dsfi.exe "C:\Machines\MachineToEdit\Windows Server 2003 Standard Edition-000004-cl3.vmdk" 512 800 MachineToEdit.txt[/code]

I did this to 8 VM's and migrated three machines from a Windows host to a Ubuntu host. I was lucky in that I did not need to modify the base images at all, just the children.

Reply
0 Kudos