Portable Virtual Machine No Admin

Recently, I went to a client, where they assigned me a machine to work, but there was no software installed, and there was no admin rights to install any software. I had to set up my box to start development before all the red tape could be set, licenses assigned, software installed and so on.

Portable Virtual Machine No Admin

Copied the qemu directory onto a USB stick and then onto the machine with no admin rights, just under the user account (C: Users username qemu) Opened CMD prompt and cd’d into qemu, which is where the executable files live. I need to build a portable virtual machine that could be used on user restricted PCs that need admin permissions.I've heard about QEMU. But the problem is that it is very very slow when running. Is there a high performance alternative?I'm thinking of the ability to control the boot menu temporary without admin privileges, and boot up my custom.

So I thought to setup a box where I could install the software as standard user, with no need of any special licenses to get up und running for development in Dotnet Core and React with Typescript (the same steps can be used to develop with Angular or any other Javascript environment).

Initially, I installed Google Chrome (its developer tools are great and you can debug your Javascript apps in it). I went to Chrome site (https://www.google.com/chrome/), downloaded the installer and ran it. When it asked me the admin credentials, I clicked Cancel and the installer offered to install as Standard User.

Then I installed Visual Studio Code. It’s a terrific IDE to edit your programs (in any language) and even debug your apps. There are extensions to do everything, it’s really great. I used a direct link to download the portable version and unzip the zip file and add the path to VSCode with this Powershell script:

The next step is to install Node.js (https://nodejs.org/). Node.js is a JavaScript runtime, where you can run your Javascript Apps. I went to the Node site saw that there is a zip file for Windows (https://nodejs.org/dist/v12.13.0/node-v12.13.0-win-x64.zip). I created this Powershell script to download and install Node LTS:

You can open a Powershell window and type these commands or you can downlad and run the script file from my GitHub (link below).

The next step is to install Yarn (https://yarnpkg.com/lang/en/), a dependency manager running this command in the command line

  • Unlike nearly every emulator out there QEMU does not require admin access to run, making it a perfect candidate for building thumb-drive based portable virtual machines. Windows Virtual PC.
  • This application is a continuation of U.S. Patent application Ser. 11/740,936, filed on Apr. 27, 2007, entitled PORTABLE VIRTUAL MACHINE, which claims priority to U.S. Provisional Patent Application No. 60/746,021, Filed: Apr. 28, 2006, entitled PORTABLE VIRTUAL MACHINE, which is incorporated herein by reference in its entirety.
  • Running a virtual machine is a good way to use an operating system without installing it on your PC. For instance, you can test drive the latest Windows 10 Insider Preview or a new Ubuntu (Linux) distribution without any risk.

The last step is to install Dotnet core. There is no package to install it as a standar user, but there is a Powershell script to install it at https://dot.net/v1/dotnet-install.ps1. If you open a Powershell window and run the commands:

Now you are all set, your development machine is ready to go. To create a React app, just open a command line window and type these commands:

If you point your browser to http://localhost:3000, you will see:

Running Code . will open VS Code with the project folder open:

You can also create an Asp.NET Core MVC with the commands:

Portable Virtual Machine No Administrative

And open http://localhost:5000 in the browser to see the app running:

As you can see, with a few steps, you can setup a developer machine with no need of admin rights nor the need of any license, you can now start developing your full apps and debug them in VS Code.

That way, I could start and run from day one, and when the full install came, I was already developing.

After finishing the setting, I noticed that all the scripts are very similar, so I created a single script, Install-FromWeb:

When I was pushing the data to my GitHub, I noticed that Git for Windows (https://gitforwindows.org/) wasn’t installed. I checked the Git for Windows site and there is a portable version in https://github.com/git-for-windows/git/releases/download/v2.24.0.windows.2/PortableGit-2.24.0.2-64-bit.7z.exe. With it, you can use Git as a version control system. With that, you can install your machine with a single set of instructions:

Portable Virtual Machine No Administration

All the scripts are in my Github : https://github.com/bsonnino/DevMachine

So, happy development!

Portable virtual machine no administrative

Update: SORRY! It turns out that VirtualBox ties its configuration very closely to specifics of its host machine (such as through the MAC address), so I have to back away from the “portable” claim in this post’s title. Until VirtualBox realizes the value to them of supporting portability, using VirtualBox won’t actually help you go portable.

Portable Virtual Machine No Administrator

Previously, I described how to get some freedom from the “no admin privilege” restriction that many workplace computers have. That technique involved running specially-built versions of one’s applications from a thumbdrive. After trying that for a month or more, I grew tired of the following limitations:

  • Many useful apps aren’t built to run from a thumbdrive, often because they use the registry
  • Going back to Firefox from Chrome wasn’t a good fit for me (and Chrome isn’t really portable yet)
  • One can’t control default applications; for example, one can’t directly open links in messages in portable Thunderbird using one’s portable browser

There is a framework called qemu that allows running an entire operating system from a thumbdrive, and it can do so in a mode that doesn’t require admin privilege. But this mode can’t access USB peripherals like keyboards, mice, and other drives connected to the host computer. The final deciding factor against qemu for me is that OSs make many writes to the storage they boot from, and thumbdrives allow only thousands of writes before their storage capability degrades.

Portable Virtual Machine No Admin Fee

If you really want to try qemu before my final solution, here’s what I tried with it:

Portable Virtual Machine Without Admin

  1. Install Qemu manager on usb
  2. Set VM RAM to 512MB
  3. Give the VM whatever name you want, and whatever OS label you want…I used “Windows7Portable” for both
  4. Start VM
  5. In VM/Qemu Client, click CD Drive button in menu bar and browse to your Windows 7 RC ISO file
  6. Wait while OS installer gets going…I had to quit and go to bed before it finished

Portable Virtual Machine No Admin

Here are some related links that were helpful:

  • http://www.techbeta.org/portable-apps/portable-virtual-box/
  • local readme: file:///C:/Users/david/Desktop/qemu-0.9.1-windows/qemu-0.9.1-windows/qemu-doc.html#SEC5

Because qemu would not be able to use usb-connected keyboard and mouse, because I’d have to copy it to a new thumbdrive fairly often, and because it would be pretty slow by most accounts, I decided to give up on the “no admin privilege required” goal. Instead, I asked my IT dept to install VirtualBox. The following steps were inspired by a Lifehacker post.

  1. Get a portable hard drive. I got a Maxtor 160GB “Basics” model for about US$60.
  2. Plug in the drive to any machine you plan to use where you don’t have full control, then check that you can write to it. (For example, right-click in the drive contents shown in Windows Explorer and choose New | Text Document.) If you can’t write to it, ask your IT dept to grant you write permission for it.
  3. If you’re going to overwrite a virtual disk file you may already have on the portable drive, and you use Chrome, be sure to export your bookmarks and open tabs to the host first. (ouch)
  4. Have VirtualBox installed. Then copy its .VirtualBox directory to your portable hard drive.
  5. Start VirtualBox and go to File | Preferences | General. Change “Default Hard Disk Folder” and “Default Machine Folder” to .VirtualBoxHardDisks and .VirtualBoxMachines on your portable drive.
  6. In VirtualBox, press the New button.
  7. Click through the Next buttons, including leaving virtual memory at 512M.
  8. Click through more Next buttons, including the creation of a new boot (virtual) hard drive of size 20GB. This virtual drive will be kept in .VirtualBoxHardDisks
  9. Choose Dynamically-Sized storage
  10. Take a lunch break while the VDI is created. I also created a brief “reward if returned” text file with contact info at the root of the portable drive.
  11. Once your virtual drive is created, click the Settings button, then the CD/DVD tab and the Add button, and browse to the ISO file of the OS you want to run in the virtual machine. For me, this was Windows 7 RC and my “host” is Windows XP. Click Ok and return to the main VirtualBox window.
  12. Click the Start button. You should eventually see the OS installation prompts. Answer the prompts the way you would if you were installing to a machine sitting right next to your current one and on the same network.
  13. When the OS has been installed (it may need to reboot itself within the window a couple times, but won’t affect the rest of your computer), go to Devices and select Install Guest Additions. This will make it much easier to use your keyboard and mouse. (If you have difficulty getting to the menu, hit the Ctrl key on the right of your keyboard and then try again.)
  14. Once the OS is installed, you can move or delete the ISO file. If VirtualBox complains about not being able to find the ISO file, just use the button to remove it from the CD/DVD mounts.
  15. To get access to folders on the host machine:
    1. Turn on sharing for each of the folders you want to access.
    2. In your VM window, go to Devices | Shared Folders. The “Folder Path” browse button should allow you to select one of the folders you just shared
    3. To make the shared folder appear among the drives shown under Computer in your VM OS (“the guest machine”), go to the Start menu, type in “cmd”, and then type in “net use s: vboxsrvMyHostFolder” where MyHostFolder is replaced by the name of a folder you shared, and where s: is replaced by a drive letter not already in use.
  16. You should now be able to copy all the data folders from your host to the guest.
  17. Go ahead and install all the apps you need on the guest. I have some recommendations:
    1. Do not install an antivirus program. They can make your guest unusable by turning its display to snow and ignoring your commands. This is the most significant sacrifice I’ve encountered so far.
    2. Use Mozy to backup your data. The first 2GB is free, and you won’t have to remember to backup again.
    3. Windows Explorer settings
      • Change default folder to Computer
        1. Right-click on Windows Explorer in taskbar
        2. When “Windows Explorer” appears in the “jump list”, right-click on it and select Properties
        3. For Target, enter
      • Organize | Folder and Search Options | View
        • Show hidden files, folders, and drives => checked
        • Hide extensions for known file types => NOT checked
        • click Apply to Folders and have it apply to all folders
    4. Control Panel | Programs | Turn Windows features on or off | Games => NOT checked
    5. Control Panel | Taskbar and Start Menu | Start Menu | Customize
      • Computer, Control Panel, Personal folder = > Display as menu
      • Documents, Games, Music, Pictures => Don’t display
      • Run => checked
      • System admin tools => Display in All Programs and the Start menu
      • Use large icons => NOT checked
    6. Pin to taskbar: Cmd shell, Calculator, CharMap
    7. Set built-in Windows Defender (anti malware) to run everyday over lunchtime instead of at 2am, since the portable drive may be disconnected overnight.
    8. Media players like Winamp stutter when run in a VM. I run them from the host instead.
  18. If some of the options for setting screen resolution in your guest are disabled, you might be able to enable them by running this in a cmd window in the host:
  19. Whenever you need to take the portable drive with you, go to Machine | Close | Save Machine State. All your open windows and state will be saved and the VM will close. Quit VirtualBox so it doesn’t hold onto the VDI file on the drive, then unmount the drive via Safely Remove Hardware. If something still won’t let you unmount, then you may have to shutdown the host.
  20. I have been closing down my VM every night, because when I’ve allowed it to run for several days before shutting down, VirtualBox seems to get stuck in a “stopping” state. It’s not clear if this is a bug in VirtualBox or a behavior in Windows 7 that can be configured not to happen.
  21. Finally, as a note to myself, here are some preferred Win7 settings and applications:
    1. Desktop context menu | View | Small icons
    2. Unpin Windows Media and IE from taskbar
    3. Taskbar properties:
      1. Use small icons
      2. Dock at bottom
      3. Never combine/stack buttons
    4. My favorite apps:
      • Chrome from the dev channel
        • Create a shortcut and append –enable-sync to the Target value
        • While I would like to pin the shortcut to the taskbar, I’m not sure the –enable-sync flag would survive that, so I put the shortcut in the Startup folder instead. (My bookmarks on different machines have been out of sync for a few days, and I suspect this is because I was starting the browser from the taskbar.)
        • under (wrench menu)
          • Turn on syncing of bookmarks
          • Always show bookmarks bar
          • under Options
            • under Basics
              • On startup | Restore the pages that were open last
              • Home page | Show Home button on the toolbar => off
            • under Personal Stuff
              • Passwords | Offer to save
              • Themes | Get Themes | Themes by Google | Greyscale
            • under Under the Hood
              • Download location | Desktop
              • Ask where to save each file before downloading => off
        • Right-click on these tabs and select Pin to tab:
          • Evernote
          • Gmail
          • Gmail calendar
          • Google reader
        • Right-click in address box and select Edit Search Engines, then change these keywords:
          • Wikipedia => w
          • Google Scholar => s
          • Lifehacker => l (small L)
          • Amazon => a
          • Google groups => g
          • Download.com => d
          • Google image search => i
          • Youtube => y
          • Ebay => e
        • Wishlist: Save session/open-tabs, Pinned tabs, and Search Engine Settings to Google bookmarks or some obvious file that I could backup
        • Wishlist: An official theme that matches my Windows default theme!
      • Mozy
        • I keep all my files in 4 desktop folders; I backup only parts of these:
          • Business
          • Papers: Articles by others in PDF and HTML format
          • Projects: Workspaces for IDEs, Todo lists, etc
          • Tools: Portable apps, Printer drivers, Installers
        • Schedule | Alert me if a backup hasn’t happened in this many days => 1
        • Options
          • Notify me when a backup starts => off
          • Show status when a backup successfully completes => off
      • portable Thunderbird email client with Lightning calendar extension
        • Pin to taskbar
      • Notepad++
        • Pin to taskbar
        • Settings | Preferences
          • Global
            • Toolbar | Hide => checked
            • Tab bar | Vertical => checked
            • Tab bar | Enable close button on each tab => checked
          • Misc | Remember current session for next launch => checked
      • portable PDF XChange Viewer
        • Pin to taskbar
      • IZArc unzipper
        • During install, make these settings:
          • Explorer Enhancements tab: Extract Here, Extract to <folder>, Email, Create self-extracting, Test, Display icons on context menus => NOT checked
          • Program Locations tab: Default viewer => Notepad++
        • Wishlist: a setting that allows “Extract all subfolders” as the default
      • OpenOffice
        • Pin to taskbar
      • doPDF virtual printer (use browser’s Print command to create PDF version of webpages for archiving)
    5. Pidgin
      • Don’t pin to taskbar; it will be added to hidden system tray
      • Buddies | Show | Offline buddies
      • Create shortcut and drop in Startup folder
      • Preferences
        • Interface | Show IMs and chats in tabs => off
        • Conversations | Enable buddy icon animation => off
        • Sounds : Enabled only for “Message received”
        • Logging | Log all instant messages => on
    6. Google Calendar gadget. Move to lower right corner.
    7. Amzi Eclipse IDE version 8 for Prolog and Java
      • Pin to taskbar
      • Set workspace to DesktopToolsEclipseWorkspace
  22. One would think that “.pdf” would appear at Control Panel | “Associate a file type or protocol with a program” but it doesn’t. Instead, double-click any PDF, choose “select a program”, choose your PDF viewer, and make sure the checkbox is checked for “always use the selected program”. (This entire step is probably only necessary because I use the portable version of the viewer, and it doesn’t create entries in the registry.)
  23. Go to Control Panel | Devices&Printers and add the office Grayscale and Color printers
  24. Get more free wallpapers from Microsoft