[pve-devel] Migration through proxmox API / pvesh?

Alexandre DERUMIER aderumier at odiso.com
Mon Feb 4 17:18:18 CET 2013


Hi Stefan,

I never try it, but it's possible. (as pve-manager use the api, you can do all the thing that pve-manager do)


/usr/share/perl5/PVE/API2/Qemu.pm


__PACKAGE__->register_method({
    name => 'migrate_vm',
    path => '{vmid}/migrate',
    method => 'POST',
    protected => 1,
    proxyto => 'node',
    description => "Migrate virtual machine. Creates a new migration task.",
    permissions => {
        check => ['perm', '/vms/{vmid}', [ 'VM.Migrate' ]],
    },
    parameters => {
        additionalProperties => 0,
        properties => {
            node => get_standard_option('pve-node'),
            vmid => get_standard_option('pve-vmid'),
            target => get_standard_option('pve-node', { description => "Target node." }),
            online => {
                type => 'boolean',
                description => "Use online/live migration.",
                optional => 1,
            },
            force => {
                type => 'boolean',
                description => "Allow to migrate VMs which use local devices. Only root may use this option.",
                optional => 1,
            },
        },
    },
    returns => {
        type => 'string',
        description => "the task ID.",
    },

----- Mail original ----- 

De: "Stefan Priebe - Profihost AG" <s.priebe at profihost.ag> 
À: pve-devel at pve.proxmox.com 
Envoyé: Lundi 4 Février 2013 15:27:46 
Objet: [pve-devel] Migration through proxmox API / pvesh? 

Hi, 

is it possible to execute a migration through the API / pvesh? 

Stefan 
_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



More information about the pve-devel mailing list