From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yaniv Kaul Subject: Re: [PATCH] Add a kvm subtest -- pci_hotplug, which supports both Windows OS and Linux OS. Date: Tue, 21 Jul 2009 10:45:31 +0300 Message-ID: <4A65721B.9070002@redhat.com> References: <1283926593.702711248067671557.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com> <4A64032A.8090804@redhat.com> <20090720070110.GA17650@aFu.nay.redhat.com> <4A641AD4.2030502@redhat.com> <20090721061121.GA5975@dhcp-66-70-57.nay.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, lmr@redhat.com, autotest@test.kernel.org, Vadim Rozenfeld To: Yolkfull Chow Return-path: Received: from mx2.redhat.com ([66.187.237.31]:49106 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751102AbZGUHpg (ORCPT ); Tue, 21 Jul 2009 03:45:36 -0400 In-Reply-To: <20090721061121.GA5975@dhcp-66-70-57.nay.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 7/21/2009 9:11 AM, Yolkfull Chow wrote: > >>> >>> >>>>> Previously, I used 'create partition primary' to verify whether the disk could be formatted but always got an error: >>>>> --- >>>>> diskpart has encountered an error... >>>>> --- >>>>> And then I found the SCSI disk was added to Windows guest was read-only. So I changed the format command to be 'detail disk' temporarily. >>>>> >>>>> >>>>> >>>> Interesting - how did that happen? Lets see your command line, and >>>> probably 'info block' from the monitor. Are you saying that hot-plugged >>>> drives are added as r/o? >>>> >>>> >>> I am afraid yes. After pci_add (monitor command: pci_add pci_addr=auto storage >>> file=/tmp/stg.qcow2,if=scsi) the SCSI block device, 'info block' will >>> show the scsi0-hd0 device is 'ro=0' whereas when I 'create partition >>> primary' on this selected disk in diskpart tool, error message will be raised that the disk is >>> write protected. >>> >>> >> Well, that doesn't sound like the desired behavior. Work with the KVM >> developers on this. >> > Hi Yaniv, following is the output from Windows guest: > > --- > Microsoft DiskPart version 6.0.6001 > Copyright (C) 1999-2007 Microsoft Corporation. > On computer: WIN-Q18A9GP5ECI > > Disk 1 is now the selected disk. > > DiskPart has encountered an error: The media is write protected. > See the System Event Log for more information. > > Have you ever seen this error during format newly added SCSI block > device? > > The contents of my diskpart script file: > --- > select disk 1 > online > create partition primary > exit > --- > > I didn't use a script - nor have I ever hot-plugged a disk, but it does seem to happen to me as well now - the 2nd disk (the first is IDE) is indeed seems to be R/O. I'll look into it. >> >>> >>> >>>> Also, you can always add an already formatted drive. Just create a qcow >>>> drive in another instance, format it properly and use it. >>>> >>>> >>>> Any result with an already formatted drive? Y.