ArtinSoft's Blogs

Software Migration Experts
Welcome to ArtinSoft's Blogs Sign in | Join | Help
in Search

Stephen Murillo Blog

Provided by ArtinSoft, a lead company on the development of migration solutions; this blog is dedicated to information technologies in general. I joined this company on July 2006 as a contractor and I work as a professional trainer on information technologies, mostly for Microsoft's virtualization solutions and ArtinSoft's migration technologies.

January 2007 - Posts

  • Offline Virtual Floppy Disks

    Virtual Server 2005 R2 SP1 Beta 2 includes VHD offline mounting, which can be very useful to read the contents of a virtual hard drive from the host, without having to load a virtual machine to do the job.

    It might be useful from time to time for some people to have the same feature for Virtual Floppy Disks (.vfd) files. Just to give you an example, some tools depend on floppy disks to create backups that you may be interested on accessing from a physical machine.

    This feature is not available with Virtual Server and it probably won't be (I don't think Microsoft would consider this a priority). But if you ever happen to need this, Ken Kato has created a Virtual Floppy Driver that you can use. It lets you view, edit, rename, delete or create files on a virtual floppy disk.

    If you browse around the site you will also find a lot of VMWare tools that you might find useful.

  • Virtual Server scripts inside virtual machines

    If you are familiar with Virtual Server you know that you can use it to run scripts on the Host OS by attaching them to events, such as: turning on or off the Virtual Server service, or turning on or off a virtual machine.

    But these scripts run on the host. What if you want to launch an application inside the guest OS?

    Suppose you have a VBScript file called MyVBScript.vbs, and you want to run it inside the guest operating system of a virtual machine, or a bunch of them. You can create an ISO image that will contain an Autorun configuration that will execute this script. Once that's done, you can simply attach the ISO file to the virtual machine(s) where you want your script to run.

    We will use the unauthorized ISO Recorder Power Toy to create the ISO file. ISO Recorder v2.0 works on Windows XP and Windows 2003. After you install this application you will be able to create ISO files out of folders in your filesystem.

    1. Create a new folder. Let's call it VMScript.
    2. Copy MyVBScript.vbs to the VMScript folder.
    3. Create a new file in the folder called Autorun.inf.
    4. Edit the Autorun.inf file and add the following lines:
    5. [autorun]
      open=wscript MyVBScript.vbs

    6. You can replace the text after "open=" if you want to execute a different command line, you can even launch an application with a UI.
    7. Save the Autorun.inf file.
    8. Right clik on the VMScript folder and select Create ISO image file.

      isorecorder
    9. Follow the wizard steps and a new file called RemoteScript.iso will be created. This is the CD/DVD image that you can attach to the virtual machine where you want the script to run. When you do, unless the Autorun feature has been disabled, your script will launch in the guest OS.

    This is the same technique that Microsoft uses to launch the VM Additions and the precompactor. Now you can exploit this and even create interesting combinations. For instance you can attach a script to an event in Virtual Server that will attach your ISO file to a virtual machine.

    IMPORTANT NOTES:

    • ISO Recorder is meant to be used for personal use, but it is used by a number of companies around the world. I have found no problems with it. Make sure you read the license agreement and documentation for this application.
    • AutoRun is normally enabled by default on Windows operating systems. For more information on this read CD AutoRun basics.
    • If you are not that familiar with Virtual Server and you don't know how to attach ISO files, manage removable media or attach scripts to Virtual Server, read the Virtual Server Administrator's Guide included in the installation package.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems