qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [Bug 1197663] Re: qcow2 [virtio-scsi] devices when mapped t


From: chandrashekar shastri
Subject: [Qemu-devel] [Bug 1197663] Re: qcow2 [virtio-scsi] devices when mapped to the guest shows as 0MB irrespective of the volume size
Date: Tue, 09 Jul 2013 12:53:28 -0000

Thanks Stefanha.

If we use the commad virsh attach-disk rhel64-64 /home/images/virtio-
scsi11.img --persistent sdr --cache writethrough the qcow2 images will
also gets added as raw which is by default. Hence we should use

"virsh attach-disk rhel64-64 /home/images/virtio-scsi11.img --persistent
sdr --cache writethrough --sourcetype file --driver qemu --subdriver
qcow2".

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1197663

Title:
  qcow2 [virtio-scsi] devices when mapped to the guest shows as 0MB
  irrespective of the volume size

Status in QEMU:
  Invalid
Status in Fedora:
  New

Bug description:
  qcow2 [virtio-scsi] devices when mapped to the guest shows as 0MB
  irrespective of the volume size.

  Kernel Version: 3.10.0-rc5+

  Libvirt Version: 1.0.6

  Qemu Version: 1.5.50

  Steps to reproduce the issue:

  1. Create a qcow2 voulme using the command qemu-img create -f qcow2 
virtio-scsi11.img 10G 
  2. Add the virtio-scsi controller 
   
   <controller type='scsi' index='0' model='virtio-scsi'>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x04' 
function='0x0'/>
      </controller>

  3. Attach the qcow2 device to the guest, virsh attach-disk rhel64-64
  /home/images/virtio-scsi11.img --persistent sdr --cache writethrough

  4. Run the scan commnad echo ' - - - ' >
  /sys/class/scsi_host/host#/scan, if the attached volume doesn't get
  recognize.

  5. Check the dmesg for the added volume.

  6. Run fdisk -l command

  Disk /dev/sdl: 0 MB, 197120 bytes
  1 heads, 1 sectors/track, 385 cylinders, total 385 sectors
  Units = cylinders of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disk identifier: 0x00000000

  
  And observe that the 10G qcow2 volume shows as 0MB.

  This is not seen with the raw image.

  Disk /dev/sdm: 10.7 GB, 10737418240 bytes
  64 heads, 32 sectors/track, 10240 cylinders
  Units = cylinders of 2048 * 512 = 1048576 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disk identifier: 0x00000000

  Expected Result:

  The volume size for the qcow2 volumes should be shown correctly inside
  the guest to avoid confusion.

  
  Guest XML:
  virsh dumpxml rhel64-64
  <domain type='kvm' id='4'>
    <name>rhel64-64</name>
    <uuid>48deb0e1-0c23-9be9-da12-2ead34864de2</uuid>
    <memory unit='KiB'>4096000</memory>
    <currentMemory unit='KiB'>4096000</currentMemory>
    <vcpu placement='static'>1</vcpu>
    <resource>
      <partition>/machine</partition>
    </resource>
    <os>
      <type arch='x86_64' machine='pc-i440fx-1.5'>hvm</type>
      <boot dev='hd'/>
    </os>
    <features>
      <acpi/>
      <apic/>
      <pae/>
    </features>
    <clock offset='utc'/>
    <on_poweroff>destroy</on_poweroff>
    <on_reboot>restart</on_reboot>
    <on_crash>restart</on_crash>
    <devices>
      <emulator>/usr/local/bin/qemu-system-x86_64</emulator>
      <disk type='file' device='disk'>
        <driver name='qemu' type='qcow2' cache='none'/>
        <source file='/home/images/rhel64-64.qcow2'/>
        <target dev='hda' bus='ide'/>
        <alias name='ide0-0-0'/>
        <address type='drive' controller='0' bus='0' target='0' unit='0'/>
      </disk>
      <disk type='file' device='cdrom'>
        <driver name='qemu' type='raw'/>
        <source 
