[virt-tools-list] [PATCH] python-virtinst: type inconsistencies in 'vcpus'
Satoru SATOH
satoru.satoh at gmail.com
Mon Feb 7 05:55:14 UTC 2011
Hi,
I encountered a possible bug in python-virtinst (0.500.5-1.fc14) causing
the type error such as:
# virt-install --connect=qemu:///system --name=rhel-5-4-vm-0 --ram=256 \
--arch=i686 --vcpu=2 --keymap=en-us --os-type=linux \
--location=http://192.168.151.1/contents/RHEL/5/4/Server/i386/ \
--os-variant=rhel5 --disk \
path=/var/lib/libvirt/images/rhel-5-4-vm-0/disk-1.qcow2,bus=virtio,format=qcow2,cache=none \
--network=network:net-1,model=virtio \
--network=network:net-1,model=virtio \
--network=network:net-2,model=virtio \
--network=network:net-2,model=virtio \
--extra-args="ks=http://192.168.151.1/autoinst/rhel-5-4-i386-min.ks.cfg \
ksdevice=eth0" --check-cpu --hvm --accelerate --vnc --noreboot \
--noautoconsole --wait=20
ERROR %d format: a number is required, not str
I'm not really sure about the cause of this issue but it seems the
following patch may fix it.
This patch tries to fix the inconsistencies of type 'vcpu' in cli.py of
python-virtinst.
- satoru
--- /usr/lib/python2.7/site-packages/virtinst/cli.py.org 2011-02-07 14:19:21.554513828 +0900
+++ /usr/lib/python2.7/site-packages/virtinst/cli.py 2011-02-07 14:19:55.955030458 +0900
@@ -513,7 +513,7 @@
failed = True
def vcpu_cli_options(grp):
- grp.add_option("", "--vcpus", type="string", dest="vcpus",
+ grp.add_option("", "--vcpus", type="int", dest="vcpus",
help=_("Number of vcpus to configure for your guest. Ex:\n"
"--vcpus 5\n"
"--vcpus 5,maxcpus=10\n"
More information about the virt-tools-list
mailing list