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] [PATCH]: blktap2 : control function

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH]: blktap2 : control function
From: Łukasz Oleś <lukaszoles@xxxxxxxxx>
Date: Fri, 21 May 2010 19:38:27 +0200
Delivery-date: Fri, 21 May 2010 10:41:01 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=8JESntJEG98e25UMXvFTaMtSCgaNcGSc077dZ8HD/UE=; b=jEuzt+1Gj1SvaecLWyZ3rMtfbovzzKPVing6qnv8GjXqfMWouh113NsxfauPEAVlO3 Zk99V/yfL9Ta+8BogJHkjbTvYWLN+WSx7kqMUHYbwh4mPXoxhysif5GKPUKzRP5nb75o A1qoadx5YBBJOyyYS7SPJDI1Z4zRWquComY4Y=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; b=KaK0hmS2ZgeMPHVymFAkQU5QakpG7046oWxSEHZqUqADe9z0A4xkHmzDWR01WpD21c tkqelm2db3P/4KXMk11gR1Cxd8W1YLaYTJ9fyVxgCWOHJYUR8Lljg6VInCqCcF0xUnEl 6RpE01KCJVKYOHO1QK3ikNPhLh/VY+mYag1wg=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTimvs-DX-SNhhSDg7p27csdZX_8NfXHTPpCUE9q5@xxxxxxxxxxxxxx>
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: <AANLkTimvs-DX-SNhhSDg7p27csdZX_8NfXHTPpCUE9q5@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.12.4 (Linux/2.6.32-3-686; KDE/4.3.4; i686; ; )
On Friday 21 May 2010 18:51:12 eXeC001er wrote:
> Hi.
> 
> I tried to create small patch for blktap2 : control function:
> 
> diff -r 840f269d95fb tools/python/xen/xend/XendDomainInfo.py
> --- a/tools/python/xen/xend/XendDomainInfo.py Wed May 19 22:59:52 2010
>  +0100 +++ b/tools/python/xen/xend/XendDomainInfo.py Fri May 21 20:17:15
>  2010 +0400 @@ -3292,6 +3292,7 @@
>                  fn = BOOTLOADER_LOOPBACK_DEVICE
> 
>              try:
> +                time.sleep(5)
>                  blcfg = bootloader(blexec, fn, self, False,
>                                     bootloader_args, kernel, ramdisk, args)
>              finally:
> @@ -3299,7 +3300,7 @@
>                      log.info("Unmounting %s from %s." %
>                               (fn, BOOTLOADER_LOOPBACK_DEVICE))
> 
> -                    dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE)
> +                    dom0.destroyDevice(devtype,
>  BOOTLOADER_LOOPBACK_DEVICE)
> 
>              if blcfg is None:
>                  msg = "Had a bootloader specified, but can't find disk"
> 

I have same error and I resolved it in similar way. It only happens  when I'm 
using pygrub.

> With this patch DomU boot from VHD disk without error.
> 
> But i can not fix other bug:
> 
> if after DomU (boot disk is blktap2-type) stopped i can not start it again,
> because i get error "raise VmError("Device %s is already connected." %
> dev_str)" in "DevController.py".
> 
> but i found workaround:
> 
> stop blktap2_mount: echo 1 > /sys/class/blktap2/blktapX/remove
> remove records from xenstore:
> xenstore-rm /vm/00000000-0000-0000-0000-000000000000
> xenstore-write /local/domain/0/vm ""
> 
> Now i can run my DomU again.
> 

I found it too, it's bug in script xen-hotplug-cleanup but I also doesn't know 
right way to solve it.

regards,
Łukasz Oleś

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