Jump to content

Recommended Posts

Posted

Hi all,

 

we've just deployed vbox coding environment to a bunch of IT rooms with VS community 2017 installed on the base image. Our vbox environment is locked down, with no network card attached and therefore no internet connection. It only allows students access to their home directly via a mapped drive from the PC vbox is running on. Our vbox image also has an immutable disk, so each reboot it resets to it's fresh build status. i was hoping this was going to save us from the activation count down, but because VS uses a fixed date (30 days after the initial install) it continues to count down and on further investigation it checks out to the internet every 12 hours.

 

the way it's supposed to be activated is with a free sign up from the student, upon logging in with their account it will then activate the product and continually check every 12 hours. so presumably even if i alter the base image by activating VS with a dummy account before making it immutable, it will still deactivate itself?

 

Any advice/help would be much appreciated.

 

Cheers,

 

Matt

Posted

Update:

 

I've found a bit of a workaround, but it isn't perfect.

 

Basically i just made it groundhog day on 3rd Oct 2018 so that it is always within the trial period.

 

There are two vbox commands which are needed, one disables time syncing to the host, and the other can move the virtual machine bios clock forwards or backwards by milliseconds.

 

"C:\Program Files\Oracle\VirtualBox\vboxmanage.exe" setextradata "VM Name" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1

 

"C:\Program Files\Oracle\VirtualBox\vboxmanage.exe" modifyvm "CodingEnv01" --biossystemtimeoffset

 

Visual studio is clever enough, that if you set the virtual machine clock before the install date, it will say the trial has run out, so i needed to find a way to keep the time in the 'sweet spot', as our own date moves forward.

 

using vbs i got the difference in milliseconds between todays date and a date just after the install (3rd Oct 2018)

 

dtm1=int(Now)dtm2="03-Oct-18"intSecondsDifferent=DateDiff("s", dtm1, dtm2)intmilliseconds=intSecondsDifferent * 1000

 

now i had this i worked it into the logon script which locks down the virtualbox.

 

The only problem i can foresee with this is if students need to code their projects referencing a system date!

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...