[SOLVED] vm created with api wont start

klevcehnko

New Member
Apr 6, 2020
4
0
1
28
im using pytho 3.6 and proxmoxer

vm is actually creating but wont start

code:

creat = proxmox.nodes('pve-01').qemu.create(
agent="enabled=1",
bios="seabios",
cores=1,
sockets=1,
autostart=1,
vmid=vmid,
memory=2048,
ostype="l26",
cdrom="local:iso/ubuntu-16.04.6-server-amd64.iso",
scsihw="virtio-scsi-pci",
scsi0=f"kube:vm-{vmid}-disk-0,size=32G",
net0="model=virtio,bridge=vmbr0,firewall=1"
)


vm config file

agent: enabled=1
autostart: 1
bootdisk: scsi0
cores: 1
ide2: local:iso/ubuntu-16.04.6-server-amd64.iso,media=cdrom
memory: 2048
net0: virtio=A2:67:F5:CC:7F:12,bridge=vmbr0,firewall=1
ostype: l26
scsi0: kube:vm-749-disk-0,size=32G
scsihw: virtio-scsi-pci
smbios1: uuid=debe64f8-d202-41c7-a4f8-df34f229eef1
sockets: 1
vmgenid: 06b60a6e-f065-46db-9c02-8bc5e06390e6



error massege on VM start

kvm: -drive file=rbd:kube/vm-749-disk-0:conf=/etc/pve/ceph.conf:id=admin:keyring=/etc/pve/priv/ceph/kube.keyring,if=none,id=drive-scsi0,format=raw,cache=none,aio=native,detect-zeroes=on: error reading header from vm-749-disk-0: No such file or directory
TASK ERROR: start failed: QEMU exited with code 1
 
you need to create the disk as well (or use the special syntax "STORAGE:SIZE_IN_GB" once to allocate the disk on creation automatically)
 

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!