Jump to content

Recommended Posts

Posted
Hi, its pretty much what boredguy does - we have the virtual box image and settings that are sent via robo copy, then the app and a bat file are sent s a package - we use prism deploy - then a short cut for users is s pointed at the bat file, the bat file runs virtual box with a bunch of restraints to lock it down - we nicked the bat file settings of an edu geek thread apparently.
  • Thanks 1
  • 3 weeks later...
Posted

Trying to run virtualbox on one of our teacher machines I get a sophos error. Does anyone know why or come across this before?

 

Capture.PNG

Posted

@fiza

 

Do you mean Sophos on your image or on your host?

 

We don't have av on the image, what's the actual path In the screen shot there... It looks a bit odd to me?

Posted

@Jasbo

AV is on the host. No AV in the guest as it's not connected to the network and has immutable disks. I have added all the virtual box exe files as exceptions and exclusions in sophos. Still same result. Will be in installing sophos tomorrow to see if it works then.

  • 2 months later...
Posted

Hi,

 

We installed SSD`s into one of the ICT suites, so space is sometimes limited (when office SP`s are rolled out etc). Is there a way that students can load a vdi image from a share? can multiple students load at the same time?

 

Thanks

  • 7 months later...
Posted

Old thread revival I know - but I wanted to post a thank you to everyone that's posted on it.

 

It's certainly made our lives easier setting up a VirtualBox solution. Thanks all :D

  • Thanks 3
Posted
Old thread revival I know - but I wanted to post a thank you to everyone that's posted on it.

 

It's certainly made our lives easier setting up a VirtualBox solution. Thanks all :D

 

Our last apprentice has written some code that deploys our Oracle VirtualBox solution to a PC, completely hands-off and locks it down etc.

  • Thanks 1
Posted
Our last apprentice has written some code that deploys our Oracle VirtualBox solution to a PC, completely hands-off and locks it down etc.

 

That sounds good to me, do you fancy sharing? :)

 

There's still a few things I want to test out on the Ubuntu VM so it'll be a few weeks before I do a roll out.

Posted
That sounds good to me, do you fancy sharing? :)

 

There's still a few things I want to test out on the Ubuntu VM so it'll be a few weeks before I do a roll out.

 

Sure.

 

Obviously the paths are hard coded for our network....

 

Run this batch file...we call ours:

 

Oracle Virtual Machine Script NEW.bat

 

:: Echo off prevents the commands in your script from being printed when the script runs, which

:: makes things cleaner for the end user. @echo off

:: <- Double dots or REM indicates that the line should not be parsed when the script is running.

:: This means that you can add comments or information that will not be run as commands.

 

goto admin

:: Anything with a single semi-colon ':example' is a block of code that can be referenced by the 'goto' command.

:: An example would be 'goto example' which will navigate to the ':example' code block and run the script from there.

:admin

echo.

:: Runs a check on the current session, and determines whether it is running as an administrator.

:: If it returns a value of 0, the session is running as an admin, and will continue with the script.

:: Any other value will result in the script exiting out with an error.

:: This code should be used in all scripts, as any commands that require elevation will be immediately rejected

:: if it is not running as an administrator.

net session >nul 2>&1

if %errorLevel% == 0 (

goto notification

) else (

cls

echo.

echo ***WARNING**************************************

echo * *

echo * Batch script is not running as administrator *

echo * *

echo ************************************************

echo.

pause

goto end

)

:notification

cls

:: This displays a menu, line by line, so that the end user can view information by the script writer before proceeding.

:: It is typically bad practice to have a script start running immediately, as if the user has accidentally clicked on the

:: .bat on the Desktop, it can run a script that was not intended, which could have disastrous consequences.

echo.

echo ***Automated Virtual Box Installation*************

echo * *

echo * This script will deploy the virtual sandbox *

echo * software to this computer, and configure it *

echo * with the same settings as 6A8 and 6B2. *

echo * *

echo * No further action is required. *

echo * *

echo * Proceed? *

echo * *

echo **************************************************

echo.

:: Pauses the script, and requires the user to hit 'enter' before proceeding. This is so the user can read the

:: information without it immediately disappearing off of the screen.

pause

:install

echo Establishing connection to then J:/ drive, please standby...

:: Disconnects from the specified network drive.

net use J: /delete

:: Maps the network drive so that it can be accessed within the command prompt.

:: If this step is not done, cmd.exe will not be aware that these network shares exist

:: and therefore will be unable to connect to them.

net use J: \\fp5\netman2$

:: Changes the current working directory the J:/ drive.

J:

:: Changes the current working directory to the Virtual Box folder.

:: Quotes are required if the string contains spaces.

cd "J:\_admin software\Virtual Box"

echo Connection established.

echo.

echo Registering Oracle certificates as a trusted installer...

:: Registers the Oracle inc. certificates so that the script will not hang whilst waiting for user input.

:: Not doing so will cause the script to be held indefinitely until a technician authorises that the certificate can be used.

certutil -addstore "TrustedPublisher" "J:\_admin software\Virtual Box\oracle-vbox.cer"

echo Registration complete.

