Comment 12 for bug 1397130

Revision history for this message
Don Bowman (donbowman) wrote :

the attached script will reproduce this on utopic. I did it on a virtual machine running under kvm, but it will also do it bare-metal.

#!/bin/bash

apt-get -qy install virtinst libvirt-bin

die() {
    echo "$*"
    exit 1
}

dir=$(mktemp -d "/tmp/repro.XXXXXX")
echo "rep files in $dir"
cd "$dir"
chgrp libvirtd .
chmod 775 .

[ -f cirros-0.3.3-x86_64-disk.img ] || wget http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img || die "Error fetching cirros image"

ninstances=10

for i in $(seq 0 $ninstances)
do
    cp -f cirros-0.3.3-x86_64-disk.img cirros-$i.qcow2
    chgrp libvirtd cirros-$i.qcow2
    chmod 775 cirros-$i.qcow2
done

for i in $(seq 0 $ninstances)
do
    virt-install -n instance-$i -r 256 --cpu host --description "instance-$i" --import --disk cirros-$i.qcow2 --os-type=linux --noautoconsole
done

service libvirt-bin restart

echo "This command should return instantly with $ninstances in the list"
virsh list