ÂJ
> -- Pasi
>
>
>> Â Â2010/5/22 Pasi KÃârkkÃâinen <[1]
pasik@xxxxxx>
>>
>> Â Â ÂOn Fri, May 21, 2010 at 08:51:12PM +0400, eXeC001er wrote:
>> Â Â Â> Ã ÂÃ Hi.
>> Â Â Â> Ã ÂÃ I tried to create small patch forÃ* blktap2 : control function:
>> Â Â Â>
>>
>> Â Â ÂThis patch is horribly broken at least for me.. It looks really weird.
>> Â Â ÂYou might want to re-send it in a proper format..
>>
>> Â Â Â.. Or if it works for others just forget about this rant:)
>>
>> Â Â Â-- Pasi
>> Â Â Â> Ã ÂÃ 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 @@
>> Â Â Â> Ã ÂÃ Ã* Ã* Ã Ã* Ã Ã* Ã Ã* Ã Ã* Ã Ã* Ã Ã* Ã Ã* Ã Ã* Ã Ã*
>> Â Â ÂÃ [1][2]
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"
>> Â Â Â> Ã ÂÃ 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.
>> Â Â Â>
>> Â Â Â> References
>> Â Â Â>
>> Â Â Â> Ã ÂÃ Visible links
>> Â Â Â> Ã ÂÃ 1. [3]
http://log.info/
>>
>> Â Â Â> _______________________________________________
>> Â Â Â> Xen-devel mailing list
>> Â Â Â> [4]
Xen-devel@xxxxxxxxxxxxxxxxxxx
>> Â Â Â> [5]
http://lists.xensource.com/xen-devel
>>
>> References
>>
>> Â ÂVisible links
>> Â Â1. mailto:
pasik@xxxxxx
>> Â Â2.
http://log.info/
>> Â Â3.
http://log.info/
>> Â Â4. mailto:
Xen-devel@xxxxxxxxxxxxxxxxxxx
>> Â Â5.
http://lists.xensource.com/xen-devel
>>
>
>> diff -r d0420ab97345 tools/python/xen/util/blkif.py
>> --- a/tools/python/xen/util/blkif.py Fri May 21 16:21:39 2010 +0100
>> +++ b/tools/python/xen/util/blkif.py Sat May 22 01:21:15 2010 +0400
>> @@ -87,7 +87,7 @@
>> Â Â Â Â Â Â Â Â Âfn = "/dev/%s" %(fn,)
>>
>> Â Â Â Â Âif typ in ("tap", "tap2"):
>> - Â Â Â Â Â Â(taptype, fn) = fn.split(":", 1)
>> + Â Â Â Â Â Â(taptype, fn) = fn.split(":", 2)[1:]
>> Â Â Âreturn (fn, taptype)
>>
>> Âdef blkdev_uname_to_file(uname):
>> diff -r d0420ab97345 tools/python/xen/xend/XendDomainInfo.py
>> --- a/tools/python/xen/xend/XendDomainInfo.py    ÂFri May 21 16:21:39 2010 +0100
>> +++ b/tools/python/xen/xend/XendDomainInfo.py    ÂSat May 22 01:21: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"
>>
>