How do I lock down a VM?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
supercrazymark
Posts: 31
Joined: 14. May 2013, 11:42
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 32bit
Location: Salisbury
Contact:

How do I lock down a VM?

Post by supercrazymark »

Hello,

I am very new to VirtualBox and would appreciate some guidance please...

I would like to use VirtualBox in our school (I am the Network Manager) for the students to be able to open up a virtual machine and do their programming course.

I have used VirtualBox Manager to create the VM but would like a way that a student can simply click on an icon and the VM runs without giving them any options to change anything. I am sure this is possible and would appreciate some help in achieving this.

Our stations are a mix of Win 7 64bit & 32bit and the VM will be either Win 7 or 8.

Thank you.

Mark
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: How do I lock down a VM?

Post by mpack »

Moved to "Windows Hosts".

You can create a desktop shortcut for any VM: right click, create shortcut. VirtualBox has some options to lock various features of the VM (see user manual for details), but these are not IMHO proof against a determined attack, e.g. someone could simply copy the virtual disk and create a new VM around it. However the shortcut trick should work well enough to deflect curiosity for someone not familiar with VirtualBox.
supercrazymark
Posts: 31
Joined: 14. May 2013, 11:42
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 32bit
Location: Salisbury
Contact:

Re: How do I lock down a VM?

Post by supercrazymark »

Thank you for your quick reply mpack :D

Just creating a shortcut is good (and I have tried that) but when double clicked it gives the VirtualManager options along the top...

Looking at the manual it looks like secation titled "Locking down the VirtualBox manager GUI" looks to be a good solution but I can't seem to get it to work...

From a command prompt I typed "vboxmanage list vms" which gave me a list of VMs and their GUIDs

Now I am trying to enter a command that starts a VM with the NoMenuBar and NoStatusBar applied...

Whatever I try doen't work and I think it is my in-experience that is causing this. If my GUID is 90d96186-e48d-421f-b66a-ba662f081c65 what cmd should I type to start that VM with no status bar or menu in the VirtualBox Manager?

Thank you again for helping me :-)

Mark
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: How do I lock down a VM?

Post by mpack »

I've not needed to try them, but it looks like the noMenuBar etc options are global, i.e. apply to all VMs, so the VM name or UUID would not form part of the command. I would expect the command to be e.g. :-

Code: Select all

VBoxManage setextradata global GUI/Customizations noMenuBar,NoStatusBar
supercrazymark
Posts: 31
Joined: 14. May 2013, 11:42
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 32bit
Location: Salisbury
Contact:

Re: How do I lock down a VM?

Post by supercrazymark »

In a dos box I typed:

Code: Select all

VBoxManage setextradata global GUI/Customization noMenuBar,NoStatusBar
That thought for a bit then returned the cursor.

Then I entered:

Code: Select all

VBoxManage startvm "Win732bit"
(win732bit being the name of my VM)

The VM started fine but still had the menu bar at the top and the status bar at the bottom :(

Am I mis-understanding how this all works?

Mark
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How do I lock down a VM?

Post by Perryg »

Try running the two commands separately.
supercrazymark
Posts: 31
Joined: 14. May 2013, 11:42
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 32bit
Location: Salisbury
Contact:

Re: How do I lock down a VM?

Post by supercrazymark »

I did... I ran the first command, waited for the cursor to return and then ran the 2nd command.....
supercrazymark
Posts: 31
Joined: 14. May 2013, 11:42
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 32bit
Location: Salisbury
Contact:

Re: How do I lock down a VM?

Post by supercrazymark »

This is what was in my cmd box:

Code: Select all

C:\Program Files\Oracle\VirtualBox>VBoxManage setextradata global GUI/Customization noMenuBar,NoStatusBar

C:\Program Files\Oracle\VirtualBox>VBoxManage startvm "Win732bit"
Waiting for VM "Win732bit" to power on...
VM "Win732bit" has been successfully started.

C:\Program Files\Oracle\VirtualBox>
The VM started fine, but the menu was at the top and status bar was at the bottom....
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: How do I lock down a VM?

Post by Perryg »

VBoxManage setextradata global GUI/Customizations noMenuBar,noStatusBar

The "s" is a lower case and must be present. Increased the size and color to make it stand out.
supercrazymark
Posts: 31
Joined: 14. May 2013, 11:42
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Windows 7 32bit
Location: Salisbury
Contact:

Re: How do I lock down a VM?

Post by supercrazymark »

That works! Thank you very much :D

Now I am begining to understand how it works and am looking forward to configuring and deploying the VM's around the school...

Mark
Chris S
Posts: 1
Joined: 25. Jun 2013, 12:59

Re: How do I lock down a VM?

Post by Chris S »

Hi

The information that's already on this thread has helped me alot so thank's for that. Does anyone know how i could incorporate the two commands which lock down the GUI and run the virtual machine into a desktop short cut.

Any help would be greatly appreciated.

Chris
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: How do I lock down a VM?

Post by mpack »

They don't need to be incorporated into the shortcut. The "noMenuBar" etc commands are a one time deal: issue the command once, and it's done until you manually undo it (or until the user works out how to edit VirtualBox.xml).
Post Reply