VMware Cloud Community
CPSWernerSt
Enthusiast
Enthusiast

VCenter Server 5.1 show migrated VM on old and new Storage

Hello,

we update 2 vsphere 5.0 Hosts to 5.1 and the vcenter too. Now we connect new Storage to the vsphere Hosts and migrate some of the VMs on the new Store.

(all of them have latest VMtools installed, are the latest VM HW-Version, they have no ISO, Floppy-Images or something else attached) Cause of Vsphere Essential we made the Storage Migration when then VMs were offline.

After the successfull storage-migration of all VMs, we saw that 3 VMs show us under Resources of the VM the old and the new datastore, also on the inventory of the datastore we saw on both datastore the vm, but when we browse the datastore the VMS are only (correct) on the new datastore.

I know that happens if some iso, images etc. are connected when the VM ist migrated, but we checked that double an there is no reference to the old datastore at the settings of the VM. When we connect direct to the host the VM datastore is show us correct only the new datastore.

How can we fix this????

Best regards

Werner St.

31 Replies
Rubeck
Virtuoso
Virtuoso

Hi..

If these VMs were running of a snapshot prior being migrated to the new datastore, both datastores might be listed as a resource for these VMs..,, If so delete the snapshots and it's all good..

/Rubeck

nshetty
Enthusiast
Enthusiast

Hello,

I have seen this multiple times before.

If the VM hdd is pointing to the new vmdk in the new datastore and if you are able to power on the VM without any errors then you need not have to worry.

However, if the VM is still pointing to the disks on the old datastore and you see some files in the new datastore as well then you would have to power on the VM and then check if all the data is present.

If the data is present then you would have to rename the folder in the new datastore to some other name and then try performing svmotion again and then check if it is sucessfull.

[NOTE : I hope none of the VMs are running with snapshots, SVmotion of VMs with snapshots is not supported. This could also cause data loss]

Cheers,

Nitin

0 Kudos
CPSWernerSt
Enthusiast
Enthusiast

Hello,

@Kim Rubeck

thank you for your quick respond the strange thing is that this happen on 3 VMs of 12 we migrate. Also other of them has Snapshots and they not shown on both datastore. And the strangest thing: One of the 3 VMs had NO snapshots but is also showing on both datastores.

@nshetty:

Thank you for your answer.

All VMs running fine, we also tried to move them back, offline to the old store and try it again, also with delete from inventory, and reassign the VM. Didn't work,

When we made the migration the VMs were offline, we have no license for storage-vmotion.

best regards

Werner

0 Kudos
Rubeck
Virtuoso
Virtuoso

sVMotion of a VM with snapshots is indeed supported in vSphere 5...

http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vcli.examples.doc_50%2Fcli_manage_st...

/Rubeck

0 Kudos
nshetty
Enthusiast
Enthusiast

Oops, Didnt give much attention to the build of ESXi.

Yes, you are right svmotion is supported for VMs with snap from 5.0 onwards. Thanks for pointing that out.

At that note, I have experienced issues with VM that have snapshots whenever a svmotion is performed. I lost the data from the snapshot file. Backup saved me on this.

However, I havent tried this on a 5.1 yet. Maybe would try some testing and then check.

There were bugs in 5.0 for svmotion with snapshots. Must be fixed in the later patches.

NS

0 Kudos
nshetty
Enthusiast
Enthusiast

Hello,

Sorry, ignored the build of the host earlier, Svmotion with snapshots is supported from 5.0 onwards. However, I suggest to commit snapshots before you perform svmotion. It is safe when you dont have backup.

Now to the issue, when you see files on both datastores then that means the svmotion was a failure. If you check in the tasks and events, did svmotion complete successfully ?

Are you able to power on the VM ? Is the data intact ?

Can you upload the vm-support logs from the host where the svmotion was performed ?

follow the kb below for log generation :

http://kb.vmware.com/kb/653

What is the name of the VM that is affected ?

Old datastore name ?

New datastore name ?

Cheers,

Ns

0 Kudos
CPSWernerSt
Enthusiast
Enthusiast

Hello,

once again we didn't use svmotion, i migrate the VMs offline.  There are no files of the VMs on the old datastore, only in the vcenter view under Resources

you see if you go on the VM that it shows 2 datastores, the old and the new one, but when you are direct connected on the host, and you go to the smae VM you see that there is only the new datastore (which is correct) For me it looks like that somewhere in the vcenter db, vmware didn't delete a pointer or something like this after the successful migration.