echo.

echo Initiating 'Oracle Virtual Box' .msi installation...

echo Please standby.

:: Starts the main executable for Oracle Virtual box, using the /start, and /qn switches.

:: /start holds the script whilst the installer is running, and /qn indicates that it should be a silent install.

start /wait msiexec /i "J:\_admin software\Virtual Box\VirtualBox-4.3.26-r98988-MultiArch_amd64.msi" /qn

:: Runs a check to see if the Virtual Box software is actually installed onto the computer, if so, it will take you to the appropriate code block.

if exist "C:\Program Files\Oracle\VirtualBox\VirtualBox.exe" (goto vboxsuccess) else (goto vboxfailure)

 

:vboxsuccess

:: If the executable exists within the Virtual Box directory, the script will continue with the rest of the installation.

echo Oracle Virtual Box has been installed successfully.

echo.

goto installsuccess

 

:vboxfailure

:: If it has failed, the script will inform the technician something has gone wrong, and will request that they terminate; pending troubleshooting.

echo Oracle Virtual Box installation has failed.

echo Please ensure that no existing versions are installed, and re-start the computer.

echo.

echo Exit?

goto end

 

:installsuccess

echo Creating VBOXUSERS local group...

:: Creates a new local group on Windows that users can be added to.

net localgroup "VBOXUSERS" /add /comment:"Group created for users of the Oracle Virtual Environment"

echo Adding 'Domain Users' to VBOXUSERS group...

:: Adds all users within 'Domain Users' to the 'VBOXUSERS' group for H:/ drive sharing within the virtual environment.

net localgroup "VBOXUSERS" "Domain Users" /add

echo Transferring Virtual Box image and settings to local computer...

:: Copies the image and configuration files from the Virtual Box directory on the J:/ drive. /ETA provides a percentage of completion.

Robocopy /COPY:D /ETA "J:\_admin software\Virtual Box\sandbox" C:\sandbox\

echo Assigning permissions to 'C:\sandbox' directory...

:: Gives VBOXUSERS the ability to read/write all data within the C:/sandbox directory.

cacls c:\sandbox /t /e /g VBOXUSERS:C

echo Registering sandbox environmental variables...

:: Sets an environmental variable that Oracle reads to determine which home folder it should use.

setx -m VBOX_USER_HOME C:\sandbox\

echo Disabling Virtual Box GUI features, and menu bars...

:: Due to Oracle Virtual Box being installed whilst this script has been running, the current command prompt will not

:: recognise the commands needed to configure the virtual environment, therefore a new script will have to be called

:: in a seperate window. 'start' will open a new instance of cmd.exe, and 'call' will reference another batch script

:: on J:/_admin software/Virtual Box.

cd "C:\Program Files\Oracle\VirtualBox"

start call sandbox-settings.bat

pause

 

:end

 

 

which also needs this batch file to exist called:

 

sandbox-settings.bat

@echo off

:: To be used in conjuction with: Oracle Virtual Machine Script NEW.bat

:: This script runs as a new window so that it can take advantage of the new vbox commands, after installation.

:: No user input or echoing is used as this script will only run for a few seconds, and the main one takes precedence.

C:

cd "C:\Program Files\Oracle\VirtualBox"

:: Uses the Virtual Box command line to disable all menu and status bars on the virtual operating system.

VBoxManage.exe setextradata global GUI/Customizations noMenuBar,noStatusBar

:: When moving a virtual box from one computer to another, the virtual media needs to be disconnected, and reconnected, or it will be unable

:: to recongise the image on the new machine. This was previously done manually, but can now be automated.

:: The following command disconnects the virtual media from port 0, of the SATA interface.

VBoxManage.exe storageattach "Sandbox Clone" --storagectl "SATA" --port 0 --device 0 --medium none

:: Re-attaches the virtual media to the operating system, and sets it so that it can be written to. This will allow the VM to start-up.

VBoxManage.exe storageattach "Sandbox Clone" --storagectl "SATA" --device 0 --port 0 --type hdd --mtype normal --medium "C:\sandbox\Sandbox Clone-disk1.vdi"

cd "C:\Program Files\Oracle\VirtualBox"

:: PLEASE READ

:: The first time the Virtual Box is started via this script, the image has a scheduled task that is set to run when the first user logs in.

:: It will run a .exe file on the Desktop which will activate Windows, delete itself, and shut-down the computer.

:: This process will all happen automatically and no user interaction is necessary. The reason this could not be completely done through the command line

:: is that Windows scans the hardware of each new computer to manage its licensing. By having a portable VM that is immutable, it will constantly

:: require you to restart your computer, and enter a new activation code. Therefore, each workstation is validated, and licensed by Windows separately,

:: before being made immutable through this process.

 

:: The script will hold until the VirtualBox executable shuts down, once the scheduled task completes.

start /wait virtualbox.exe --startvm "Sandbox Clone"

:: Disconnects the current virtual media so that it can be made immutable.

VBoxManage.exe storageattach "Sandbox Clone" --storagectl "SATA" --port 0 --device 0 --medium none

