Force Certain VMs to use Array instead of Cache


Recommended Posts

I'm looking for a way to make certain VMs use the array as opposed to cache. I have two use-cases for this. One being that I would like to have several VMs with larger hard drives. I don't want them chewing through my cache drive, so I would prefer to have them use a small fraction of my primary array space. The other being that I would like to have a pfSense VM and from what I've heard, those can be a little rough on SSDs. The only problem is, I would also like to have most of my VMs on the cache. When assigning where to keep the domains share, we are given 4 options for the cache drives. No, Yes, Only, and Prefer. If my understanding of these is correct, no will not work because it doesn't allow me to use cache. Yes won't work because it moves everything from my cache to my array when the mover is invoked. Only won't work because it doesn't allow me to use my array. Prefer won't work because it moves everything from my array to my cache when the mover is invoked. Is there some sort of thing that just says "Allow me to keep everything where I originally put it"? Thank you in advance.

 

EDIT: I had an idea right after I posted this. I'm going to try it out, but also post it here to get an opinion on going about it this way. I created a share named "domains-array" that is set to No for the use cache option. I'm thinking I should be able to set up new VMs and set the hard drive location to manual and tell it to save the hard drive there. I have no reason to think that the hard drive would get moved after doing it this way. Does anyone have any input on whether or not this is the way this should be done?

Edited by bamhm182
Link to comment
36 minutes ago, bamhm182 said:

I swear I tried that and it moved my VM to the cache when the mover pop'd. I'll try it again for sanity sake. Thanks.

That will only happen if you put it into a folder that has a name corresponding to a share which is set to Cache=Prefer.   Remember that all top level folders on array drives are effectively User Shares.

Link to comment

So you're saying it will move it over if it tries to put it in /mnt/user/domains/myArrayVM/disk1, but I specify to put it on disk 3 in the array and my domains share is set to prefer? If that's the case, I would still have to make a domains-array share and save the vdisk in /mnt/user/domains-array/myArrayVM/disk1

 

EDIT: I ran a few tests. Putting a vm on disk 3 while domains was set to preferred ended up having the vdisk move to the cache. Putting the vm on domains-array where domains-array is set to force the use of the array allowed me to have to the vm disk on the array. I'm just going to manually set their drive directory when I need them on the array. It doesn't happen very often, so it shouldn't be a huge issue.

Edited by bamhm182
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.