From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?GB2312?B?zO/KwMCk?= Subject: Attach CDROM to windows Date: Mon, 19 Apr 2010 21:16:12 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1624174382==" Return-path: 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 List-Id: xen-devel@lists.xenproject.org --===============1624174382== Content-Type: multipart/alternative; boundary=0016364ec90edd0581048496c30b --0016364ec90edd0581048496c30b Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi Guys, Now I am using Xen-4.0.0. I need to attach CDROM from ISO files to vitual machines when they are running. The VMs contain RHEL4.6, Windows Server 200= 3 32bit and Windows Server 2006 64bit. The disk configuration of the VMs is: disk =3D [ 'tap:vhd:/guest/SS_test/vhd/hmi-100130.vhd,hda,w'] (1) When I attach a CDROM to RHEL4.6 VM with the command: virsh attach-device DomID attach-cdrom.xml (2) The device come out soon and I can mount it to use, the state from =93xm block-list DomID=94 is (connected). The content of attach-cdrom.xml is: When I detach it with the command after umount the CDROM: virsh detach-device DomID attach-cdrom.xml (3) The device disapear soon. But in windows VMs, I execute (2), the CDROM just not come out. They need t= o reboot to bring out the CDROM. Before, I was using Xen-3.4.2. To avoid the reboot for windows, I changed the disk configuration: disk =3D [ 'tap:vhd:/guest/SS_test/vhd/hmi-100127.vhd,hda,w', ',hdc:cdrom,r= '] (4) After boot, the state of the CDROM from =93xm block-list DomID=94 is 1(initialising). When the VM is running, I execute (2) to assert the ISO file. Though the state is also 1, but the content of ISO file are able to read in the CDROM in the VM. To remove the ISO file, excute (5): virsh attach-device DomID detach-cdrom.xml (5) The content of detach-cdrom.xml is: It seems very convenience in Xen-3.4.2. I tried to do these in Xen-4.0.0 to avoid reboot. But fail. The state is 6 (closed): root@SS01 # xm block-list 27 Vdev BE handle state evt-ch ring-ref BE-path 768 0 0 4 5 8 /local/domain/0/backend/vbd/27/768 5632 0 0 6 -1 -1 /local/domain/0/backend/vbd/27/5632 When I execute (2), it report: xend.err 'Device 5632 not connected'. So I execute (6) to detach the CDROM: xm block-detach DomID 5632 =96f (6) It will block without =96f option. Now the devices are: root@SS01 # xm block-list 27 Vdev BE handle state evt-ch ring-ref BE-path 768 0 0 4 5 8 /local/domain/0/backend/vbd/27/768 Then I execute (2) to attach the CDROM successfully. The ISO is assert to the CDROM in the VM. The state of eh CDROM is 1(initialising). root@SS01 # xm block-list 27 Vdev BE handle state evt-ch ring-ref BE-path 768 0 0 4 5 8 /local/domain/0/backend/vbd/27/768 5632 0 0 1 -1 -1 /local/domain/0/backend/vbd/27/5632 Then I execut (5) to remove the ISO, it report: xend.err 'Device 5632 not connected'. And execute (3) to detach the CDROM device. It will block. I still need to execute (6) to detach it. xm info for Xen-3.4.2: host : houyi-vm03.dev.sd.al release : 2.6.18.8-xen version : #1 SMP Thu Dec 3 22:46:04 CST 2009 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:00000340:009ce3bd:00000000:00000001:00000000 virt_caps : hvm total_memory : 24567 free_memory : 22240 node_to_cpu : node0:0-15 node_to_memory : node0:22240 xen_major : 3 xen_minor : 4 xen_extra : .2 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=3D0xffff800000000000 xen_changeset : unavailable cc_compiler : gcc version 3.4.6 20060404 (Red Hat 3.4.6-10) cc_compile_by : root cc_compile_domain : (none) cc_compile_date : Thu Dec 3 22:47:18 CST 2009 xend_config_format : 4 xm info for Xen-4.0.0: host : SS01 release : 2.6.31.13 version : #1 SMP Fri Apr 16 14:58:38 CST 2010 machine : x86_64 nr_cpus : 16 nr_nodes : 2 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 : 24540 free_memory : 4146 node_to_cpu : node0:0,2,4,6,8,10,12,14 node1:1,3,5,7,9,11,13,15 node_to_memory : node0:1553 node1:2593 node_to_dma32_mem : node0:1017 node1:0 max_node_id : 1 xen_major : 4 xen_minor : 0 xen_extra : .0-rc9-pre 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=3D0xffff800000000000 xen_changeset : Sat Mar 27 16:01:35 2010 +0000 21078:f3db0ae08304 xen_commandline : cc_compiler : gcc version 4.1.2 20080704 (Red Hat 4.1.2-46) cc_compile_by : root cc_compile_domain : (none) cc_compile_date : Fri Apr 9 15:34:38 CST 2010 xend_config_format : 4 What has been changed from Xen-3.4.2 to 4.0.0 for block-attach? Became stricter? So is there any idea for me to attach an ISO CDROM to windows without reboot? --0016364ec90edd0581048496c30b Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable

