VMware Cloud Community
mbrkic
Hot Shot
Hot Shot

Linux guest customization - CD left connected

Hi,

I noticed recently that when you deploy a vApp with a Linux VM (CentOS 6.2 for example) and use customization the CD stays connected to customize-guest.iso in the VM's directory (same place as the vmx file) once the VM is done successfully powering on and customization is sucessful (as evidenced by change of IP and hostname for example).

From within the VM the user can mount this CD and access the customization scripts etc. I don't think this is a big problem, as there is no sensitive information in there as far as I can tell, but it is not the expected behaviour. I would expect all the customization related stuff to be cleaned up and disconnected once it is completed (following best practice to keed CD not connected Smiley Happy) .

Now here is where it becomes interesting. Consider the following scenario:

i) deploy a vApp from a catalog template with a Linux VM that gets customized (call this vApp-orig). Once powered on, the VM in vApp-orig will have the customize-guest.iso connected.
ii) capture vApp-orig into a catalog as a 'Make identical copy' template (call this vApp-catalog). Note that the VM in vApp-catalog will still have CD connected to customize-guest.iso in the vApp-orig directory.
iii) deploy a vApp from vApp-catalog template (call this vApp-running). Note that the VM in vApp-running will have its CD connected to the customize-guest.iso in its parent's parent's (grandparent's?!) directory. This could even be on a different datastore!
iv) If you now delete the grandparent you will be left with a directory with just customize-guest.iso in it (and possibly delta files if you are using fast provisioning).

Note that if you open the console to the VM and connect the CDROM to 'None' the CDROM gets disconnected and set to 'Client Device'.

Anyone else noticed this strange behaviour?
Comments?

Cheers,
Milos

8 Replies
richdenis1
Contributor
Contributor

I am not sure if what I am seeing is the same as you but I have hundreds of folders left over from machines that we start and stop.  I am just now trying to figure out why it is happening.  Do you know of an easy way to delete these?  There are so many that the datastore browser seems to be choking.

Thanks

Rich

0 Kudos
mbrkic
Hot Shot
Hot Shot

Hi,

what is inside these folders, anything? Make sure that you are not deleting something that is still being used by another VM somehow.

You can always log-in to the CLI on the ESXi (either at the console or through SSH after you start it) and go to /vmfs/volumes find your datastore and use the rm command with the appropriate switches to do it. Be VERY CAREFUL though, especially if you are not familiar with UNIX/Linux command line. Be aware of spaces in your names and what that might do, for example. Also, always test with something like ls first to make sure that you are only selecting the files/directories that you want. Once the files are removed there is no getting them back other than from your backups!

If you post more info, I can provide you with more specific help.

Cheers,

Milos

0 Kudos
richdenis1
Contributor
Contributor

My folders all have a customize-guest.iso file in them.  Nothing else.  I ended up going in using scp and finding folders with only the one file in them and deleted them.

I am monitoring the folder again to see if the files are still being left after an upgrade to vCloud 5.1

0 Kudos
acruizu
Enthusiast
Enthusiast

I'm having exactly the same problem, I have a bunch of folders with the same iso inside.

0 Kudos
aneverov
VMware Employee
VMware Employee

Hi,

It should be fixed in 5.1.x. The problem was with customize-guest.iso and

thumbnail.jpg.bak.

I'm not aware of any workaround other than writing some script outside VCD which will go over all folders and delete those files.

/Andrii

/* Please remember to mark answer as 'helpful' or 'correct' such that other users know it can be used and people focusing on ‘unanswered’ questions can skip it. */
0 Kudos
maxel
Enthusiast
Enthusiast

same problen here, but if we need to Storage vMotion with this vApp, what should we do? Copy this iso to the new datastore/folder of the vApp or simply disconnect the CD-ROM and then storage vmotion? If we make guest customisation again, will this iso created on the new datastore ? Or will we get problems?

0 Kudos
aneverov
VMware Employee
VMware Employee

In the ideal world the Storage vMotion should have taken care of that, but, as far as I can tell, the two were not designed to work together.

The iso will be recreated next time guest customization will run. Also the iso is actually not needed in most cases - it's used only for Solaris, WinNT and it was mistakenly copied for some other OSes which was fixed at some point. All that is not even supported in VCD 5.5.x, so there will be no guest customization iso going forward.

So, the only real question is if the VM will be able to start (if say guest customization won't trigger) in case it was Storage vMotioned without the iso. That has to be tried out. Otherwise, disconnecting or copying the iso should work fine.

Best Regards,

Andrii

/* Please remember to mark answer as 'helpful' or 'correct' such that other users know it can be used and people focusing on ‘unanswered’ questions can skip it. */
mbrkic
Hot Shot
Hot Shot

We have been ejecting the CD (from within vCloud Director whenever possible) when migrating VMs and have had no issues with it. We do not typically re-customize the VMs that are moved though, so if that is a requirement you should do a quick test...

Cheers,

Milos

0 Kudos