Help with API - disk creation and assignment

Virtus

New Member
Dec 24, 2018
4
0
1
33
Hello!

I'm making a tool to migrate from vmware to proxmox. I've got everything done except for handling the disks.

I can't quite get the syntax right for creating LVM disks.

Ideally I want to create a bunch of 1gb LVMs when I import the configs, then resize them to the correct size later as I import the vmdk data into the LVMs.
If that's not something I can do through the API, I'll just create them to the full size initially.

I have qcow2 working, but not LVM. Syntax I am playing with is:
media=local-lvm:vm-1337-disk-1,size=250G

I am using proxmoxer/python for the tool, once i get approve from mgmt, I'll post a link to my repo
 
Also,

Doing this I've learned a ton about the API and proxmox. I would love to contribute to the documentation, especially the API documentation but it's a little unclear to me how I can do so. I can't even register on the wiki
 
so I figured it out, but it doesn't actually create the LVM, is there a way to do that through the API? Its done in the UI so I don't see the difference
 
If the behavior you are looking for is already implemented in our web interface you could check your browsers developer tools. There you can take a look at each request which is performed, that's probably the easiest way to see which endpoint to use for a particular action.

Actually there is already a CLI tool to import disk images:
https://pve.proxmox.com/pve-docs/pve-admin-guide.html#_importing_virtual_machines_and_disk_images

What do you mean by "but it doesn't actually create the LVM"?
Do you mean there is no LV created for that particular disk or are you talking about the whole VG?
 
I would love to contribute to the documentation, especially the API documentation but it's a little unclear to me how I can do so. I can't even register on the wiki

The wiki registrations have been unfortunately disabled because of spam. If you would like to contribute, I suggest you to read the following:
https://pve.proxmox.com/wiki/Developer_Documentation

The documentation can be found in repository pve-docs
 

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!