telcat/vagrant-proxmox

400 Bad Request

johackim opened this issue · 2 comments

$ vagrant up

Bringing machine 'box' up with 'proxmox' provider...                                                                                                                                                  
==> box: Creating the virtual machine...                                                                                                                                                              
Unable to communicate with proxmox server:                                                                                                                                                            

Unable to create the virtual machine!

Cause: 400 Bad Request
# /var/log/pveproxy/access.log
192.168.1.25 - root@pam [16/09/2017:17:14:54 +0200] "POST /api2/json/nodes/pve/qemu HTTP/1.1" 400 7

I resolved my problem, I debug http requests with stunnel.

# /etc/stunnel/stunnel.conf
[server]
client = no
accept = 127.0.0.1:443
connect = 127.0.0.1:4434
# openssl req -batch -new -x509 -days 365 -nodes -out server.pem -keyout server.pem
cert = /etc/stunnel/server.pem

[client]
client = yes
accept = 127.0.0.1:4434
connect = 192.168.1.41:8006
# Vagrantfile
proxmox.endpoint = 'http://127.0.0.1:4434/api2/json'

sudo tcpdump -i lo -s0 -w ./captured.pcap 'port 4434'

I open pcap file with wireshark to view my error : storage 'local' does not support vm images

May I know how did you solve it?