Two mistakes I made with VMs today
For reasons that kind of boil down to 'laziness', I only rarely delete or create VMs in my use of virtualization. Instead I mostly recycle or re-purpose already created VMs by reinstalling OSes on them, or sometimes not even reinstalling but just slapping some additional packages on to the existing VM image. When I'm in much doubt about the state of a VM or need it to be in a different one, I reinstall. Usually this works well, but today I discovered that I'd wound up with two accidents.
The smaller discovery was that both of my primary VMs (currently both being used for some testing) had lingering disk snapshots from months ago when each of them was being used for very different things. At a minimum this was taking up extra disk space. It may also have been slowing down disk IO due to copy-on-write issues, although after months of churn and OS reinstalls that may have wound up a non-issue.
The larger discovery was, well, let me put it this way: ZFS on Linux turns out not to be very happy when you try to run it on a VM with a 32-bit kernel and only 512 MB of RAM, especially if you're also using multipathed iSCSI. In retrospect I'm kind of impressed that the ZFS code didn't detonate on contact with that environment (although it did start producing kernel panics when I put it under enough load). Such is the drawback of repurposing existing VMs without paying much attention to their configuration.
(You might wonder how I could possibly get into that situation. The short answer is that it all started when I was doing some testing of low-memory web server setups and reused the same VM for a quick 'does it actually run' test of ZFS on Linux. Then later I came back to do more testing without actively noticing the VM's configuration and thinking about it.)
I don't have any clever ways of avoiding this in the future; it's just something that I'll have to keep an eye out for every so often, especially if I (temporarily) configure a VM into an unusual state (such as having low memory).
Comments on this page:
|
|