Guest reboots when Host reboots?

Discussion in 'Virtual PC' started by Theresa, Sep 5, 2008.

  1. Theresa

    Theresa Guest


    I was wondering if there was anyway to have a VM automatically restart after
    the Host machine restarts (i.e. if the host machine reboots, I would like the
    guest machine to restart as well). I noticed there were some options in
    Virtual Server, but I havnt seen anyting for Virtual PC. Thanks!
    Theresa, Sep 5, 2008
    1. Advertisements

  2. Theresa

    Bo Berglund Guest

    Works only when someone logs in to the newly rebooted Windows PC....

    But if you want to boot up the guest when the host boots up then you
    need a service system like Virtual Server, it will be independent of
    any user logging on to the host PC.
    VPC2007 is not designed for this, its target is desktop (workstation)
    virtualization, whereas VS2005 aims primarily for server
    Bo Berglund, Sep 5, 2008
    1. Advertisements

  3. Theresa

    Tim Walsh Guest

    You can use the Task Scheduler to accomplish this. Basically you'll need to
    create a command file on the host machine. To do this open notepad and type
    the following into the open window:

    "C:\Program Files\Microsoft Virtual PC\Virtual PC.exe" -pc "DOS
    6.22" -singlepc -launch

    The quotes are necessary due to the spaces in my path and naming convention.
    Change the path and pc name to match your own path and VM name. Once you
    have done this save the file to the local hard drive, I use a folder
    directly off the root of the C: drive called Tasks to save these types of
    files in. Name it something that will make sense to you later, like "Launch
    VM DOS6_22.cmd". I'm assuming you already know that by giving it a .cmd
    extension the file becomes a command file and can be run by double clicking
    it. TEST the file by double clicking on it and verifying the VPC starts the
    VM for you. If it doesn't edit the file and verify your path and name are
    correct. If the file doesn't run, verify that the file extension is correct,
    Microsoft did us no favors when they decided to hide the file extensions
    from us, and notepad might have added a .txt to the end of the file for you.

    Once you have your command file working properly, open your control panel
    and select the Scheduled Tasks icon. Be patient while it populates the list
    for you. Select the Browse button and then go to where you saved the file
    above and select it. From the next window select the "When my computer
    starts" option. You can also give the job a name at this point, but it will
    usually use the file name and should already make sense to you. On the next
    window you'll need to decide which credentials to use to start the job, it's
    best to use some that don't require the password to change periodically, and
    even better would be to create a local account or network account
    specifically for scheduled tasks to use, and then restrict it to the
    appropriate permissions on the box.

    Finish the wizard and test your job by right clicking on the job and
    selecting run. It should start. If you used a different account to run the
    job under then you are currently logged in as the job will start, but you
    won't be able to see it and you won't be able to launch Virtual PC in your
    session since it's already running on the host machine. Only one instance of
    virtual machine can run on a host machine at a time.
    Tim Walsh, Sep 6, 2008
  4. Theresa

    Tim Walsh Guest

    I probably should mention that if you use this approach there are some
    serious limitations depending upon what your doing.

    1) With VPC running you won't be able to run a second instance of it on the
    machine, so you won't be able to modify or create new VMs unless you
    shutdown the first running instance of VPC using the Task Manager.

    2) I've never been able to open the VPC console to get to the running VMs,
    so you need to ensure your VMs are configured for remote access, eg Remote
    Desktop is enabled on a windows machine. I'm not sure what you'd use on a
    Linux machine.

    3) The credentials you use to run VPC under need to have access to the VM
    files, and the VM needs to have been setup under those credentials before
    you start it using this method. I believe there is a command line switch
    that you can use to do the registration the first time, but haven't used it
    before. If you don't set the VM up first you'll find that VPC is running,
    but is waiting for you to configure the VM.

    4) I've never tried it, but in theory you could use multiple VMs by just
    launching the VPC directly with the auto start feature enabled.

    5) When you reboot the host you'll want the VMs to respond appropriately,
    shutdown or turnoff or save state, make sure you've configured them
    Tim Walsh, Sep 7, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.