[pve-devel] [PATCH] qmp drive_add : remove backslashes from $drive string

Alexandre DERUMIER aderumier at odiso.com
Tue Mar 3 08:32:53 CET 2015


Oh, ok,I remember now.

It's when you defined ceph monitors with ports

10.5.0.11:6789;10.5.0.12:6789;10.5.0.13:6789

you need to addslashes ":" character, because qemu think it's a separator.


kvm: -drive file=rbd:poolceph1/vm-101-disk-1:mon_host=10.5.0.11:6789;10.5.0.12:6789;10.5.0.13:6789:id=admin:auth_supported=cephx:keyring=/etc/pve/priv/ceph/cephzimbra.keyring,if=none,id=drive-virtio0,cache=writeback,aio=native,detect-zeroes=on: could not open disk image rbd:poolceph1/vm-101-disk-1:mon_host=10.5.0.11:6789;10.5.0.12:6789;10.5.0.13:6789:id=admin:auth_supported=cephx:keyring=/etc/pve/priv/ceph/cephzimbra.keyring: invalid conf option 6789;10.5.0.12:6789;10.5.0.13:6789:id


start failed: command '/usr/bin/kvm -id 101 -chardev 'socket,id=qmp,path=/var/run/qemu-server/101.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -vnc unix:/var/run/qemu-server/101.vnc,x509,password -pidfile 
/var/run/qemu-server/101.pid -daemonize -smbios 'type=1,uuid=3fb4b1fc-f67f-40f1-a85d-f0b71e943564' -name testjessie -smp '4,sockets=1,cores=4,maxcpus=4' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000' -vga cirrus -cpu kvm64,+lahf_lm,+x2apic,+sep -m 2048 -k fr -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:70dd55e9be7e' -drive 'file=/var/lib/vz/images/101/vm-101-disk-1.raw,if=none,id=drive-virtio1,format=raw,aio=native,cache=none,detect-zeroes=on' -device 'virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb' -drive 'file=/var/lib/vz/template/iso/debian-jessie-DI-rc1-amd64-CD-1.iso,if=none,id=drive-ide2,media=cdrom,aio=native' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -drive 'file=rbd:poolceph1/vm-101-disk-1:mon_host=10.5.0.11:6789;10.5.0.12:6789;10.5.0.13:6789:id=admin:auth_supported=cephx:keyring=/etc/pve/priv/ceph/cephzimbra.keyring,if=none,id=drive-virtio0,cache=writeback,aio=native,detect-zeroes=on' -device 'virtio-blk-pci,drive=drive-virtio0,id=virtio0,bus=pci.0,addr=0xa,bootindex=101' -netdev 'type=tap,id=net0,ifname=tap101i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=96:53:C6:C0:9E:D7,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300'' failed: exit code 1



----- Mail original -----
De: "aderumier" <aderumier at odiso.com>
À: "dietmar" <dietmar at proxmox.com>
Cc: "pve-devel" <pve-devel at pve.proxmox.com>
Envoyé: Mardi 3 Mars 2015 08:22:12
Objet: Re: [pve-devel] [PATCH] qmp drive_add : remove backslashes from $drive string

>>I am starting to wonder where those "\;" comes from. Its form 
>>PVE::Storage::RBDPlugin::addslashes(). 

It's me who have done this. But I don't remember why exactly. 

I have try to start a vm without addslashes, and it seem to works fine. 
I need to check other qmp queries. 



----- Mail original ----- 
De: "dietmar" <dietmar at proxmox.com> 
À: "aderumier" <aderumier at odiso.com> 
Cc: "pve-devel" <pve-devel at pve.proxmox.com> 
Envoyé: Mardi 3 Mars 2015 06:24:06 
Objet: Re: [pve-devel] [PATCH] qmp drive_add : remove backslashes from $drive string 

On 03/02/2015 08:54 AM, Alexandre DERUMIER wrote 
> $drive string: 
> 
> 'file=rbd:poolceph1/vm-101-disk-6:mon_host=10.5.0.11\;10.5.0.12\;10.5.0.13:id=admin:auth_supported=cephx:keyring=/etc/pve/priv/ceph/cephzimbra.keyring,if=none,id=drive-virtio1,aio=native,cache=none,detect-zeroes=on' 
> 

I am starting to wonder where those "\;" comes from. Its form 
PVE::Storage::RBDPlugin::addslashes(). 

Maybe we should remove that quoting there (and quote later when we 
really need it)? 

Also, it looks monhost parser is configured wrong there: 

monhost => { 
description => "Monitors daemon ips.", 
type => 'string', 
}, 

Instead, this should be a list of monitor ips (not string)? 

monhost => { 
description => "Monitors daemon ips.", 
type => 'string', format => 'pve-storage-monhost-list' 
}, 

_______________________________________________ 
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