WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel]qcow can not boot under pvops-dom0

To: "Zhang, Yang" <yang.zhang@xxxxxxxxx>
Subject: Re: [Xen-devel]qcow can not boot under pvops-dom0
From: Jun Koi <junkoi2004@xxxxxxxxx>
Date: Tue, 21 Jul 2009 12:40:12 +0900
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 20 Jul 2009 20:41:17 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=B3HCdHWwSzF6s6dV5G20dvNELHPXG81Dm42m9TERQ/Y=; b=Yt55rxKxJ3p7YTZoXplmeEMjq1y6zcj+xjIwHgaJbX5olRtZPr1UILVALd4IcIWqfo C/mWasK+As37goS17+3hLPGe4BspAD5tayMNRxRUCAZZfqqaDPgFGpvefY741Aa2R1C4 aXCmb7Y+OR0OtjY3GYxeV8pSk49qH5QeBlukc=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=Z6xCMIbxcgLtemTN++SC20/Zr9r+fb8jkgr2wuDfdstyj9/OuDztIz9SSgj3Z8E6ur 134l/Qi8Ty7+BdajlQY9+3KJj7C256BauoMoj8qe+pZ6tYE0h/epm9qb1zl3FNZ/RR98 n1ZgbxrMUIhwwKviuJuT7bC5m8nNZGWD4jCAY=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <10C63FAD690C13458F0B32BCED571F14026DEAD70E@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <10C63FAD690C13458F0B32BCED571F14026DEAD70E@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, Jul 21, 2009 at 12:33 PM, Zhang, Yang<yang.zhang@xxxxxxxxx> wrote:
> For hvm guest, there don't have a block FE. So it still need report the 
> hotpulg-status by
> blktap script which is removed by 19349

Could you confirm that with this patch, you can start HVM?

Currently I also have some problems with -unstable and -testing code,
in which it fails to start a HVM, with error report about hotplug
error something ...

Thanks,
J




>
> Best Regards
> --yang
>
> diff -r 8ee92b9f890f tools/hotplug/Linux/Makefile
> --- a/tools/hotplug/Linux/Makefile      Fri Jul 10 18:12:13 2009 +0100
> +++ b/tools/hotplug/Linux/Makefile      Mon Jul 20 19:22:18 2009 -0400
> @@ -12,6 +12,7 @@ XEN_SCRIPTS += network-nat vif-nat
>  XEN_SCRIPTS += network-nat vif-nat
>  XEN_SCRIPTS += block
>  XEN_SCRIPTS += block-enbd block-nbd
> +XEN_SCRIPTS += blktap
>  XEN_SCRIPTS += vtpm vtpm-delete
>  XEN_SCRIPTS += xen-hotplug-cleanup
>  XEN_SCRIPTS += external-device-migrate
> diff -r 8ee92b9f890f tools/hotplug/Linux/xen-backend.rules
> --- a/tools/hotplug/Linux/xen-backend.rules     Fri Jul 10 18:12:13 2009 +0100
> +++ b/tools/hotplug/Linux/xen-backend.rules     Mon Jul 20 19:22:18 2009 -0400
> @@ -1,3 +1,4 @@ SUBSYSTEM=="xen-backend", KERNEL=="vbd*"
> +SUBSYSTEM=="xen-backend", KERNEL=="tap*", RUN+="/etc/xen/scripts/blktap 
> $env{ACTION}"
>  SUBSYSTEM=="xen-backend", KERNEL=="vbd*", RUN+="/etc/xen/scripts/block 
> $env{ACTION}"
>  SUBSYSTEM=="xen-backend", KERNEL=="vtpm*", RUN+="/etc/xen/scripts/vtpm 
> $env{ACTION}"
>  SUBSYSTEM=="xen-backend", KERNEL=="vif*", ACTION=="online", 
> RUN+="$env{script} online"
> diff -r 8ee92b9f890f tools/hotplug/Linux/blktap
> --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
> +++ b/tools/hotplug/Linux/blktap        Mon Jul 20 19:22:18 2009 -0400
> @@ -0,0 +1,93 @@
> +#!/bin/bash
> +
> +# Copyright (c) 2005, XenSource Ltd.
> +
> +dir=$(dirname "$0")
> +. "$dir/xen-hotplug-common.sh"
> +. "$dir/block-common.sh"
> +
> +findCommand "$@"
> +
> +##
> +# check_blktap_sharing file mode
> +#
> +# Perform the sharing check for the given blktap and mode.
> +#
> +check_blktap_sharing()
> +{
> +    local file="$1"
> +    local mode="$2"
> +
> +    local base_path="$XENBUS_BASE_PATH/$XENBUS_TYPE"
> +    for dom in $(xenstore-list "$base_path")
> +    do
> +        for dev in $(xenstore-list "$base_path/$dom")
> +        do
> +            params=$(xenstore_read "$base_path/$dom/$dev/params" | cut -d: 
> -f2)
> +            if [ "$file" = "$params" ]
> +            then
> +
> +                if [ "$mode" = 'w' ]
> +                then
> +                    if ! same_vm "$dom"
> +                    then
> +                        echo 'guest'
> +                        return
> +                    fi
> +                else
> +                    local m=$(xenstore_read "$base_path/$dom/$dev/mode")
> +                    m=$(canonicalise_mode "$m")
> +
> +                    if [ "$m" = 'w' ]
> +                    then
> +                        if ! same_vm "$dom"
> +                        then
> +                            echo 'guest'
> +                            return
> +                        fi
> +                    fi
> +                fi
> +            fi
> +        done
> +    done
> +
> +    echo 'ok'
> +}
> +
> +
> +t=$(xenstore_read_default "$XENBUS_PATH/type" 'MISSING')
> +if [ -n "$t" ]
> +then
> +    p=$(xenstore_read "$XENBUS_PATH/params")
> +    # if we have a ':', chew from head including :
> +    if echo $p | grep -q \:
> +    then
> +        p=${p#*:}
> +    fi
> +fi
> +# some versions of readlink cannot be passed a regular file
> +if [ -L "$p" ]; then
> +    file=$(readlink -f "$p") || fatal "$p link does not exist."
> +else
> +    file="$p"
> +fi
> +
> +if [ "$command" = 'add' ]
> +then
> +    [ -e "$file" ] || { fatal $file does not exist; }
> +
> +    FRONTEND_ID=$(xenstore_read "$XENBUS_PATH/frontend-id")
> +    FRONTEND_UUID=$(xenstore_read "/local/domain/$FRONTEND_ID/vm")
> +    mode=$(xenstore_read "$XENBUS_PATH/mode")
> +    mode=$(canonicalise_mode "$mode")
> +
> +    if [ "$mode" != '!' ]
> +    then
> +        result=$(check_blktap_sharing "$file" "$mode")
> +        [ "$result" = 'ok' ] || ebusy "$file already in use by other domain"
> +    fi
> +
> +    success
> +fi
> +
> +exit 0
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>
>

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel