Score:-1

Keeping a vmdk's path on vmotion

nc flag

Situation's a bit complicated so I hope I can make sense here.

I have an OpenShift cluster installed on vSphere (managers and workers). It has Elastic configured to gather logs. Elastic has a Persistent Volume attached, and OpenShift is configured to use vSphere and create a vmdk for this PV and connect it to the worker VM.

Storage-wise, everything is in the same Datastore. Each worker and manager has its own folder (nothing special there) and the shared disk for Elastic has its own folder in the same Datastore (folder was manually created for this). OpenShift is configured to create the vmdk there.

This works until a worker decides to vMotion, causing vSphere to move the vmdk file to the VM's folder on the Datastore and update the disk's path. Then OpenShift creates a new vmdk for the PV in Elastic's folder and connects it to the VM as a new disk and now I have about 10 different vmdks in different folders and VMs.

Also, it turns out that OpenShift does not support Storage vMotion so it seems that if I want to solve this it's going to be some sort of workaround. I thought of setting affinity rules for the VMs but I'm not too happy with this idea.

Is there any elegant way to configure vSphere to keep the disk's path?

yagmoth555 avatar
cn flag
Does your datastore is shared between host ? The path should not change by default if so
ShmilS avatar
nc flag
The Datastore is shared between all hosts, yes. They use it for the OpenShift cluster VMs and PVs. I don't think anyone here could've changed any default setting, though.
Score:0
cn flag

If you are refferring to Storage DRS (which exececutes automatic migrations of storage). Then you have two options.

  1. Disable storage vmotion for each vm that you don't want to move. You accomplish this by implementing "VM overrides"
  2. Create a separate datastore for those VM's that you don't want to move, and move the VM's to that datastore.
ShmilS avatar
nc flag
It's not actually Storage DRS since it's only the one Datastore (not a Datastore cluster, so I don't have any sDRS options). The disks should be separated - the VM disk in the VM folder and the shared disk in its own folder - but when a vMotion occurs it moves the shared disk to the VM's folder. We still want to keep the regular DRS running for all the regular reasons, though.
Eric C. Singer avatar
cn flag
I feel like what you're asking for is abnormal operationally speaking in a VMware environment. I don't have access to a VMware environment anymore to poke around. What I would look at is vcenters advanced settings. There might be something in there that control the behavior.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.