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]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. http://log.info/
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel