Wednesday, January 28, 2026

Data Center file access for VMs

So a next in line problem to work is how to have a VM have access to a file-space of data that is larger than its own disk image.

First some background:

Virtual Machines (VMs) are created with a fixed amount of "disk space". This amount is whatever number you give it when you create the VM. In this era of giant disks, no reason to be cheap on this; I will discuss with the customer/user how much they want, but I don't expect to give anyone more than 1TB.

Servers with four disk drive slots can hold ~100TB of space. They can have max 20-24 VMs running without having trouble about CPU core utilization (where each VM is using one core; fewer VMs if they use more than one core). So in theory each VM could have ~5TB of its own space. Those are big VMs at that point.

If a user is needing more than that, they should be using a separate file-share hosted on another machine whose purpose is hosting and sharing files. This article is about that setup.

There are several ways to do this. I have not investigated them all. Several are better integrated into ProxMox (CEPH and ZFS for example). 

I did, ~2 years ago, have a Windows Server 2022 DC Edition in operation. That particular group of five machines had really weak passwords and got hacked after I put it online. I wiped those several machines and started over, but I didn't bring back the Windows share(s) I had created...that was a "lab cluster" so it didn't matter too much.

This time, however, I want to do this better, with greater controls. So Samba it is.

Step one is install Ubuntu as the host OS. Standard approaches apply, either a USB or a PXE server. I'm trying to only use PXE at work, with a USB at home so I don't have to have another server running at home.

---

Turns out Samba on linux is harder to set up and configure than it ought to be. What an annoyance. Samba would be fine for other situations, not this one, where I need the size-limit quotas.

Seems likely to be easier with Windows Server which has quotas built in. I never set them up last time, didn't care at that moment. Shares are advertised via CIFS.

Have to wonder how an iscsi box would do that as well. No, apparently not intrinsically. 

Linux Servers wanting to use a Windows CIFS Share need to install smbclient and cifs-utils. You will want to mount CIFS shares via fstab at least some of the time. Pretty sure I did that before.

---

Installing Windows

Weirdly, it turned out I had 8 4T drives and one 3T drive in the RAID, so I pulled the 3T out, recreated the RAID, and started the Windows install. It then proceeded to bitch about not being able to install onto that logical drive, wrong partition type, blah blah something. Did some online reading that didn't exactly give the answer about what to do. (That 3T in the previous RAID was doing a negative thing for me, reducing the max size on the user side.)

The REAL answer: Windows wants to install to an MBR partition, which max size 2T. I swapped out drives so that I could create a 2x2T RAID 1 Mirrored group, and one 7x4T RAID 5 group. The machine was damaged in transit before I received it, so I can only put 9 total drives into it, thus 2 + 7. That's good for now.

Windows then cleanly installs, so the problem is not these other weird things I read about, it's the drive capacity/size. Install Windows to a 2T bootable, and let the other one, which is bigger, be the CIFS share.

Windows Server is a pretty easy install. You have to run Update after that, but that's fine. You should automate that anyway.

---

I'll need to be careful about the firewall aspects of all this, in the gateway as well as individual machines. I mentioned getting hacked in 2024. I should have been more careful about controlling the gateway to block things unwanted. As well as forcing better passwords, maybe even 2FA.

No comments: