Page 1 of 2

Where are the secret config files?

PostPosted: 23. Aug 2012, 12:15
by varboxer
I have two identical hosts and have created symlinks from ".VirtualBox" and "VirtualBox VMs" to shared NFS directories.
Both hosts thus share the same configuration files and VMs.
Yet when I run VirtualBox a newly created VM is showing up on one host but not the other. (I have restarted both GUIs)
How is that possible?
Are there some configuration files stored elsewhere?
Is there some hidden mapping of UUIDs?

Re: Where are the secret config files?

PostPosted: 5. Sep 2012, 10:30
by varboxer
Is nobody able to explain the behaviour of two hosts sharing config files via NFS ?

Re: Where are the secret config files?

PostPosted: 5. Sep 2012, 19:50
by susu.exp
Are you trying to run 1 Guest VM simultaneously on 2 different Hosts?

Re: Where are the secret config files?

PostPosted: 5. Sep 2012, 21:12
by varboxer
Not at all, just want the option of running on either host for fault tolerance.

Re: Where are the secret config files?

PostPosted: 7. Sep 2012, 12:26
by miine
~/.VirtualBox/VirtualBox.xml contains a list of the vms UUIDs .

'VBoxManage registervm' should be the command to use to get your "missing" VM into the list. Otherwise modify by hand...

Re: Where are the secret config files?

PostPosted: 7. Sep 2012, 12:34
by varboxer
I'm not sure that answers the question.
That file is obviously shared between the two hosts.
So what is causing the different behaviour seen between them, such as inability to obtain proper state or differences in snapshots, etc?

Re: Where are the secret config files?

PostPosted: 7. Sep 2012, 13:25
by mpack
It is however the only answer. A VMs machine UUID is declared in that VMs .vbox file. That UUID is referenced by the VirtualBox.xml file. There are no secret files. I'm not a Solaris user and hence cannot discuss the effect of symlinks on that particular host OS, but I would suspect that one or both of your user accounts lack proper rights to access another users data area, hence I suspect you are accessing two different VirtualBox.xmls (in fact I know you are, as that is just about the only possible explanation given what I said about no secret files).

Re: Where are the secret config files?

PostPosted: 7. Sep 2012, 13:34
by varboxer
Thank you for trying to help but both hosts really do use the same file:

A)

Code: Select all   Expand viewCollapse view
> ls -ld ~/.VirtualBox
lrwxrwxrwx   1 opr      local         30 Aug 23 10:02 /opr/.VirtualBox -> /data/vm_10g/metope.VirtualBox/

> ls -li ~/.VirtualBox/*xml
      1372 -rw-------   1 opr      local       4046 Sep  5 11:58 /opr/.VirtualBox/VirtualBox.xml


B)

Code: Select all   Expand viewCollapse view
> ls -ld ~/.VirtualBox
lrwxrwxrwx   1 opr      local         30 Sep 29  2011 /opr/.VirtualBox -> /data/vm_10g/metope.VirtualBox/

> ls -li ~/.VirtualBox/*xml
      1372 -rw-------   1 opr      local       4046 Sep  5 11:58 /opr/.VirtualBox/VirtualBox.xml

Re: Where are the secret config files?

PostPosted: 8. Sep 2012, 04:29
by Guyver
Validate that the *user* on both systems accessing this have the following identical.

login
numeric-userid
group
numeric-groupid
additional group memberships (and that their groupids match)

user's home directory should be this shared mountpoint on both systems (ie the fully qualified path should be the same on both systems)
user's shell should be the same on both

make sure the nfs mounts are always mounted, not just when the user logs in - ie - no autofs flakiness.

make sure the virtualbox general preferences are identical on both systems (specifically the VM base directory - which should reference this shared nfs path)

make sure the settings for the virtualbox network preferences are identical on both systems

yes, they should be, but go through each entry from the virtualbox preferences menu item

make sure the VM network settings are set so that they can bind to a valid network interface on both systems that would use the vm.

if that doesn't work, let us know, if nothing else, I'll build something out and test it myself.

Re: Where are the secret config files?

PostPosted: 10. Sep 2012, 16:02
by varboxer
Thanks for your reply. The user is from NIS so uid,gid,groups,shell are identical. Home directory path is identical but content is different, except for ".VirtualBox" and "VirtualBox VMs" which are symbolic links to the same auto-mounted dir (although VMs are running constantly so the dir is always mounted). The two hosts are almost identical x2250 hardware and solaris 10 OS. I can't think of anything which might be different about the network apart from the host MAC.

Re: Where are the secret config files?

PostPosted: 10. Sep 2012, 22:33
by Guyver
So you didn't follow my suggestion, making the home directory be the exact same nis mounted home.

The home directory needs to be identical in every way. If you need localized differences, use a sym-link to load those from another local home directory structure.
If you don't, you will more than likely introduce some kind of bit-rot or bit-twist that will make things enough different that it just won't work. (use something like [ -f /lhome/userid/.profile ] && . /lhome/userid/.profile to execute any localized login settings - though I'd leave those out during initial testing.

Since you VirtualBox VM source is from an NFS share, make the home directory on the same NFS server, set it to mount on login (we've done this with NIS, so it shouldn't be difficult).

Now your home directory structure will be identical on either machine because they point to the same share.

Next, follow through and check each menu from within the VirtualBox application on both systems to make sure they are set the same.

Re: Where are the secret config files?

PostPosted: 11. Sep 2012, 13:29
by varboxer
Ah, I think we are getting somewhere.

I've already made the .VirtualBox and VirtualBox VMs directories identical, so if you are saying that the whole home directory needs to be identical then you must know of some secret config files which are being used. Can you give me their names please?

Re: Where are the secret config files?

PostPosted: 11. Sep 2012, 16:03
by Guyver
I'm telling you what I would do.
I don't know any secret names, so stop with that.

If you don't want to listen to suggestions, then don't.

Good luck in your adventure.

Re: Where are the secret config files?

PostPosted: 11. Sep 2012, 16:55
by varboxer
All suggestions gratefully received but when you said "The home directory needs to be identical in every way" I thought you knew the answer rather than speculation.

Re: Where are the secret config files?

PostPosted: 11. Sep 2012, 21:17
by Guyver
If you followed the suggestion and it worked, then you could a file by file comparison to see what was *different* and discover if there were any *secret files* or if it was just a difference in permissions, ownerships, an ACL setting or something else odd...
Start with identical, work out from there.