[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] VirtualBox: Guest user vs. Condor account!?!



Dear David J. Herzfeld,


Thank you for your suggestion to manipulate the VirtualBox environment variables to more sensible values.

I searched internet and found conflicting methods how to do this.
Some people say, just set it with the 'set' command, like I did below.
Others seem to recommend using instead: "My Computer->Properties->Advanced->Environment Variables".
The last one writes into the registry, which I think might not work for an unprivileged Condor user .....??


So just for testing, I used the following DOS batch script and submitted it to Condor:


REM start of DOS batch script: virtualbox.bat
@echo off
set VBOX_USER_HOME=%CD%\
echo VBOX_USER_HOME = %VBOX_USER_HOME%
echo ALLUSERSPROFILE = %ALLUSERSPROFILE%
echo USERPROFILE = %USERPROFILE%
echo HOMEDRIVE = %HOMEDRIVE%
echo HOMEPATH = %HOMEPATH%
echo USERDOMAIN = %USERDOMAIN%
echo USERNAME = %USERNAME%
echo APPDATA = %APPDATA%
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" list ostypes
REM end of DOS batch script


# Submit Description File
universe = vanilla
requirements = (target.Arch == "INTEL") && (target.OpSys == "WINNT51")

load_profile = True
executable = virtualbox.bat

when_to_transfer_output = on_exit

output = $(CLUSTER)_$(PROCESS).out
log     = $(CLUSTER)_$(PROCESS).log
error   = $(CLUSTER)_$(PROCESS).err
queue

# end of Submit Description File


The output file has following 8 lines:
VBOX_USER_HOME = D:\condor\execute\dir_2560\
ALLUSERSPROFILE = C:\Documents and Settings\All Users
USERPROFILE = C:\Documents and Settings\condor-reuse-slot1
HOMEDRIVE = 
HOMEPATH = 
USERDOMAIN = SKKU-EJNMGFFR
USERNAME = condor-reuse-slot1
APPDATA = 


The error file has following 3 lines:
VBoxManage.exe: error: Failed to create the VirtualBox object!
VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005) - Server execution failed (extended info not available)
VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running or failed to start.



Alas, still the same error.

Note that HOMEDRIVE, HOMEPATH, and APPDATA are all empty variables for the unprivileged Condor user.....
Does that ring some bells?

Thanks!
Rob.



----- Original Message -----
From: David J. Herzfeld <herzfeldd@xxxxxxxxx>
To: htcondor-users@xxxxxxxxxxx
Cc: 
Sent: Thursday, November 22, 2012 1:15 AM
Subject: Re: [HTCondor-users] VirtualBox: Guest user vs. Condor account!?!

Hi Rob:

On Mon, 2012-11-19 at 18:01 -0800, Rob wrote:
> The procedure to follow should be:
> 
> 1. create a new virtual machine environment
> 2. attach the virtual disk (from the Condor file transfer) to the new virtual machine
> 3. start the virtual machine.
> 
> VBoxHeadless.exe cannot do steps 1 and 2, but that must be done with VBoxManage.exe.
> This is also suggested on the VirtualBox website:
> 
> http://www.virtualbox.org/manual/ch07.html#idp13097712
> 
> 
> Hence: first use VBoxManage.exe to set everything up for the new VM,
> and then use VBoxHeadless.exe to start the VM
> (the options with VBoxHeadless.exe are limited to already created VMs).

It's been awhile since I used VirtualBox on Windows (and certainly
longer since I installed Condor on a Windows machine) - so take this
advice with a grain of salt. 

Based on my experience with Pools of VirtualBoxes, I don't believe that
you will need to allow the Condor service to interact with the desktop.
We are able to start virtual machines in Vista/7 without a login
session.

Note, however, that just about all VirtualBox commands require access to
the standard settings folder (on Windows this is in %HOMEDRIVE%%HOMEPATH
%), which is used to store the configuration of your created machines.
If the settings folder does not exist, then it will attempt to create
one. It may be the case that %HOMEDRIVE%%HOMEPATH% is unavailable on the
Condor account (or you are incapable of writing to that directory). 

VirtualBox allows you to explicitly define the folder you wish to use
via the VBOX_USER_HOME environment variable. It may be worth adding
something like set VBOX_USER_HOME=%CD% to the start of your batch file.

Cheers,
David


_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/