Boris Derzhavets
2010-Aug-01 19:12 UTC
Fw: [Xen-devel] [PATCH] blktap2: blktap2 and pygrub (xen-unstable)
Forwarding to you original patch requested. It works for me. Boris --- On Sun, 7/11/10, eXeC001er <execooler@gmail.com> wrote: From: eXeC001er <execooler@gmail.com> Subject: [Xen-devel] [PATCH] blktap2: blktap2 and pygrub (xen-unstable) To: "Xen-devel" <xen-devel@lists.xensource.com> Date: Sunday, July 11, 2010, 9:18 AM 1. Bug fix for error: "Error: Device /dev/xvdp (51952, tap2) is already connected."2. Bug fix for error: "Error: Device 51952 not connected" process of booting DomU with ''mounted-blktap2'' (VHD for example) and ''pygrub'' as bootloader: 1. Connect boot-device to Dom0 as ''/dev/xpvd''2. Pygrub get info for load DomU3. Disconnect boot-device from Dom04. Boot DomU During step 3 created device disconnecting from Dom0, but xenstore does not scrape away after device disconnected from Dom0 => result: "Error: Device /dev/xvdp (51952, tap2) is already connected." During step 3 created device disconnecting from Dom0, but ''destroyDevice'' method is passed ''tap'' always => result: "Error: Device 51952 not connected" -----Inline Attachment Follows----- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Stefano Stabellini
2010-Aug-16 16:35 UTC
Re: Fw: [Xen-devel] [PATCH] blktap2: blktap2 and pygrub (xen-unstable)
On Sun, 1 Aug 2010, Boris Derzhavets wrote:> Forwarding to you original patch requested. > It works for me. > > Boris > > --- On Sun, 7/11/10, eXeC001er <execooler@gmail.com> wrote: > > From: eXeC001er <execooler@gmail.com> > Subject: [Xen-devel] [PATCH] blktap2: blktap2 and pygrub (xen-unstable) > To: "Xen-devel" <xen-devel@lists.xensource.com> > Date: Sunday, July 11, 2010, 9:18 AM > > 1. Bug fix for error: "Error: Device /dev/xvdp (51952, tap2) is already connected." > 2. Bug fix for error: "Error: Device 51952 not connected" > > > process of booting DomU with ''mounted-blktap2'' (VHD for example) and ''pygrub'' as bootloader: > > 1. Connect boot-device to Dom0 as ''/dev/xpvd'' > 2. Pygrub get info for load DomU > 3. Disconnect boot-device from Dom0 > 4. Boot DomU > > During step 3 created device disconnecting from Dom0, but xenstore does not scrape away after device disconnected > from Dom0 => result: > "Error: Device /dev/xvdp (51952, tap2) is already connected." > > During step 3 created device disconnecting from Dom0, but ''destroyDevice'' method is passed ''tap'' always => result: > "Error: Device 51952 not connected" >applied, thanks _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Łukasz Oleś
2010-Oct-31 23:21 UTC
Re: Fw: [Xen-devel] [PATCH] blktap2: blktap2 and pygrub (xen-unstable)
On Monday 16 August 2010 18:35:10 Stefano Stabellini wrote:> On Sun, 1 Aug 2010, Boris Derzhavets wrote: > > Forwarding to you original patch requested. > > It works for me. > > > > Boris > > > > --- On Sun, 7/11/10, eXeC001er <execooler@gmail.com> wrote: > > From: eXeC001er <execooler@gmail.com> > > Subject: [Xen-devel] [PATCH] blktap2: blktap2 and pygrub > > (xen-unstable) To: "Xen-devel" <xen-devel@lists.xensource.com> > > Date: Sunday, July 11, 2010, 9:18 AM > > > > 1. Bug fix for error: "Error: Device /dev/xvdp (51952, tap2) is > > already connected." > > > > 2. Bug fix for error: "Error: Device 51952 not connected" > > > > > > process of booting DomU with ''mounted-blktap2'' (VHD for example) and > > ''pygrub'' as bootloader: > > > > 1. Connect boot-device to Dom0 as ''/dev/xpvd'' > > 2. Pygrub get info for load DomU > > 3. Disconnect boot-device from Dom0 > > 4. Boot DomU > > > > During step 3 created device disconnecting from Dom0, but xenstore does > > not scrape away after device disconnected from Dom0 => result: > > "Error: Device /dev/xvdp (51952, tap2) is already connected." > > > > During step 3 created device disconnecting from Dom0, but ''destroyDevice'' > > method is passed ''tap'' always => result: "Error: Device 51952 not > > connected" > > applied, thanksCould you merge it also to Xen 4.0? Without this patch I can not use vhd + pygrub. In Xen-unstable it was added in commit cd5b4135fe03. Regards, Łukasz Oleś _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Łukasz Oleś
2010-Nov-08 12:40 UTC
Re: Fw: [Xen-devel] [PATCH] blktap2: blktap2 and pygrub (xen-unstable)
2010/11/1 Łukasz Oleś <lukaszoles@gmail.com>:> On Monday 16 August 2010 18:35:10 Stefano Stabellini wrote: >> On Sun, 1 Aug 2010, Boris Derzhavets wrote: >> > Forwarding to you original patch requested. >> > It works for me. >> > >> > Boris >> > >> > --- On Sun, 7/11/10, eXeC001er <execooler@gmail.com> wrote: >> > From: eXeC001er <execooler@gmail.com> >> > Subject: [Xen-devel] [PATCH] blktap2: blktap2 and pygrub >> > (xen-unstable) To: "Xen-devel" <xen-devel@lists.xensource.com> >> > Date: Sunday, July 11, 2010, 9:18 AM >> > >> > 1. Bug fix for error: "Error: Device /dev/xvdp (51952, tap2) is >> > already connected." >> > >> > 2. Bug fix for error: "Error: Device 51952 not connected" >> > >> > >> > process of booting DomU with ''mounted-blktap2'' (VHD for example) and >> > ''pygrub'' as bootloader: >> > >> > 1. Connect boot-device to Dom0 as ''/dev/xpvd'' >> > 2. Pygrub get info for load DomU >> > 3. Disconnect boot-device from Dom0 >> > 4. Boot DomU >> > >> > During step 3 created device disconnecting from Dom0, but xenstore does >> > not scrape away after device disconnected from Dom0 => result: >> > "Error: Device /dev/xvdp (51952, tap2) is already connected." >> > >> > During step 3 created device disconnecting from Dom0, but ''destroyDevice'' >> > method is passed ''tap'' always => result: "Error: Device 51952 not >> > connected" >> >> applied, thanks > > Could you merge it also to Xen 4.0? Without this patch I can not use vhd + > pygrub. In Xen-unstable it was added in commit cd5b4135fe03.ping -- Łukasz Oleś _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Philipp Hahn
2010-Nov-11 13:31 UTC
Re: Fw: [Xen-devel] [PATCH] blktap2: blktap2 and pygrub (xen-unstable)
Hello, Am Montag 08 November 2010 13:40:29 schrieb Łukasz Oleś:> 2010/11/1 Łukasz Oleś <lukaszoles@gmail.com>: > > On Monday 16 August 2010 18:35:10 Stefano Stabellini wrote: > >> On Sun, 1 Aug 2010, Boris Derzhavets wrote: > >> > Forwarding to you original patch requested. > >> > It works for me.For me to, but I observed some kind of race condition probably between udev creating the device node and pygrub acessing it: The first start of my domain failed with "Disk isn''t accessible", while subsequent starts worked fine. I could reproduce this after doing a reboot: 1st start failed, further starts worked fine. After adding the following hack it even worked on a freshly rebooted system. (For my case the loop always exited on the second iteration.) --- a/xen-4.0.1/tools/python/xen/xend/XendBootloader.py 2010-11-01 15:33:59.000000000 +0100 +++ b/xen-4.0.1/tools/python/xen/xend/XendBootloader.py 2010-11-11 13:36:13.000000000 +0100 @@ -15,6 +15,7 @@ import os, select, errno, stat, signal, tty import random import shlex +import time from xen.xend import sxp from xen.util import mkdir, oshelp @@ -35,13 +36,18 @@ @param blargs Arguments to pass to the bootloader.""" if not os.access(blexec, os.X_OK): - msg = "Bootloader isn''t executable" + msg = "Bootloader ''%s'' isn''t executable" % blexec log.error(msg) raise VmError(msg) - if not os.access(disk, os.R_OK): + + retries = 10 + while not os.access(disk, os.R_OK): - msg = "Disk isn''t accessible" + msg = "Disk ''%s'' isn''t accessible" % disk log.error(msg) - raise VmError(msg) + time.sleep(1) + retries -= 1 + if retries <= 0: + raise VmError(msg) if os.uname()[0] == "NetBSD" and disk.startswith(''/dev/''): disk = disk.replace("/dev/", "/dev/r") BYtE Philipp -- Philipp Hahn Open Source Software Engineer hahn@univention.de Univention GmbH Linux for Your Business fon: +49 421 22 232- 0 Mary-Somerville-Str.1 28359 Bremen fax: +49 421 22 232-99 http://www.univention.de _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel