Start console-only Linux virtual machines at boot time?

Discussion in 'Parallels Workstation for Windows and Linux' started by gwiesenekker, Nov 12, 2006.

  1. gwiesenekker

    gwiesenekker Bit poster

    Messages:
    7
    I have several console-only Linux virtual machines that I would like to start automatically when the host boots. Is there a way to do this?

    Regards,
    Gijsbert
     
  2. constant

    constant Forum Maven

    Messages:
    1,010
    .
    Write an init script. Or easier would be to put a shortcut into your autostart directory.
    .
     
  3. gwiesenekker

    gwiesenekker Bit poster

    Messages:
    7
    What command-line should the init-script contain? I can specify the VM configuration file when I start the parallels command, but I still have to manually click the 'Power on' button to start the VM.

    Regards,
    Gijsbert
     
  4. constant

    constant Forum Maven

    Messages:
    1,010
    .
    Just set the VM to autostart through Parallels configuration.
    .
     
  5. gwiesenekker

    gwiesenekker Bit poster

    Messages:
    7
    Thanks, that worked. A tip: my Linux host is a standalone server that usually does not run an X server, but for parallels you need one. I use Xvnc:

    Use vncpasswd to configure a vnc password

    The startup script contains the commands:

    Xvnc -geometry 1024x768 PasswordFile=.vnc/passwd :1 &
    sleep 10
    xsetroot -solid grey
    twm &
    parallels path-to-.pvs file

    you can start this script at boot time from /etc/rc.local using:

    su your-user-id -c 'nohup path-to-startup-script &'

    Xvnc is also easy to tunnel through your firewall using ssh (see the vnc FAQ), which makes it easy to check the status of your virtual machines remotely using vncviewer.

    Regards,
    Gijsbert
     
  6. constant

    constant Forum Maven

    Messages:
    1,010
    .
    That would be a good post for the howto forum.
    .
     
  7. gwiesenekker

    gwiesenekker Bit poster

    Messages:
    7
    Done!

    Regards,
    Gijsbert
     

Share This Page