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

Re: [Ovirt-devel] create-wui-appliance.sh: useful script!



Alan Pevec <apevec redhat com> wrote:
> Jim Meyering wrote:
>> gen_dummy() {
>> cat <<\EOF
>> <network>
>>   <name>dummy</name>
>>   <bridge name="dummybridge" stp="off" forwardDelay="0" />
>>   <ip address="192.168.50.1" netmask="255.255.255.0"/>
>> </network>
>> EOF
>> }
>>
>> virsh net-define <(gen_dummy)
>> virsh net-start dummy
>> virsh net-autostart dummy
>
> virsh doesn't seem to read stdin and doesn't accept - as a filename - need to file a BZ for that

Hi Alan,

That fails because the file (pipe) bash creates is not "regular",
so when libvirt's __virFileReadAll function stats it, it can't
determine the file size up front.  I'll fix that function to
work also with files for which stat doesn't provide a length.

> BTW, with libvirt-defined bridge we can avoid ovirt-mod-xml.sh:
>
> --- a/wui-appliance/create-wui-appliance.sh
> +++ b/wui-appliance/create-wui-appliance.sh
> @@ -64,8 +64,7 @@ virsh destroy $NAME > /dev/null 2>&1
> virsh undefine $NAME > /dev/null 2>&1
> virt-install -n $NAME -r $RAM -f "$IMGDIR/$IMGNAME" -s $IMGSIZE --vnc \
>              --accelerate -v -c "$ISO" --os-type=linux --arch=$ARCH \
> -             --noreboot $MAC
> -./ovirt-mod-xml.sh
> +             --noreboot $MAC -w network:default -w network:dummy

Nice!
ACK.

> virsh start $NAME
> virt-viewer $NAME &
>
> To have a completely scripted developer setup we just miss --extra-args ks=http://ovirt.org/download/wui-rel-devel-$(uname -i).ks
> which should work with virt-install tip.



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