[Ovirt-devel] [PATCH appliance] Create cobbler system entries for fake nodes with custom kopts

Perry N. Myers pmyers at redhat.com
Mon Sep 22 13:06:28 UTC 2008

Jim Meyering wrote:
> Perry Myers <pmyers at redhat.com> wrote:
>> node3 is created with ovirt_init=scsi causing the supplied 128MB
>> disk to be used for config info
>> node4 is created with ovirt_init=scsi and ovirt_local_boot
>> installing the node itself on the local disk.  To fully test
>> local boot the node configuration needs to be reset to boot
>> hd instead of net.
>> node5 is left alone for pxe boot with no local storage
>> One liner to toggle boot type for a domain:
>> OUT=$(mktemp) && virsh dumpxml node4 \
>>   | sed "s/boot dev='.*'/boot dev='hd'/" > $OUT \
>>   && virsh define $OUT ; rm -f $OUT
> To be slightly safer, use '[^']*' in place of '.*'.
> Then, if the XML is ever formatted so that there's another
> single quote after the desired one, the substitution won't gobble
> up everything in between.
> Or just use perl's non-greedy "?" modifier:
>   perl -pe "s/(boot dev)='.*?'/\$1='hd'/" > $OUT \

Pushed with your perl in replace of the sed in the comment.


More information about the ovirt-devel mailing list