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

[Xen-devel] Re: VHD BUG in xen4.0 when install windows2008

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: VHD BUG in xen4.0 when install windows2008
From: yingbin wang <yingbin.wangyb@xxxxxxxxx>
Date: Sun, 16 May 2010 00:02:13 +0800
Delivery-date: Sat, 15 May 2010 09:03:18 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=ZBCOGGpS7E4hk4sKsWzqN4ewlTeqOLNfUQ3WkfX0p3I=; b=DtYXYKNy45AYrL1vjUhNP3g8L6mga30OgT3yd470Xs2Uxv69LRvCba/HkX/EbblzWb 4zX5V8JHpHohsU+8hrnXXS/Qnu9E4CwAEHLBWXwAC1irE78QKqhCdiTUkDKGkBYc3az4 24IokNjqG2NWy2GjQ1/hXZrYBYvxYgqPAxz8Q=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=vd1xoya1ilm8fmZ4O8PSb2JOOQ2SZPmAHz49qqGqX4wDzoYyDUmaE/Eqr32L8wbswy a6hYftCbW8h4DGE0VbL7YItDbu88Ou4NVeKVVkYc1f+uIh90V9zvaAS1CxlCJivZUo3C Iub3TTRzdla52ENprlG4MYF5tTM41jyiLfvKg=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <o2xacd07b8d1005072213v9c783chf68e7571d8fd411@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: <o2xacd07b8d1005072213v9c783chf68e7571d8fd411@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
the install problem is solved.

after install Windows 2008 R2 Standard Edition 64(disk size: 20G, C:\ 15G, D:\ 5G) on vhd file (as base image), os reboot. 
I use command( ps aux | grep tapdisk2 ) to see the status and found that after new tapdisk2 process create, old tapdisk2 process didn't close. 
I found something from xend source. when xend destroy tap2 device, xend create a thread to write remove to /sys/class/blktap2/blktap0/remove and then continue to create new tap2 device, but old tapdisk2 process didn't immediately close.

so I add some code before xend exec cmd ( [ TAPDISK_BINARY, '-n', '%s:%s' % (params, file) ] ). it just wait old tapdisk2 process. when it know the old process is closed, it will create new tapdisk2 process. 

after update /usr/lib64/python2.4/site-packages/xen/xend/server/BlktapController.py and restart xend, I install Windows 2008 R2 Standard Edition 64(disk size: 20G, C:\ 15G, D:\ 5G) on vhd file (as base image). the problem disappear. I tested 5 times, the problem didn't appear. I will do more test case later.

the attachment is the new code of BlktapController.py ( base on xen 4.0 ). you can copy it to /usr/lib64/python2.4/site-packages/xen/xend/server/ and  restart xend.

this is a tentative plan, I will track the real reason later. 

Cheers,
wyb

2010/5/8 yingbin wang <yingbin.wangyb@xxxxxxxxx>
Description of problem:
after install Windows 2008 R2 Standard Edition 64(disk size: 20G, C:\ 15G, D:\ 5G) on vhd file (as base image), os can not startup.
I found data error in C:\Windows\System32 :
?--------- ? ?    ?           ?            ? pnpts.dll
?--------- ? ?    ?           ?            ? pnpui.dll
?--------- ? ?    ?           ?            ? PnPUnattend.exe
?--------- ? ?    ?           ?            ? PnPutil.exe
 
How reproducible:
I tested 10 times, it appear 10 times that os can not startup.
 
Steps to Reproduce:
1. vhd-util create -n test.vhd -s 20480
2. xm create test.hvm
3. install Windows 2008 R2 Standard Edition 64 ( disk size: 20G, C:\ 15G, D:\ 5G )
4. can not startup
5. xm des test.vhd
6. tapdisk2 -n vhd:/mnt/img/test.vhd
7. mount -o offset=105906176 -t ntfs /dev/xen/blktap-2/tapdev0 /mnt/vhd
8. ll /mnt/vhd/Windows/System32 | grep ?
?--------- ? ?    ?           ?            ? pnpts.dll
?--------- ? ?    ?           ?            ? pnpui.dll
?--------- ? ?    ?           ?            ? PnPUnattend.exe
?--------- ? ?    ?           ?            ? PnPutil.exe
 
Additional info:
I install
Windows 2003 Standard Edition SP1 32(disk size: 50G, C:\50G) on vhd file, the problem disappear.
Redhat 5.4 AS 64(disk size:60G, /: 50G, swap: 10G) on vhd file, the problem disappear.
Windows 2008 R2 Standard Edition 64(disk size: 100G, C:\ 100G) on vhd file, the problem disappear.
Windows 2008 R2 Standard Edition 64(disk size: 100G, C:\ 90G, D:\10G) on vhd file, the problem disappear.
Windows 2008 R2 Standard Edition 64(disk size: 20G, C:\ 15G, D:\ 5G) on raw file, the problem disappear.
Windows 2008 R2 Standard Edition 64(disk size: 20G, C:\ 15G, D:\ 5G) on vhd file, the problem appear.
Windows 2008 R2 Standard Edition 64(disk size: 100G, C:\ 15G, D:\85G) on vhd file, the problem appear.
 
ps:
windows 2003 need 3G disk space.
redhat 5.4 need 4G disk space.
windows 2008 need 8G disk space.
the problem disappear means that os can startup and no data error.
 
compile env and filesystem :
 Redhat AS 5.4
 
xm info:
host                   : vm01
release                : 2.6.31.13
version                : #1 SMP Wed Apr 21 12:30:21 CST 2010
machine                : x86_64
nr_cpus                : 16
nr_nodes               : 1
cores_per_socket       : 4
threads_per_core       : 2
cpu_mhz                : 2400
hw_caps                : bfebfbff:28100800:00000000:00001b40:009ce3bd:00000000:00000001:00000000
virt_caps              : hvm
total_memory           : 24539
free_memory            : 1668
node_to_cpu            : node0:0-15
node_to_memory         : node0:1668
node_to_dma32_mem      : node0:82
max_node_id            : 0
xen_major              : 4
xen_minor              : 0
xen_extra              : .0
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : unavailable
xen_commandline        : dom0_max_vcpus=2 dom0_vcpus_pin
cc_compiler            : gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)
cc_compile_by          : root
cc_compile_domain      : dev.sd.test.com
cc_compile_date        : Mon Apr 26 10:17:37 CST 2010
xend_config_format     : 4
 

Attachment: BlktapController.py
Description: Binary data

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