VMware Cloud Community
max2479
Enthusiast
Enthusiast

vMotion issues

Hi All,

had issues migrating some of the VMs. set the ESXi to maintenance mode. and noticed some of the VMs would not migrate. Tried it manually and got the message on most that vmware tools are installing and cdrom pointed to ISO image on the local ESXi partition. The VM has Datastore ISO file radio button checked pointed to local iso image.Yes, this makes sense to me. Here is what doesn't. I cannot edit virtual machine and the controls are grayed out. all of those were linux guest. i used eject tool and it reset to warning and vMotion worked. So a few questions:

1. does this mean that HA will not work in this state? if yes, any workaround?

2. is there SNMP OID or PowerShell that would let me know if this condition exist?

> if you found this or any other answer useful please consider allocating points for helpful or correct answers <
Tags (2)
Reply
0 Kudos
7 Replies
Pradeepadapa43
Enthusiast
Enthusiast

HA will not function if the vm has any media attached to it , all media must be disconnected before vmotion can kick off.

Pradeep Adapa
MyuFox
Enthusiast
Enthusiast

Yeah so there is a kb for this somewhere but I forget where. Here is the easiest way to fix this. Power off the VM and unmount the cdrom while powered off. A reboot is not going to cut it. You must shutdown the VM completely. Alternatively you can mount the vmware tools image again run though the install again.

Here is what happened. At some point in time vmware tools was installed/update right. okay at the end of the install vmware tools wants to eject the cd, and then sends a signal to ESXi saying it is done okay that is the normal routine.

So what happens if you eject/ umount the ISO before installing the vmware tools? Well the cdrom eject command fails and falls back to a SCSI device eject or something like that. So the eject message returns success but its not really. So the ESXi never sees the expected eject and you are in the spot you are in now. This is most common in linux cause people would copy the install files and untar and then eject before installing. The correct way to do it is to allow the installer eject for you.

Try this, type "eject -v" then mount an iso and type "eject -v" see the difference? That is what I am talking about.

So you can't shut down the VM ehh? Well try this console to the VM and click the cd/wrench icon. Mount iso from datastore an look at vmimages/tools-isoimages/<os.iso> then mount the iso within the os and leave the iso mounted while running the tools install again.

As for HA, it does depend on vMotion. Do not think HA and vMotion together, you will get in trouble doing that as they have absolutely nothing to do with the other. HA will not vMotion. HA will power a VM back on a different host, but that VM will still have to shutdown or crash. If you have a lab set up HA and disable your vMotion network and then yank the power from one of your hosts. You'll see the VMs power back on the other hosts. That is HA. The linux VMs were protected all the same despite the VMware tools still thinking it was being installed due to a improper eject.

The SNMP and PowerShell question. No. The answer is do not unmount/eject the iso when upgrading/installing tools. Let the installer do it.

Reply
0 Kudos
MyuFox
Enthusiast
Enthusiast

That would be a great script for iso mounts that are not from installing tools. However it would not update the ESXi to know that the vmware tools installation has finished so it might not work in this example.

Reply
0 Kudos
max2479
Enthusiast
Enthusiast

are there any tools/scripts that will help to determine if the CD mounted and if VMware tools are in the installation process?

> if you found this or any other answer useful please consider allocating points for helpful or correct answers <
Reply
0 Kudos
JonesytheGreat
Enthusiast
Enthusiast

You could use a tool like RVtools http://www.robware.net/.  This would at least tell you which machines have an ISO attached, and if there is a CD attached to a VM you can find this from the "vCD" tab.  Going by the device type you could probably determine if there is an ongoing vmware install.

Thanks,

Matt Jones

Reply
0 Kudos
joyb81
Contributor
Contributor

Yes I have also gone through same sort of issues while putting esx server in a maintenance mode but VM unable to move to another host.

 

  • Issues like VM tools installing – kill that process by canceling the installation of VM tools
  • CD drive Mounted: remove the CD or ISO
  • Serial port Configured on VM: in the past some P2V happened and VM machine stiil hold some resources which is not available on other host – which also denies the VM migration to another host.

In this scenario we need to remove them manually – then only migration of VM will work

   

Regards

Joy Banerjee

http://aikitsupport.com

Reply
0 Kudos