:: Re-attaches the virtual media as an immutable media, so that it cannot be altered, and will always revert back to its original state.

VBoxManage.exe storageattach "Sandbox Clone" --storagectl "SATA" --device 0 --port 0 --type hdd --mtype immutable --medium "C:\sandbox\Sandbox Clone-disk1.vdi"

:: Disconnects the network connection between the Virtual Box and the host machine, once Windows has authenticated the license.

VBoxManage modifyvm "Sandbox Clone" --nic1 none

cd "C:\Program Files\Oracle\VirtualBox"

:: Starts the Virtual Box a final time so that the technician can do a final check on whether it is operating correctly.

start /wait virtualbox.exe --startvm "Sandbox Clone"

exit

  • Thanks 4
  • 1 month later...
  • 7 months later...
Posted

We've implemented the setup that others have suggested here whereby we have Virtualbox installed on all of the client PCs running a VM with is isolated from the host PC (and the rest of our network) other than a single mapped drive to the home drive of the logged on user. This is working well however our head of computing has requested internet access for the VM and I'm not sure whether this is feasible using VirtualBox whilst keeping the VM isolated from the rest of our network?

 

Have any other schools implemented any solutions which give the VM internet access but isolated it from client PC and the rest of the network?

Posted

Doable but will be a fiddle - off the top of my head, create a new vlan on the network and tag it to the machines hosting the VM, set up virtualbox if possible with a second network adapter using that vlan only and have it so it routes only to the internet.

Could very well be a simpler way

  • Thanks 1
Posted
Doable but will be a fiddle - off the top of my head, create a new vlan on the network and tag it to the machines hosting the VM, set up virtualbox if possible with a second network adapter using that vlan only and have it so it routes only to the internet.

 

I did wonder if there might be VLAN options within VirtualBox but as you say sounds like a nightmare to try to work out the VLAN setup and even then there's the question of how to log specific user activity given there's likely no user authentication.

 

Does anyone know if any other software like VMware which might make the setup simpler as I may be able to find budget for if it would work better? Maybe some kind of virtualised VDI setup to run the VM's on a server and give the pupils access to that rather than individually configuring each client PC?

 

Still mulling over the options really:confused:

Posted

You could indeed host them on a single machine, but that'd be dependent on how many concurrent users you have. A class set of 30 is doable if you've a decent enough host, either down the VDI route or virtualising. Either way, you could set up a separate network for that host to sit on and it'll be easier to "bridge" for your users to connect to that whilst it has no links to the network otherwise. Not sure about mapping drives to student areas like in Vbox though.

Might be worth putting a nose out and see if anyone has any older VDI gear they're getting rid of. Or maybe multipoint servers?

  • Thanks 1
Posted

We just let them have internet access on the transparent byod proxy, monitor with ABtutor.

 

VM's setup on specific machines that are locked outside of lesson times.

 

Seems to work quite well.

Posted
Our students just minimise the Virtual machine and use the web through the host machine.. or is that too logical?

 

That's how its done here too.

Posted (edited)

I think the teaching staff had the concern that pupils might lose changes to projects and settings if it's stored on a virtual machine that's reset on shutdown or changed by other pupils using the same computer/account . If they use cloud/shared storage it relies on them having to transfer code back and forth during the class with the potential to lose work if they forget.

 

We offered them a setup with just an internet connection 'off network' but they want access to network resources/shares from the virtual dev/programming environment. A few other local schools I've spoken just run web servers/dev environments and programming apps locally on client PCs on the live main network but I'm apprehensive about that. Maybe I could use a client firewall or VLANs to try and minimise any potential risk.

 

Not sure if I'm being over-zealous when it comes to security or if the teaching staff are looking for too much flexibility. We can hopefully find some kind of compromise.

 

Is running programming, scripting and dev environments on a live network what other schools generally do?

Edited by flyinghaggis
Posted

 

Is running programming, scripting and dev environments on a live network what other schools generally do?

 

Yes, but only in a sandbox environment - and they simply copy their code to their H:\ drives at the end of the lesson.

  • 2 weeks later...
Posted (edited)

Hi All

I have just completed a Windows 7 vm for my school programming class. I have a massive 42GB vm. That's just the OS, updates, VS 2015 Community, MS SQL Express along with Python. Have around 6.5GB free. This took a while, I was trying to use a previous VM done on a 64bit Windows 7 host but the package wouldn't deploy. So started from scratch on a 32bit host and the thing just worked.

 

RM CC4.5

Windows 7 32bit 4GB host

RM Oracle Virtualbox

Oracle Virtualbox 4.3.28

vm Windows 7 1.6 GB 41GB HDD 6.5GB free

Visual Studio 2015 Community C++, VB.Net, C#, Phyton, MS SQL Express

User N drive mapped to gust OS, clipboard enabled, NIC disabled.

Edited by WhiteStar1
Posted
Our students just minimise the Virtual machine and use the web through the host machine.. or is that too logical?

That's what we do too. Although I just finished my Windows 7 vm, we have had an Ubuntu vm running for about a year and that works but it was a pain in the rear without the clipboard working with the Windows host.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...