VMware Cloud Community
hattrick4467
Contributor
Contributor

moving vCenter Server to new host/datastore

I am new to vmware so I hope I have posted this to the correct forum. We recently upgraded our vmware environment from v4 to v5. We have two hosts and a single SAN. We have two datastores on the SAN. the vcenter server was created as a vm on host1 on datastore1. Datastore1 and Datastore2 were both upgraded to VMFS v5. It is recommended that you create a new native VMFS v5 datastore as when it is upgraded you do not get all of the improvements but rather a subset. I moved the vcenter server to host 2 and datastore2 but it you browse datastore1 or look at the virtual machines asigned to the datastore the file structure is still showing on datastore1(as well as datastore2.  Currently I have all of my other vm's moved to datastore2. My goal is to get entirely off of datastore1 and then recreate it as a fresh VMFS v5 store and then migrate everything to it. I have read the receommendations on how to move a vCenter server where you disconnect from vCenter, connect to the host that it resides on directly using vsphere client, remove it from inventory(but not from the disk) and then re-add it by attaching to the vm files. This does not seem like the scenario that I am in and want to make sure I do not break anything. Is it normal for the vcenter server and files to exist on both stores? Any help or advice appreciated.

0 Kudos
15 Replies
Troy_Clavell
Immortal
Immortal

do you have any media mounted to the vCenter VM from DS1? Usually it's an ISO file that may be mounted

0 Kudos
hattrick4467
Contributor
Contributor

I might. Let me check.

0 Kudos
weinstein5
Immortal
Immortal

Welcome to the Community -  The method you used does not move the files just reconnects to the existing files - go through the process again - when you have removed the VM from inventory - connect ot the other host and use the datastore browser to browse to directory where the VM is stored - copy the directory to the new datastore - when it has copied to the new datastore add it to the inventory of the new host and restart the VM - once complete you will be able to remove the original directory -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
hattrick4467
Contributor
Contributor

The issue is not that I cannot move or reference the datafiles from the new datastore. The issue is that they exist on both stores. It was suggested this could be because I have an ISO file mounted from the old datastore which I did. I have unmounted that within the host but the files still exist on both stores.  Within vCenter if I look at the properties of the VM(Summary tab) for the vCenter server is still shows both datastores also. Under the "Storage Views" tab it only shows the datastore that the vm exists on.  Even though I have moved other hosts from one store to the other they all only see the datastore that they exist on. Am I making any sense?

0 Kudos
RParker
Immortal
Immortal

hattrick4467 wrote:

The issue is not that I cannot move or reference the datafiles from the new datastore. The issue is that they exist on both stores. It was suggested this could be because I have an ISO file mounted from the old datastore which I did. I have unmounted that within the host but the files still exist on both stores.  Within vCenter if I look at the properties of the VM(Summary tab) for the vCenter server is still shows both datastores also. Under the "Storage Views" tab it only shows the datastore that the vm exists on.  Even though I have moved other hosts from one store to the other they all only see the datastore that they exist on. Am I making any sense?

yes perfect sense.. but those VM's are not REGISTERED on that other datastores, they are merely files on another datastore.  If you take a word document and copy to a external drive, you can see that external drive with files on it, but Word doesn't know about those "other" files in the file menu until you actually open one, hence NOW it's registered as a file in Word..

If you remove VM from (inventory) datastore1, and register the VM on datastore2 NOW you should see at least that VM listed on that datastore..

0 Kudos
Troy_Clavell
Immortal
Immortal

a picture is worth a thousand words Smiley Happy

With that said, if you initiated a sVMotion everything would have been housed where it should be.  Can you edit settings of the guest and send a screen shot of the HDD(s) disk file. Also, a shot of the datastores in question.

0 Kudos
DSTAVERT
Immortal
Immortal

I would probably give VMware Support a call at this point. There is a risk of dataloss going forward if you don't end up with a clear view of what is where.

-- David -- VMware Communities Moderator
0 Kudos
hattrick4467
Contributor
Contributor

It is showing as a VM under both datastores. That is my issue. I think the files on the original datastore are old and not needed. No modified dates on dirs or files past 9/14/2011. I am thinking I can just remove them and then I might be OK. Does anyone have a feel for what the risk is in doing this?

0 Kudos
Troy_Clavell
Immortal
Immortal

can you provide a screen shot or details about the file extensions?

0 Kudos
DSTAVERT
Immortal
Immortal

Try RVtools from http://robware.net It can indicate what it thinks are zombies.

-- David -- VMware Communities Moderator
0 Kudos
hattrick4467
Contributor
Contributor

Meaing show what all files and extensions exist on the datastore that I do not think is in use.

0 Kudos
Troy_Clavell
Immortal
Immortal

hattrick4467 wrote:

Meaing show what all files and extensions exist on the datastore that I do not think is in use.

Yes.  I would also go with DSTAVERT suggestion and use RVTools (vHealth Tab)

0 Kudos
hattrick4467
Contributor
Contributor

So just one last update for now. I initially renamed all of the files in the directory of the suspected unused datastore. I restarted the vCenter guest and all was fine. I then downloaded the files that were there to my local PC and deleted the files. The vcenter guest restarted fine so they were obviosly not used. What I cannot explain is if I go to the  Datastores view and select the virtual michines tab it still shows this virtual machine on that datastore which makes no sense to me. I am not going to worry about it as I am going to try and delete that datastore and recreate it as native vmfs v5. Thanks for all of your help and suggestions.

0 Kudos
DSTAVERT
Immortal
Immortal

Good luck. If you can report back on your progress.

-- David -- VMware Communities Moderator
0 Kudos
hattrick4467
Contributor
Contributor

So just to give everyone an update. I initially renamed the files in the datastore that I suspected that was not being used and restarted the vcenter server just fine. I then made a copy of the files and deleted them from the store and restarted vcenter just fine. The intersting part is that if within vcenter I looked at the Virtual machines that were part of that store it still listed the vcenter server even though there were no files there. I tried avery kind of refresh and that did not appear to be the issue. Since the file structure did not exist on the datastore that I deleted it from I then did a migration back to this datastore and verified that it no longer existed on the source datastore. I then Migrated it back to the original store and verified there were no files(other than HA) on the datastore. It is now no longer listed as a VM on that datastore so that looks like it cleaned it up. I think this just proves that the files were orphaned. I would like to thank everyone for their ideas and help.

0 Kudos