file='/home/upstream/autotest/virt-test/shared/data/isos/RHEL-6.4-x86_64-DVD.iso'/>
        <target dev='hdb' bus='ide'/>
        <readonly/>
        <alias name='ide0-0-1'/>
        <address type='drive' controller='0' bus='0' target='0' unit='1'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='raw' cache='writethrough'/>
        <source file='/home/images/virtio-scsi11.img'/>
        <target dev='sda' bus='scsi'/>
        <alias name='scsi0-0-0-0'/>
        <address type='drive' controller='0' bus='0' target='0' unit='0'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='raw' cache='writethrough'/>
        <source file='/home/images/virtio-scsi1.img'/>
        <target dev='sdf' bus='scsi'/>
        <alias name='scsi0-0-0-5'/>
        <address type='drive' controller='0' bus='0' target='0' unit='5'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='raw' cache='writethrough'/>
        <source file='/home/images/virtio-scsi9.img'/>
        <target dev='sdg' bus='scsi'/>
        <alias name='scsi0-0-0-6'/>
        <address type='drive' controller='0' bus='0' target='0' unit='6'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='raw' cache='writethrough'/>
        <source file='/home/images/virtio-scsi8.img'/>
        <target dev='sdh' bus='scsi'/>
        <alias name='scsi1-0-0'/>
        <address type='drive' controller='1' bus='0' target='0' unit='0'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='raw' cache='writethrough'/>
        <source file='/home/images/virtio-scsi10.img'/>
        <target dev='sdi' bus='scsi'/>
        <alias name='scsi1-0-1'/>
        <address type='drive' controller='1' bus='0' target='0' unit='1'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='raw' cache='writethrough'/>
        <source file='/home/images/virtio-scsi7.img'/>
        <target dev='sdk' bus='scsi'/>
        <alias name='scsi1-0-3'/>
        <address type='drive' controller='1' bus='0' target='0' unit='3'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='raw' cache='writethrough'/>
        <source file='/home/images/virtio-scsi6.img'/>
        <target dev='sdl' bus='scsi'/>
        <alias name='scsi1-0-4'/>
        <address type='drive' controller='1' bus='0' target='0' unit='4'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='raw' cache='writethrough'/>
        <source file='/home/images/virtio-scsi5.img'/>
        <target dev='sdm' bus='scsi'/>
        <alias name='scsi1-0-5'/>
        <address type='drive' controller='1' bus='0' target='0' unit='5'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='raw' cache='writethrough'/>
        <source file='/home/images/virtio-scsi12.img'/>
        <target dev='sdn' bus='scsi'/>
        <alias name='scsi1-0-6'/>
        <address type='drive' controller='1' bus='0' target='0' unit='6'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='raw' cache='writethrough'/>
        <source file='/home/images/virtio-scsi11.img'/>
        <target dev='sdr' bus='scsi'/>
        <alias name='scsi2-0-3'/>
        <address type='drive' controller='2' bus='0' target='0' unit='3'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='raw' cache='writethrough'/>
        <source file='/home/images/virtio-scsi2.img'/>
        <target dev='sdx' bus='scsi'/>
        <alias name='scsi3-0-2'/>
        <address type='drive' controller='3' bus='0' target='0' unit='2'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='raw' cache='writethrough'/>
        <source file='/home/images/virtio-scsi4.img'/>
        <target dev='sdy' bus='scsi'/>
        <alias name='scsi3-0-3'/>
        <address type='drive' controller='3' bus='0' target='0' unit='3'/>
      </disk>
      <disk type='file' device='disk'>
        <driver name='qemu' type='raw' cache='writethrough'/>
        <source file='/home/images/virtio-scsi3.img'/>
        <target dev='sdz' bus='scsi'/>
        <alias name='scsi3-0-4'/>
        <address type='drive' controller='3' bus='0' target='0' unit='4'/>
      </disk>
      <controller type='usb' index='0'>
        <alias name='usb0'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 
function='0x2'/>
      </controller>
      <controller type='ide' index='0'>
        <alias name='ide0'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 
function='0x1'/>
      </controller>
      <controller type='pci' index='0' model='pci-root'>
        <alias name='pci0'/>
      </controller>
      <controller type='scsi' index='0' model='virtio-scsi'>
        <alias name='scsi0'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x04' 
function='0x0'/>
      </controller>
      <controller type='scsi' index='1'>
        <alias name='scsi1'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x06' 
function='0x0'/>
      </controller>
      <controller type='scsi' index='2'>
        <alias name='scsi2'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x07' 
function='0x0'/>
      </controller>
      <controller type='scsi' index='3'>
        <alias name='scsi3'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x08' 
function='0x0'/>
      </controller>
      <interface type='network'>
        <mac address='52:54:00:9d:cf:bb'/>
        <source network='default'/>
        <target dev='vnet0'/>
        <model type='rtl8139'/>
        <alias name='net0'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x03' 
function='0x0'/>
      </interface>
      <serial type='pty'>
        <source path='/dev/pts/1'/>
        <target port='0'/>
        <alias name='serial0'/>
      </serial>
      <console type='pty' tty='/dev/pts/1'>
        <source path='/dev/pts/1'/>
        <target type='serial' port='0'/>
        <alias name='serial0'/>
      </console>
      <input type='mouse' bus='ps2'/>
      <graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1'>
        <listen type='address' address='127.0.0.1'/>
      </graphics>
      <video>
        <model type='cirrus' vram='9216' heads='1'/>
        <alias name='video0'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x02' 
function='0x0'/>
      </video>
      <memballoon model='virtio'>
        <alias name='balloon0'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x05' 
function='0x0'/>
      </memballoon>
    </devices>
    <seclabel type='none' model='selinux'/>
  </domain>

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1197663/+subscriptions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]