So, I'm trying to build a Windows 7 (Guest) VM with various programming tools for computing students, so that it's sandboxed and unconnected to the main school network. The VM has been built and all ready as I need it to be. I want the VM to just be a shortcut for student's, so that they don't need to launch VirtualBox, only the VM. The vdi has been made Immutable, so the students can mess all they want, it resets on shutdown. I have changed the Default machine folder to C:\ProgramData\VirtualBox VMs. Here is a list of things I've tried and the problems encountered.
1) So, the VM has been created on a Windows 10 host, using a domain admin login account. I then right clicked the VM and chose Create shortcut on Desktop. For local testing, I put that shortcut in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Lin.lnk (Lin being the name of the VM. I then on the same Windows 10 host, I logged on as a Student domain account, found the shortcut (Lin.lnk) and clicked on it to run the VM. It returned the following error message "there is no virtual machine with the identifier". Also in the VBoxSVC log file it had the following:
2) The second thing I tried was put the following commands in a vbscript and put a shortcut to the vbscript, same as I did with the first step. The vbscript looks like this:00:00:00.194957 VirtualBox: object created 00:00:00.222532 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={9570b9d5-f1a1-448a-10c5-e12f5285adad} aComponent={VirtualBoxWrap} aText={Could not find a registered machine with UUID {dd9979b9-60af-4966-9e66-7c80ff5ca46a}}, preserve=false aResultDetail=0"
Code: Select all
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run """C:\Program Files\Oracle\VirtualBox\vboxmanage.exe"" registervm ""C:\ProgramData\VirtualBox VMs\XP\XP.vbox""", 0
objShell.Run """C:\Program Files\Oracle\VirtualBox\vboxmanage.exe"" setextradata global GUI/SuppressMessages remindAboutAutoCapture,remindAboutMouseIntegration On,showRuntimeError.warning.HostAudioNotResponding ,remindAboutGoingSeamless,remindAboutInputCapture, remindAboutGoingFullscreen", 0
objShell.Run """C:\Program Files\Oracle\VirtualBox\vboxmanage.exe"" setextradata global GUI/RestrictedGlobalSettingsPages General,Input,Update,Language,Display,Network,Exte nsions,Proxy", 0
objShell.Run """C:\Program Files\Oracle\VirtualBox\vboxmanage.exe"" setextradata global GUI/Customizations noSelector", 0
objShell.Run """C:\Program Files\Oracle\VirtualBox\vboxmanage.exe"" setextradata Windows7 GUI/RestrictedRuntimeMenus Machine,View,Devices,Help,Debug", 0
objShell.Run """C:\Program Files\Oracle\VirtualBox\vboxmanage.exe"" setextradata Windows7 GUI/RestrictedStatusBarIndicators HardDisks,OpticalDisks,FloppyDisks,Network,USB,Sha redFolders,Features,Mouse,Keyboard", 0
objShell.Run """C:\Program Files\Oracle\VirtualBox\vboxmanage.exe"" setextradata Windows7 GUI/RestrictedCloseActions SaveState,PowerOff,Restore", 0
objShell.Run """C:\Program Files\Oracle\VirtualBox\vboxmanage.exe"" startvm C:\ProgramData\VirtualBox VMs\XP\XP.vdi""", 1
The idea is to copy the entire VM & it's associated files/folders and distribute to a IT Suite of 20 computers. I feel I'm so close to achieving this but really don't know what I need to do to over the errors. Any assistance from you would be greatly appreciated.Code: Select all
VirtualBox COM Server 5.2.6 r120293 win.amd64 (Jan 15 2018 14:58:38) release log 00:00:00.002001 main Log opened 2018-02-17T15:52:49.908419200Z 00:00:00.002001 main Build Type: release 00:00:00.002001 main OS Product: Windows 8.1 00:00:00.002001 main OS Release: 6.3.9600 00:00:00.002001 main OS Service Pack: 00:00:00.010009 main DMI Product Name: MS-7817 00:00:00.016015 main DMI Product Version: 1.0 00:00:00.016015 main Host RAM: 8069MB (7.8GB) total, 6342MB (6.1GB) available 00:00:00.016015 main Executable: C:\Program Files\Oracle\VirtualBox\VBoxSVC.exe 00:00:00.016015 main Process ID: 4348 00:00:00.016015 main Package type: WINDOWS_64BITS_GENERIC 00:00:00.018016 VirtualBox: object creation starts 00:00:00.018016 Home directory: 'C:\Users\wmbtest\.VirtualBox' 00:00:00.018016 Installed Drivers: 00:00:00.019018 C:\windows\system32\DRIVERS\VBoxNetLwf.sys (Version: 5.2.6.20293) 00:00:00.020021 C:\windows\system32\DRIVERS\VBoxUSBMon.sys (Version: 5.2.6.20293) 00:00:00.020021 C:\windows\system32\DRIVERS\VBoxDrv.sys (Version: 5.2.6.20293) 00:00:00.020021 C:\windows\system32\DRIVERS\VBoxNetAdp6.sys (Version: 5.2.6.20293) 00:00:00.159431 HostDnsMonitor: old information 00:00:00.159431 no server entries 00:00:00.159431 no domain set 00:00:00.159431 no search string entries 00:00:00.159431 HostDnsMonitor: new information 00:00:00.159431 server 1: 10.88.160.21 00:00:00.159431 server 2: 10.88.0.21 00:00:00.159431 domain: school 00:00:00.159431 no search string entries 00:00:00.159431 HostDnsMonitorProxy::notify 00:00:00.213709 VD: VDInit finished with VINF_SUCCESS 00:00:00.214709 VirtualBox: object created 00:00:00.218213 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={9570b9d5-f1a1-448a-10c5-e12f5285adad} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'C:\ProgramData\VirtualBox'}, preserve=false aResultDetail=0 00:00:00.218213 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={9570b9d5-f1a1-448a-10c5-e12f5285adad} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'Windows7'}, preserve=false aResultDetail=0 00:00:00.218213 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={9570b9d5-f1a1-448a-10c5-e12f5285adad} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'Windows7'}, preserve=false aResultDetail=0 00:00:00.219714 Saving settings file "C:\Users\wmbtest\.VirtualBox\VirtualBox.xml" with version "1.12-windows" 00:00:00.220214 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={9570b9d5-f1a1-448a-10c5-e12f5285adad} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'Windows7'}, preserve=false aResultDetail=0 00:00:00.221716 ERROR [COM]: aRC=VBOX_E_OBJECT_NOT_FOUND (0x80bb0001) aIID={9570b9d5-f1a1-448a-10c5-e12f5285adad} aComponent={VirtualBoxWrap} aText={Could not find a registered machine named 'VMs\XP\XP.vdi'}, preserve=false aResultDetail=0 00:00:00.224218 Loading settings file "C:\ProgramData\VirtualBox VMs\XP\XP.vbox" with version "1.15-windows" 00:00:00.232227 Saving settings file "C:\Users\wmbtest\.VirtualBox\VirtualBox.xml" with version "1.12-windows" 00:00:05.241019 main VirtualBox: object deletion starts 00:00:05.241019 main ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Medium 'C:\ProgramData\VirtualBox VMs\XP\Snapshots/{cfa17718-3029-4256-b718-b18b600d099f}.vdi' cannot be closed because it is still attached to 1 virtual machines}, preserve=false aResultDetail=0 00:00:05.241019 main ERROR [COM]: aRC=VBOX_E_OBJECT_IN_USE (0x80bb000c) aIID={4afe423b-43e0-e9d0-82e8-ceb307940dda} aComponent={MediumWrap} aText={Cannot close medium 'C:\ProgramData\VirtualBox VMs\XP\XP.vdi' because it has 1 child media}, preserve=false aResultDetail=0 00:00:05.247732 Watcher ERROR [COM]: aRC=E_ACCESSDENIED (0x80070005) aIID={9570b9d5-f1a1-448a-10c5-e12f5285adad} aComponent={VirtualBoxWrap} aText={The object is not ready}, preserve=false aResultDetail=0 00:00:05.247732 main VirtualBox: object deleted
Thank you
Manny