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)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!