Page 1 of 1

Run vboxmanage.exe As A Domain Account With Profile Redirect

Posted: 12. Jun 2013, 03:05
by craigforsure
Hello fellow brainiacs.

I need assitance in creating a custom video mode using vboxmanage. This is normally done without a hitch, from command line. It is my understanding that using vboxmanage.exe in an elevated command prompt returns the error:
VBoxManage.exe: error: Could not find a registered machine named 'VMNameHere
Running the command at a non-elevated command prompt works successfully on a machine where I am logged in as a local administrator, and where the home directory of the user is located in the standard "C:\Users\%UserName%\. Also, in that simulation the VM's reside in a folder within the home directory: C:\Users\%UserName%\Virtual Box VMs\.

However, my user account is a domain account with home folder redirection. Home folder redirection in a domain environment redirects all of the Windows documents, music pictures, vidoes, etc. libraries to a network location. In my case, everything is redirected to a drive which maps on my machine with the letter P:\. If I go to My Computer and select the P:\ drive, I see the all of the folders which are normally found underneath C:\Users\%UserName%\. In my P:\ drive there are directories labeled Documents, Pictures, Videos, etc. When creating a new VM within VirtualBox, it does not use the redirected home folder location. The "Virtual Box VMs" folder is still created in C:\Users\MyUserNameHere\Virtual Box VMs. I assume this is by design? Not sure, if that is relevant to my issue. My C: drive Documents, Music, Pictures, etc. home directory folders still exist on the C:\ drive, they are just empty since I am using redirection on my user account in Active Directory. Thus, with an account with home folder redirection, upon opening command prompt I automatically sit at the root of my home directory (in my case, the network mapped drive 'P:\')
When opening command prompt from my user account (non-elevated) I get "P:\>__". It is not allowing me to 'cd' out of this folder to get into the C:\ drive. When I enter "CD C:", it spits out "C:\" and then on the next line instantly spits out "P:\>__" (see attached image for screenshot)

Hopefully someone has some experience with this, because I'm tired of viewing a little square screen which doesn't fit my monitor resolution! Or if not, hopefully by putting your heads together we can come up with a solution.

Re: Run vboxmanage.exe As A Domain Account With Profile Redi

Posted: 12. Jun 2013, 14:14
by noteirak
Folders redirection applies to specific sub folder under your home folder. What you need to put in place, to also have the .Virtualbox & Virtualbox VMs folder redirected, is to setup a roaming profile directory.
But you'll break Windows since your roaming profiles, taking gigs of space, will need to be downloaded & uploaded each time.

But to sum this up : Virtualbox offers a place where the VMs should be stored, up to you know where it should be stored, if the default doesn't work. The rest has nothing to do with Virtualbox whatsoever.
Host & Guest OS configuration should be directored to dedicated forums.

Re: Run vboxmanage.exe As A Domain Account With Profile Redi

Posted: 12. Jun 2013, 23:14
by craigforsure
That doesn't help me nor does it provide any viable solution to my issue.
1) I do not want to set up roaming profiles, because I do not want the 'Application Data' or the 'Downloads' folder copied across the network and synchronized across PC's. Configuring an AD user account with a roaming profile directory automatically synchronizes everything within the users home directory down at log-on, and back up to the server at log-off. The way I currently have active directory user accounts configured is that of a standard and a way in which many environments are set up. I don't see how this issue has not arisen previously.

2) There is some major discrepancy here. Per this document: http://www.virtualbox.org/manual/ch10.html , it is stated that
By default, this "machine folder" is placed in a common folder called "VirtualBox VMs", which VirtualBox creates in the current system user's home directory. The location of this home directory depends on the conventions of the host operating system: On Windows, this is %HOMEDRIVE%%HOMEPATH%; typically something like C:\Documents and Settings\Username\


At the run prompt, entering %homedrive%%homepath% returns me to my P:\ drive. Thus, the "Virtualbox VMs" directory, and ".Virtualbox" directory should have been created here, correct? Upon installation of VirtualBox, those directories are placed outside of my home directory and insideof C:\Users\%UserName%\. I assume this is by design, under the justification that VirtualBox doesn't recommend or support accessing a .VDI from across the network. It's extremely problematic, for VirtualBox to programmatically create the two directories outside of the users' home directory however. As you can see is the case with my situation. I am guessing the issue with me running vboxmanage is related to vboxmanage querying for the machine name in "%homedrive%%homepath%, which of course do not contain any VirtualBox directories.

3)
Virtualbox offers a place where the VMs should be stored, up to you know where it should be stored, if the default doesn't work.
a) Why isn't the default location working exactly?

b) What is it that dictates where a VM "should" be stored? I assume that it's best practice, and recommended to have VMs stored only on the local hard drive of the same machine which is hosting the VirtualBox application accessing them. It seems that you are suggesting otherwise. There is no way that I am storing a .VDI on the network and then opening it; for numerous reasons. Performance would be horrible even on a GigE network due to the constant I/O of VirtualBox reading/writing the .VDI from across the network. Not to mention, it would also be unavailable while the user was offline (assuming that Windows 'Offline Files" feature has not been set up in "Sync Center" to make the network share available offline.


4) All I need to accomplish is to create a custom video mode for a VM that I have installed. Any solution which doesn't involve restructuring my 'Microsoft recommended' active directory structure is desirable. I'd appreciate any steps to walk me through how to accomplish this.

Re: Run vboxmanage.exe As A Domain Account With Profile Redi

Posted: 13. Jun 2013, 00:07
by noteirak
1) I am only aware of two basic profile & redirection mechanisms :
- Roaming profile, which is like you explain : a copy to a remove server of everything under C:\Users\%username%
- Folders redirections, which is a very specific list of folders (AppData Roaming, Documents, Download, Images, etc...) redirected at any time to a specific network location.
"Folder redirections" or "Home folder redirection" are the same thing. And this precide set of directories does NOT include anything of 3rd parties.
Roaming profile is the only way to have .Virtualbox & Virtualbox VMs copied on a network share at logoff, but the ones under C:\Users\%username% will always be the one used while a user is logged in.

2) Not sure about that one I have to say. I do not have any env available to replace it right now.

3.a) No way to know unless you give a precise set of configuration for the specific user in AD so we can replicate this.
3.b) Nothing does, but a descision needed to be made by the devs. That place seems a valid enough place for me, given the target users and their usual use case (regular people at home). Since you would be the sysadmin, the option is customizable at your will so it can fit in your architecture.

4) The only thing I can say is : give us very precise set of configuration item and versions you use, and we try to replace it. If we can, then you can inform the devs via the bugtracker and they can fix the issue, if one exist.
Else it's purely a matter of AD configuration, totally out of scope of this forum.