[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 1/2] Add VSCSI bus type and VSCSI controller type for pseries guest.



On 06/04/2012 11:16 PM, Cole Robinson wrote:
On 05/30/2012 02:57 AM, Li Zhang wrote:
On 05/30/2012 07:25 AM, Cole Robinson wrote:
On 05/03/2012 10:05 PM, Li Zhang wrote:
Now, there is only SCSI bus and controller type in libvirt.
And when configuring VSCSI controller, it needs to configure
the spapr-vio bus address type externally. It's a little
inconvenient to configure the controller type.

This patch is to add VSCSI bus type and VSCSI controller type.
And handle with the problems when VSCSI and SCSI devices
working together, by assign the even number to index of
VSCSI controller and odd number to index of SCSI controller.

And when the VSCSI controller is always assigned as SPAPRVIO
bus address type and SCSI controller will be always assigned
as PCI bus address, which is implemented according to the
controllers' type.

So when one disk is based on VSCSI controller, then assign
the bus as 'vscsi', and one right VSCSI controller will be
selected.

If one disk is based on VSCSI controller, the XML file is
as the following:

<disk type='file' device='disk'>
     <driver name='qemu' type='raw'/>
     <source file='/path/file'/>
     <target dev='sda' bus='vscsi'/>
</disk>

VSCSI controllers' configuration in XML file will be like
this:

<controller type='vscsi' index='0'>
</controller>

If one disk is based on 'vscsi', the 'vscsi' bus should be assigned
externally. Otherwise, it will be set as 'scsi' bus according
to the 'sd' target prefix of the disk.


First off, sorry for taking so long to respond.

This isn't exactly what I had in mind when I recommended a libvirt patch.
Change libvirt to add:

      <controller type='scsi' index='0'>
          <address type='spapr-vio'/>
      </controller>

when the guest XML has

<disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/path/file'/>
      <target dev='sda' bus='scsi'/>
      <address type='spapr-vio'/>
</disk>

and the guest XML doesn't already have spapr-vio<controller>.

Thanks a lot for your suggestion. :)

I see the libvirt will always set the address type of the disk as
"drive". There is one drive address structure in libvirt, which
records the controller, bus and unit.

the address can be specified in the target.

  <disk type='file' device='disk'>
       <driver name='qemu' type='raw'/>
       <source file='/path/file'/>
       <target dev='sda' bus='scsi' address='spapr-vio'/>
       <address type='drive' controller='0' bus='0' unit='0' />
  </disk>


That sounds okay to me, bug maybe eblake or danpb should sign off on it
conceptually, since it's a new XML element.

Got it.

Eric, Daniel
Any comments ?

Thanks. :)

- Cole



--
Best Regards
Li

IBM LTC, China System&Technology Lab, Beijing


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]