All VMs running fine, no data lost, only the view in vcenter is the problem which can be in future a problem if more and more VMs shown the wrong datastore.

Best regards

Werner

0 Kudos
nshetty
Enthusiast
Enthusiast

Alrighty, You can restart the virtual center service and then check if the issue gets resolved.

Else, remove the host from the cluster and readd it. Note : Make sure EVC is not enabled on the cluster.

If that doesnt fix then take a backup of the vcenter database and run the below sql query

select * from VPX_VM

Check the datastore that it mapped it

If you do not want to go through the route of making changes to the DB you could readd the disks aswell.

Cheers,

NS

0 Kudos
memaad
Virtuoso
Virtuoso

Hi,

If none of the above suggestion does not resolve the issue, just remove the VM from inventory and add it back to inventory, it should should resolve the issue ( Do it from vCenter server ) .  Also can you check if there is any unnecessary portgroup attached to VM , if yes remove it.

Regards

Mohammed

Mohammed | Mark it as helpful or correct if my suggestion is useful.
0 Kudos
a_p_
Leadership
Leadership

Can you confirm that for the VM's with snapshots, the VM did not have anything (ISO, FLP) connected when the snapshot was created? And for the VM without a snapshot, please double check in the datastore browser that no snapshot (or stale .vmsn file) exists. Under some circumstances snapshots don't show up in the Snapshot Manager although the exist.

RVTools (http://www.robware.net/) is actually a perfect tool to get an overview of the environment.

André

0 Kudos
nshetty
Enthusiast
Enthusiast

Hello,

Did we get a chance to follow the stpes ?

Ns

0 Kudos
CPSWernerSt
Enthusiast
Enthusiast

Hello,

Happy new year and sorry for the delay.

Here is an update:

@memaad: I allready tried to remove and readd the vm to the inventory (-> in vcenter and host direct too via vcenter-client)

that didn't fix it,

@a.p. i will check this as soon as possible, but i allready checked that the VM without snapshots had also no snapshots files in his directory. Also RVtools show me this.

@nshetty i will try the sql query today (first i must install the management studio on the vcenter server. Than i will post an update.

Thanks all of you for your help until now.

Best regards

Werner

0 Kudos
a_p_
Leadership
Leadership

I still think there's got to be a simple reason for this. Please post a list of files in the VM's folder and post/attach the VM's .vmx file to your next reply post.

André

0 Kudos
CPSWernerSt
Enthusiast
Enthusiast

Hello Andre!

Attached you find a copy of the vmx-file(renamed it TCLIWIN7.vmxcopy)  and a list of the files in the directory(lstcliwin7.txt).

I hope you found something. As i wrote before, if i'm direct connected to the esxi-host, all shows correct and only if i connected

to the vcenter-server the old datastore is also there.

Best regards

Werner

0 Kudos
a_p_
Leadership
Leadership

Has the snapshot for this VM been created after you moved it or did it already exist?

In case it already existed, the "TCLIWIN7-Snapshot1.vmsn" file might contain information about the old datastore which could result in displaying the two datastores in the summary. I'd recommend you use the Snapshot Manager to delete the snapshot, then check whether the .vmsn file has been deleted from the datastore and if the old datastore still show up in the summary.

André

PS: I'd suggest you use the "Delete All" button to delete the snapshot!

Alim786
Expert
Expert

Andre

I had a similar problem and it was to do with old snapshots being taken at the time when it was connected to an old Datastore. I removed the snapshots and my Datastore Groups are now matching my Consistency Groups - thanks.

Werner St - I hope this has resolved your issue. If so, please mark Andre's answer as correct.

VCP6-DCV, VCP5, CCNA, MCTS 2008R2, MCSA 2008R2, CCA, ITIL. Please mark answer helpful or correct as appropriate.
0 Kudos
CPSWernerSt
Enthusiast
Enthusiast

Hello,

sorry for the delay. The snapshot were created after we moved the VM. Because this VM is for developers, and they install application after application, and test

them, and if all works they delete the snapshot.

So that can't be the problem.

But thanks for your informations.

Best regards

Werner St.

0 Kudos
a_p_
Leadership
Leadership

I'd suggest you take a look at the .vmsn file to see whether the original .vmx file contained a reference to the old datastore. Although the .vmsn file is a binary file, you should see the original .vmx contents.

André

0 Kudos
picturesplanes
Contributor
Contributor

I got this problem too but I finally found what was "related" to my previous datastore.

My VM's CD\DVD drive is still mounting to an ISO file that store in previous datastore. Maybe this is a hints to yours situation.

Ching