[Ovirt-devel] [PATCH trivial] Create developer appliances under Ubuntu
Hugh O. Brock
hbrock at redhat.com
Wed Jun 25 13:55:58 UTC 2008
On Tue, Jun 24, 2008 at 07:29:05PM -0700, Jeff Schroeder wrote:
> This small patch allows you to create a wui-appliance developer iso
> image on Ubuntu 8.04.
>
> Also available at:
> http://www.digitalprognosis.com/opensource/patches/ovirt/0001-Add-support-to-create-wui-appliance-under-Ubuntu.patch
>
> Note that the instructions on http://ovirt.org/download.html don't
> work on Ubuntu.
>
> Instead of, "virt-viewer developer", "virt-viewer -c qemu:///system
> developer" was required. Since the latter would
> likely work on Ubuntu and Fedora you might put it instead of the former.
>
>
> --
> Jeff Schroeder
>
> Don't drink and derive, alcohol and analysis don't mix.
> http://www.digitalprognosis.com
> From 91ddc0b4ad127521dd5c19ddfc3ccd6b2bfc5bba Mon Sep 17 00:00:00 2001
> From: Jeff Schroeder <jeffschroeder at computer.org>
> Date: Tue, 24 Jun 2008 19:23:21 -0700
> Subject: [PATCH] Add support to create wui appliance under Ubuntu
>
> Signed-off-by: Jeff Schroeder <jeffschroeder at computer.org>
> ---
> wui-appliance/create-wui-appliance.sh | 20 ++++++++++++++++----
> 1 files changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/wui-appliance/create-wui-appliance.sh b/wui-appliance/create-wui-appliance.sh
> index 116d572..ac13805 100755
> --- a/wui-appliance/create-wui-appliance.sh
> +++ b/wui-appliance/create-wui-appliance.sh
> @@ -122,7 +122,7 @@ gen_fake_managed_node() {
> <on_reboot>restart</on_reboot>
> <on_crash>destroy</on_crash>
> <devices>
> - <emulator>/usr/bin/qemu-kvm</emulator>
> + <emulator>$KVM_BINARY</emulator>
> <interface type='network'>
> <mac address='00:16:3e:12:34:$last_mac'/>
> <source network='dummybridge'/>
> @@ -155,7 +155,7 @@ gen_app() {
> <on_reboot>restart</on_reboot>
> <on_crash>destroy</on_crash>
> <devices>
> - <emulator>/usr/bin/qemu-kvm</emulator>
> + <emulator>$KVM_BINARY</emulator>
> <disk type='file' device='disk'>
> <source file='$disk'/>
> <target dev='hda'/>
> @@ -179,8 +179,20 @@ if [ $( id -u ) -ne 0 ]; then
> fi
>
> # now make sure the packages we need are installed
> -rpm -q libvirt -q kvm -q virt-manager -q virt-viewer >& /dev/null
> -if [ $? -ne 0 ]; then
> +if [ -e /etc/redhat-release ]; then
> + PACKAGES="libvirt kvm virt-manager virt-viewer"
> + CHECK=$(rpm $(printf " -q %s " "$PACKAGES") &> /dev/null; echo $?)
> + KVM_BINARY=/usr/bin/qemu-kvm
> +elif [ -e /etc/debian_version ]; then
> + # Works in Ubuntu 8.04. Still needs testing in Debian
> + PACKAGES="libvirt0 libvirt-bin kvm qemu virt-manager virt-viewer"
> + CHECK=$(dpkg -l $PACKAGES &> /dev/null; echo $?)
> + KVM_BINARY=/usr/bin/kvm
> +else
> + die "Not a supported system"
> +fi
> +
> +if [ $CHECK -ne 0 ]; then
> # one of the previous packages wasn't installed; bail out
> die "Must have the libvirt, kvm, virt-manager, and virt-viewer packages installed"
> fi
> --
> 1.5.4.3
>
This looks good to me on its face. Jim, as our resident portability
expert, could you comment and ACK if you're happy with it?
Take care,
--Hugh
More information about the ovirt-devel
mailing list