Bug args option and white space

RemiZOffAlex

New Member
Sep 15, 2015
6
1
3
Russia
remizoffalex.ru
Code:
qm create ${VMID} --args "-append 'root=live:${URL}/centos/7/os/x86_64/LiveOS/squashfs.img ks=cdrom:/dev/cdrom:/${KICKSTART_FILE_NAME}' -kernel ${WORKDIR}/vmlinuz -initrd ${WORKDIR}/initrd.img" --ide2 local:iso/ksboot.iso,media=cdrom --name ${VMNAME} --net0 rtl8139,rate=50,bridge=vmbr0 --virtio0 local:${HDDGB},format=qcow2,cache=writeback,mbps_rd=5,mbps_wr=5 --bootdisk virtio0 --ostype l26 --memory ${MEMMB} --onboot yes --cores ${VCPU} --sockets 1

[FONT=monospace][COLOR=#000000]qm start ${VMID}

[/COLOR][/FONT][FONT=monospace][COLOR=#000000]qm wait ${VMID}[/COLOR]

[/FONT][FONT=monospace][COLOR=#000000]qm set ${VMID} --args "" --ide2 none,media=cdrom[/COLOR]

qm start ${VMID}[/FONT]

VM installed successfully

Before two start is error:
Code:
[COLOR=#000000][FONT=monospace]update VM 333: -ide2 none,media=cdrom -args  [/FONT][/COLOR][FONT=monospace]kvm: Device needs media, but drive is empty
kvm: Device initialization failed.
kvm: Initialization of device ide-hd failed
start failed: command '/usr/bin/kvm -id 333 -chardev 'socket,id=qmp,path=/var/run/qemu-server/333.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -
vnc unix:/var/run/qemu-server/333.vnc,x509,password -pidfile /var/run/qemu-server/333.pid -daemonize -smbios 'type=1,uuid=7ae24755-e11d-4749-9c04-8e09
28228eb1' -name 333 -smp '1,sockets=1,cores=1,maxcpus=1' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000' -vga cirrus -cpu kvm64,+lahf_lm,+x2
apic,+sep -m 1024 -k en-us '' -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:1775b27a24b' -drive 'if=none,id=drive-ide2,media=cdrom,a
io=native' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -drive 'file=/var/lib/vz/images/333/vm-333-disk-1.qcow2,if=none,id
=drive-virtio0,format=qcow2,cache=writeback,bps_rd=5242880,bps_wr=5242880,aio=native,detect-zeroes=on' -device 'virtio-blk-pci,drive=drive-virtio0,id=
virtio0,bus=pci.0,addr=0xa,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap333i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-se
rver/pve-bridgedown' -device 'rtl8139,mac=46:57:BD:F0:38:24,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300'' failed: exit code 1
[/FONT]

less /etc/pve/qemu-server/333.conf
Code:
args: ''
[/COLOR][/FONT][COLOR=#000000][FONT=monospace]bootdisk: virtio0 [/FONT][/COLOR]
[FONT=monospace]cores: 1
cpu: core2duo
ide2: none,media=cdrom
memory: 1024 
name: gateway
net0: rtl8139=[/FONT][FONT=monospace]46:57:BD:F0:38:24[/FONT][FONT=monospace],bridge=vmbr0 [/FONT]
[FONT=monospace]numa: 0
onboot: 1
ostype: l26
smbios1: uuid=4c03c2db-d20e-48b5-bbd2-3fd31c71e2df
sockets: 1
virtio0: local:333/vm-333-disk-1.qcow2,format=qcow2,cache=writethrough,size=10G[/FONT]

 
Tested in several different versions Proxmox. From 3.0 to 3.4

Code:
[FONT=monospace][COLOR=#000000]proxmox-ve-2.6.32: 3.3-147 (running kernel: 2.6.32-37-pve)[/COLOR]
pve-manager: 3.4-1 (running version: 3.4-1/3f2d890e)
pve-kernel-2.6.32-37-pve: 2.6.32-147
lvm2: 2.02.98-pve4
clvm: 2.02.98-pve4
corosync-pve: 1.4.7-1
openais-pve: 1.1.4-3
libqb0: 0.11.1-2
redhat-cluster-pve: 3.2.0-2
resource-agents-pve: 3.9.2-4
fence-agents-pve: 4.0.10-2
pve-cluster: 3.0-16
qemu-server: 3.3-20
pve-firmware: 1.1-3
libpve-common-perl: 3.0-24
libpve-access-control: 3.0-16
libpve-storage-perl: 3.0-31
pve-libspice-server1: 0.12.4-3
vncterm: 1.1-8
vzctl: 4.0-1pve6
vzprocps: 2.0.11-2
vzquota: 3.1-2
pve-qemu-kvm: 2.1-12
ksm-control-daemon: 1.1-1
glusterfs-client: 3.5.2-1
[/FONT]
 

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!