Creates a machine with ssh

For openvz you can use 'pvectl':

Code:
pvectl vzcreate <vmid>   
        --ostemplate NAME          specify OS template
        --mem  MBYTES              memory in MB (64 - 8192)
        --swap  MBYTES             swap memory in MB (0 - 8192)
        --disk GBYTE               disk space in GB (0.5 - 1024)
        --cpus  N                  cpus (1 - 4)
        --cpuunits  N              cpu units (8 - 500000)
        --onboot [yes|no]          start at boot

For kvm, you can use 'qm' (see "man qm")
 
Sorry, the documentation in not complete. Here is the full list of options from the source code:

Code:
    if (!GetOptions ('mem=i' => \$opt_mem,
                     'swap=i' => \$opt_swap,
                     'disk=f' => \$opt_disk,
                     'cpus=i' => \$opt_cpus,
                     'cpuunits=i' => \$opt_cpuunits,
                     'quotatime=i' => \$opt_quotatime,
                     'quotaugidlimit=i' => \$opt_quotaugidlimit,
                     'ipset=s' => \$opt_ipset,
                     'hostname=s' => \$opt_hostname,
                     'description=s' => \$opt_description,
                     'searchdomain=s' => \$opt_searchdomain,
                     'nameserver=s@' => \$opt_nameserver,
                     'onboot=s' => \$opt_onboot,
                     'netif=s' => \$opt_netif,
                     'rootpasswd=s' => \$opt_rootpasswd,
                     'ostemplate=s' => \$opt_ostemplate)) {
...
 
Sorry, but we currently do not have a documented API. Please take a look at the source code (or use the web interface to create vms)