shadowspawn - 2017-10-04

Hi there;

I'm running multiple hosts using a boot-over-the-wire RO (NFS) PXE boot. The user that's part of vboxusers, the VM directories, NFS, NIS are all configured correctly.

The user that runs it all has r/w access to its home directory. All servers appear with all the VM's as they should. I create one, refresh a host, and it's there.

What I can't figure out is what "lockfile" is being used when a particular VM host creates a running VM. I know it's somewhere, a status in the user's home directory.

I did this before way back when, but I'm having a difficult time making all servers aware that a VM is running. (I even want it to show what host it's running on. I was able to do this before. But thats not the point of this post)

This is to figure out what is saved/written when a VM is fired up, mainly and utmost to avoid more than one host running the same VM, or logging into the "control" phpvirtualbox host and NOT fire up the VM on two different hosts. I've done that before, BadThings(tm) happen. The notification on which host is running which VM was kinda simple if I remember, but I forget how to do the query on phpvirtualbox's main instance.

Main-
-VMHOST01
-VMHOST02
-VMHOST03
etc.

To simplify: all VMHOSTXY share the same VM directory. The user VMHOSTUSER has its /home directory read/write on all servers. All servers boot over the wire and read-only, dynamic for things like $(HOSTNAME) etc., file wizardry and for general magic, /home is mounted NFS R/W. Hence adding one shows on all. Everything works perfectly.

But running one shows nothing on the rest... and I know this was possible...

I can't remember where the instance is written that it's running on VMHOST01 (for example) so I could do some hacking to grey it out/disable it/mark it running somewhere else, leave that part to me, I just don't know where the lockfile is.

If it's in /proc or /run (I think it was???? Everything is tempfs...) I can handle that by moving/linking/bashing/scripting it somewhere periodically over an NFS share but this is killing my head.

Cheers-

-SS

 

Last edit: shadowspawn 2017-10-04