Hi Guys,

=A0

Now I am u= sing Xen-4.0.0. =A0 I need to attach CDROM from ISO files to vitual machines whe= n they are running. The VMs contain RHEL4.6, Windows Server 2003 32bit and Windows= Server 2006 64bit.

=A0=

The disk c= onfiguration of the VMs is:

disk =3D [ 'tap:vhd:/guest/SS_test/vhd/hmi-100130.v= hd,hda,w']=A0=A0=A0 (1)<= /p>

=A0=

When I att= ach a CDROM to RHEL4.6 VM with the command:

virsh attach-device DomID attach= -cdrom.xml=A0=A0=A0=A0 (2)

The device= come out soon and I can mount it to use, the state from =93xm block-list DomID=94 is (con= nected). The content of attach-cdrom.xml is:

=A0=A0= =A0 <disk type=3D'file' device=3D'cdrom'>

=A0=A0= =A0=A0=A0 <driver name=3D'file'/>

=A0=A0= =A0=A0=A0 <source file=3D'/guest/SS_test/iso/redhat_4.6_32.iso'/>= ;

=A0=A0= =A0=A0=A0 <target dev=3D'hdc' bus=3D'ide'/>

=A0=A0= =A0=A0=A0 <readonly/>

</disk&= gt;

=A0=

When I det= ach it with the command after umount the CDROM:

virsh detach-device DomID attach= -cdrom.xml=A0=A0=A0=A0 (3)

The device= disapear soon.

=A0=

But in win= dows VMs, I execute (2), the CDROM just not come out. They need to reboot to bring out the CDRO= M.

=A0=

=A0=

Before, I = was using Xen-3.4.2. To avoid the reboot for windows, I changed the disk configuratio= n:

disk =3D [ 'tap:vhd:/guest/SS_test/vhd/hmi-100127.v= hd,hda,w', ',hdc:cdrom,r'] (4)

After boot, the state of the CDROM from= =93xm block-list DomID=94 is 1(initialising).

When the VM is running, I execute (2) t= o assert the ISO file. Though the state is also 1, but the content of ISO file are able = to read in the CDROM in the VM.

To remove the ISO file, excute (5):

virsh attach-device DomID detach-cdrom.xml=A0=A0=A0 =A0= =A0=A0=A0(5)

The content of detach-cdrom.xml is:

=A0=A0= =A0 <disk type=3D'file' device=3D'cdrom'>

=A0=A0= =A0=A0=A0 <target dev=3D'hdc' bus=3D'ide'/>

=A0=A0= =A0=A0=A0 <readonly/>

=A0=A0= =A0 </disk>

=A0

=A0=A0= It seems very convenience in Xen-3.4.2. I tried to do these in Xen-4.0.0 to avoid reboot. But fail. The state is 6 (closed):

root@SS01 # xm block-list 27

Vdev= =A0 BE handle state evt-ch ring-ref BE-path

768=A0= =A0=A0 0=A0=A0=A0 0=A0=A0=A0=A0 4=A0=A0=A0=A0=A0 5=A0=A0=A0=A0=A0 8=A0=A0=A0=A0 /local/domain/0/backend/vbd/27/768= =A0

5632= =A0=A0 0=A0=A0=A0 0=A0=A0=A0=A0 6=A0=A0=A0=A0=A0 -1=A0=A0=A0=A0 -1=A0=A0=A0 /local/domain/0/backend/vbd/27/5632

=A0

=A0When I execute (2), it report: xend.err 'Device 5632 not connected'. So I = execute (6) to detach the CDROM:

xm block-detach DomID 5632 =96f =A0=A0=A0=A0(6)

It will block without =96f option. Now = the devices are:

root@SS01 # xm block-list 27

Vdev= =A0 BE handle state evt-ch ring-ref BE-path

768=A0= =A0 =A00=A0=A0=A0 0=A0=A0=A0=A0 4=A0=A0=A0=A0=A0 5=A0=A0=A0=A0=A0 8=A0=A0=A0=A0 /local/domain/0/backend/vbd/27/768= =A0

=A0

Then I execute (2) to attach the CDROM = successfully. The ISO is assert to the CDROM in the VM. The state of eh CDROM is 1(initia= lising).

root@SS01 # xm block-list 27

Vdev= =A0 BE handle state evt-ch ring-ref BE-path

768=A0= =A0=A0 0=A0=A0=A0 0=A0=A0=A0=A0 4=A0=A0=A0=A0=A0 5=A0=A0=A0=A0=A0 8=A0=A0=A0=A0 /local/domain/0/backend/vbd/27/768= =A0

5632= =A0=A0 0=A0=A0=A0 0=A0=A0=A0=A0 1=A0=A0=A0=A0=A0 -1=A0=A0=A0=A0 -1=A0=A0=A0 /local/domain/0/backend/vbd/27/5632

=A0

Then I execut (5) to remove the ISO, it= report: xend.err 'Device 5632 not connected'. And execute (3) to detach the CDROM de= vice. It will block. I still need to execute (6) to detach it.

=A0

xm info fo= r Xen-3.4.2:

host =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 : houyi-vm03.dev.sd= .al

