Can I create a VM from an ISO via a script?

Discussion in 'Linux Guest OS Discussion' started by JayN@VI, Jan 23, 2012.

  1. JayN@VI

    JayN@VI Bit poster

    Messages:
    3
    Is it possible to write a bash script for my Mac that will take an OpenSuse Linux ISO and create a Parallels VM? Using the File -> New -> VM-creation-Wizard is tedious and error prone. I'd like to automate the process from a script.

    Ideas?
     
  2. mmika

    mmika Pro

    Messages:
    488
    man prlctl
    =)
    parallels contains command line tool utility.
     
  3. JayN@VI

    JayN@VI Bit poster

    Messages:
    3
    I am aware of prlctl, but I don't see documentation in the man page nor online for the task of creating a VM from an ISO.
     
  4. mmika

    mmika Pro

    Messages:
    488
    I have tried google to find some examples and found this script:
    http://testdrive.sourcearchive.com/documentation/3.13/parallels_8py_source.html

    So, generally you need execute several commands:

    export $VM_NAME="virtual_machine_name"
    export $PATH_TO_ISO="path_to_iso_image_file"

    $prlctl create $VM_NAME --ostype linux --distribution suse
    $prlctl set $VM_NAME --device-set cdrom0 --image $PATH_TO_ISO --connect
    $prlctl start $VM_NAME

    and so on.

    Also you can use UUID value instead of VM name
     
  5. JayN@VI

    JayN@VI Bit poster

    Messages:
    3
    Excellent. The prlctl commands above work perfectly.

    Thank you very much
     

Share This Page