Perry Myers
2009-Jul-05 17:46 UTC
[Ovirt-devel] [PATCH node-image] Fix create-ovirt-iso-nodes to allow manual specification of network bridge to use
Since create-ovirt-network script has been deprecated (was part of ovirt-appliance repo) we can't default to bridge on the host of ovirtbr0 for doing fake node testing. So default to network:default and allow manual override to something like bridge:breth0 Signed-off-by: Perry Myers <pmyers at redhat.com> --- create-ovirt-iso-nodes | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/create-ovirt-iso-nodes b/create-ovirt-iso-nodes index d74dc4d..fe2e7ab 100755 --- a/create-ovirt-iso-nodes +++ b/create-ovirt-iso-nodes @@ -24,7 +24,7 @@ warn() { printf '%s: %s\n' "$ME" "$*" >&2; } try_h() { printf "Try \`$ME -h' for more information.\n" >&2; } die() { warn "$@"; try_h; exit 1; } -BRIDGENAME=ovirtbr0 +NET_DEFAULT=network:default IMGDIR_DEFAULT=/var/lib/libvirt/images imgdir=$IMGDIR_DEFAULT NODEIMG_DEFAULT=/usr/share/ovirt-node-image/ovirt-node-image.iso @@ -66,7 +66,7 @@ gen_fake_managed_node() { # that just defines the VM w/o starting it. virt-install --name=node$num --ram=$ram --vcpus=$vcpus $disks \ --cdrom=$dest_nodeimg --livecd \ - --network=bridge:$BRIDGENAME --mac=00:16:3e:12:34:$last_mac \ + --network=$net --mac=00:16:3e:12:34:$last_mac \ --vnc --accelerate --hvm --noautoconsole \ --os-type=linux --os-variant=$os_variant \ --force --noreboot @@ -78,8 +78,9 @@ usage() { case $# in 1) warn "$1"; try_h; exit 1;; esac cat <<EOF Usage: $ME [-d image_dir] [-n node.iso] [-c num_disks] [-s start-stop] - [-v vcpus] [-r ram] [-x] + [-v vcpus] [-r ram] [-x] [-b network] -n: node.iso to boot (default: $NODEIMG_DEFAULT) + -b: network name (default: $NET_DEFAULT) -d: directory to place virtual disk (default: $IMGDIR_DEFAULT) -c: number of disks per fake node (default: $NUM_DISKS_DEFAULT) -s: node range (default: $RANGE_DEFAULT) @@ -96,10 +97,12 @@ num_disks=$NUM_DISKS_DEFAULT range=$RANGE_DEFAULT ram=$RAM_DEFAULT vcpus=$VCPUS_DEFAULT -while getopts :d:n:s:c:v:r:xh c; do +net=$NET_DEFAULT +while getopts :d:n:b:s:c:v:r:xh c; do case $c in n) nodeimg=$OPTARG;; d) imgdir=$OPTARG;; + b) net=$OPTARG;; c) num_disks=$OPTARG;; s) range=$OPTARG;; v) vcpus=$OPTARG;; -- 1.6.2.5
Jason Guiditta
2009-Jul-07 15:50 UTC
[Ovirt-devel] [PATCH node-image] Fix create-ovirt-iso-nodes to allow manual specification of network bridge to use
On Sun, 2009-07-05 at 13:46 -0400, Perry Myers wrote:> Since create-ovirt-network script has been deprecated (was part of > ovirt-appliance repo) we can't default to bridge on the host of ovirtbr0 for > doing fake node testing. So default to network:default and allow manual override > to something like bridge:breth0If create-ovirt-network is deprecated, is there another one we should use now for setting up the admin network bridge? Or are we just going to do that manually now?
Darryl L. Pierce
2009-Jul-08 21:16 UTC
[Ovirt-devel] [PATCH node-image] Fix create-ovirt-iso-nodes to allow manual specification of network bridge to use
On Sun, Jul 05, 2009 at 01:46:36PM -0400, Perry Myers wrote:> Since create-ovirt-network script has been deprecated (was part of > ovirt-appliance repo) we can't default to bridge on the host of ovirtbr0 for > doing fake node testing. So default to network:default and allow manual override > to something like bridge:breth0 > > Signed-off-by: Perry Myers <pmyers at redhat.com> > ---ACK. Seems to work fine. -- Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc. Virtual Machine Management - http://www.ovirt.org/ Is fearr Gaeilge bhriste n? B?arla cliste. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20090708/505123d4/attachment.sig>