From: =?utf-8?q?=C5=81ukasz_Ole=C5=9B?= Subject: Re: [PATCH]: blktap2 : control function Date: Fri, 21 May 2010 19:38:27 +0200 Message-ID: <201005211938.27639.lukaszoles@gmail.com> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Friday 21 May 2010 18:51:12 eXeC001er wrote: > Hi. >=20 > I tried to create small patch for blktap2 : control function: >=20 > 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 =3D BOOTLOADER_LOOPBACK_DEVICE >=20 > try: > + time.sleep(5) > blcfg =3D bootloader(blexec, fn, self, False, > bootloader_args, kernel, ramdisk, arg= s) > finally: > @@ -3299,7 +3300,7 @@ > log.info("Unmounting %s from %s." % > (fn, BOOTLOADER_LOOPBACK_DEVICE)) >=20 > - dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE) > + dom0.destroyDevice(devtype, > BOOTLOADER_LOOPBACK_DEVICE) >=20 > if blcfg is None: > msg =3D "Had a bootloader specified, but can't find disk" >=20 I have same error and I resolved it in similar way. It only happens when I= 'm=20 using pygrub. > With this patch DomU boot from VHD disk without error. >=20 > But i can not fix other bug: >=20 > if after DomU (boot disk is blktap2-type) stopped i can not start it agai= n, > because i get error "raise VmError("Device %s is already connected." % > dev_str)" in "DevController.py". >=20 > but i found workaround: >=20 > 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 "" >=20 > Now i can run my DomU again. >=20 I found it too, it's bug in script xen-hotplug-cleanup but I also doesn't k= now=20 right way to solve it. regards, =C5=81ukasz Ole=C5=9B