release =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0: 2.6.18.8= -xen

version =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0: #1 SMP Thu Dec 3 22= :46:04 CST 2009

machine =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0: = x86_64

nr_cpus =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0: 16

nr_nodes =A0 =A0 =A0 =A0 =A0 =A0 =A0 : 1

cores_per_socket =A0 =A0 =A0 : 4

threads_per_core =A0 =A0= =A0 : 2

cpu_mhz =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0: 2400

hw_caps =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0: bfebfbff:28100800:= 00000000:00000340:009ce3bd:00000000:00000001:00000000

virt_caps =A0 =A0 =A0 =A0 =A0 =A0 =A0: hvm

total_memory =A0 =A0 =A0 =A0 =A0 : 24567

free_memory =A0= =A0 =A0 =A0 =A0 =A0: 22240

node_to_cpu =A0 =A0 =A0 =A0 = =A0 =A0: node0:0-15

node_to_memory =A0 =A0 =A0 =A0 : node= 0:22240

xen_major =A0 =A0 =A0 =A0 =A0 =A0 =A0: 3

x= en_minor =A0 =A0 =A0 =A0 =A0 =A0 =A0: 4

xen_extra =A0 =A0= =A0 =A0 =A0 =A0 =A0: .2

xen_caps =A0 =A0 =A0 =A0 =A0 =A0= =A0 : 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=A0

xen_scheduler =A0 =A0 =A0 =A0 =A0: credit

= xen_pagesize =A0 =A0 =A0 =A0 =A0 : 4096

platform_params = =A0 =A0 =A0 =A0: virt_start=3D0xffff800000000000

xen_chan= geset =A0 =A0 =A0 =A0 =A0: unavailable

cc_compiler =A0 =A0 =A0 =A0 =A0 =A0: gcc version 3.4.6 20060404 (Red Hat 3.= 4.6-10)

cc_compile_by =A0 =A0 =A0 =A0 =A0: root

cc_compile_domain =A0 =A0 =A0: (none)

cc_compile= _date =A0 =A0 =A0 =A0: Thu Dec =A03 22:47:18 CST 2009

xend_config_format =A0 =A0 : 4


xm info for Xen-4.0.0:

host =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 : SS01

relea= se =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0: 2.6.31.13

version =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0: #1 SMP Fri Apr 16 1= 4:58:38 CST 2010

machine =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0:= x86_64

nr_cpus =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0: 16

nr_nodes =A0 =A0 =A0 =A0 =A0 =A0 =A0 : 2

cores_per_socket =A0 =A0 =A0 : 4

threads_per_core =A0 =A0= =A0 : 2

cpu_mhz =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0: 2400

hw_caps =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0: bfebfbff:28100800:= 00000000:00001b40:009ce3bd:00000000:00000001:00000000

virt_caps =A0 =A0 =A0 =A0 =A0 =A0 =A0: hvm

total_memory =A0 =A0 =A0 =A0 =A0 : 24540

free_memory =A0= =A0 =A0 =A0 =A0 =A0: 4146

node_to_cpu =A0 =A0 =A0 =A0 = =A0 =A0: node0:0,2,4,6,8,10,12,14

=A0=A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 node1:1,3,5,7,9,11,13,15

node_to_memory =A0 =A0 =A0 =A0 : node0:1553

=A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 node1:2593

node_to_dma32_mem =A0 =A0 =A0: node0:1017

=A0=A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 node1:0

max_n= ode_id =A0 =A0 =A0 =A0 =A0 =A0: 1

xen_major =A0 =A0 =A0 =A0 =A0 =A0 =A0: 4

x= en_minor =A0 =A0 =A0 =A0 =A0 =A0 =A0: 0

xen_extra =A0 =A0= =A0 =A0 =A0 =A0 =A0: .0-rc9-pre

xen_caps =A0 =A0 =A0 =A0= =A0 =A0 =A0 : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32= p hvm-3.0-x86_64=A0

xen_scheduler =A0 =A0 =A0 =A0 =A0: credit

= xen_pagesize =A0 =A0 =A0 =A0 =A0 : 4096

platform_params = =A0 =A0 =A0 =A0: virt_start=3D0xffff800000000000

xen_chan= geset =A0 =A0 =A0 =A0 =A0: Sat Mar 27 16:01:35 2010 +0000 21078:f3db0ae0830= 4

xen_commandline =A0 =A0 =A0 =A0:=A0

cc_com= piler =A0 =A0 =A0 =A0 =A0 =A0: gcc version 4.1.2 20080704 (Red Hat 4.1.2-46= )

cc_compile_by =A0 =A0 =A0 =A0 =A0: root

cc_compile_domain =A0 =A0 =A0: (none)

cc_compile_date =A0 =A0 =A0 =A0: Fri Apr =A09 15:34:38 CST 2= 010

xend_config_format =A0 =A0 : 4


=


=A0

What has been changed from Xen-3.4.2 to= 4.0.0 for block-attach? Became stricter?

=A0

So is there any idea for me to attach a= n ISO CDROM to windows without reboot?

=A0

--0016364ec90edd0581048496c30b-- --===============1624174382== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1624174382==--