-1

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?

Rohit Gupta
  • 356
  • 2
  • 4
  • 14
ShmilS
  • 1
  • 1
  • Does your datastore is shared between host ? The path should not change by default if so – yagmoth555 Apr 27 '23 at 13:47
  • 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. – ShmilS Apr 30 '23 at 09:12

1 Answers1

0

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.
Eric C. Singer
  • 2,329
  • 16
  • 17
  • 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. – ShmilS Apr 30 '23 at 10:31
  • 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. – Eric C. Singer Apr 30 '23 at 14:42