[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 0/2] virsh: allow to specify pci address with attach-interface



Now, at using attach-interface, pci address of the device is determined
automatically. This is nice. But in some situation, users may want to
specify pci address by hand. For example, when users want to use multifunction
pci device, he need to specify pci slot.

This patch allows to specify pci address with attach-interface.

Then, this kind of script can run to assign multiple nics in a slot.
==
#!/bin/bash -x

DOM=$1
SLOT=$2
NUM=$3

for i in `seq 0 $NUM`; do
        virsh attach-interface --domain $DOM --type='network'  --source=default\
        --persistent --model=virtio --address=pci:0000:00:$SLOT:0$i --multifunction;
done
==

Because I moved placement of some functions in virsh.c, diffstat seems big...

 virsh.c   |  948 ++++++++++++++++++++++++++++++++------------------------------
 virsh.pod |    4
 2 files changed, 495 insertions(+), 457 deletions(-)

Thanks,
-Kame


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]