All of lore.kernel.org
 help / color / mirror / Atom feed
* virtIO disks not usable
@ 2012-08-31 13:19 Andrew Holway
  2012-08-31 16:05 ` Andrew Holway
  2012-09-03  6:41 ` Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Holway @ 2012-08-31 13:19 UTC (permalink / raw)
  To: kvm

Hi,

I am creating a VM with the following command:

virt-install --connect qemu:///system -n vm001 -r 2048 --vcpus=2 --disk path=/local/vm001.img,device=disk,bus=virtio,size=45 --vnc --noautoconsole --os-type linux --accelerate --network=bridge:br0,mac=00:00:00:00:00:0E --network=bridge:br1,mac=00:00:01:00:00:0E,model=virtio --pxe --hvm

[root@node001 ~]# ps aux | grep kvm
qemu     26893  1.4  0.2 2491820 342852 ?      Sl   14:51   0:19 /usr/libexec/qemu-kvm -S -M rhel6.3.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name vm001 -uuid 1b379a13-c85f-aa62-7e1f-3cf0803ff095 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/vm001.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-reboot -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/local/vm001.img,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=2 -netdev tap,fd=28,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=00:00:00:00:00:0e,bus=pci.0,addr=0x3,bootindex=1 -netdev tap,fd=29,id=hostnet
 1,vhost=on,vhostfd=30 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=00:00:01:00:00:0e,bus=pci.0,addr=0x4 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.0.0.1:0 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6

but my os cannot see any usable disks:

root@vm001 ~]# ls -alF /dev/disk/by-path
total 0
drwxr-xr-x 2 root root 200 2012-08-23 23:41 ./
drwxr-xr-x 5 root root 100 2012-07-25 18:48 ../
lrwxrwxrwx 1 root root   9 2012-08-31 14:52 pci-0000:03:05.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root  10 2012-08-31 14:52 pci-0000:03:05.0-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root  10 2012-08-31 14:52 pci-0000:03:05.0-scsi-0:0:0:0-part2 -> ../../sda2
lrwxrwxrwx 1 root root  10 2012-08-31 14:52 pci-0000:03:05.0-scsi-0:0:0:0-part3 -> ../../sda3
lrwxrwxrwx 1 root root   9 2012-08-31 14:52 pci-0000:03:05.0-scsi-1:0:0:0 -> ../../sdb
lrwxrwxrwx 1 root root  10 2012-08-31 14:52 pci-0000:03:05.0-scsi-1:0:0:0-part1 -> ../../sdb1
lrwxrwxrwx 1 root root  10 2012-08-31 14:52 pci-0000:03:05.0-scsi-1:0:0:0-part2 -> ../../sdb2
lrwxrwxrwx 1 root root  10 2012-08-31 14:52 pci-0000:03:05.0-scsi-1:0:0:0-part3 -> ../../sdb3

I have 4096 block devices from sda..sdx.

root@vm001 ~]# lspci -k
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
	Subsystem: Red Hat, Inc Qemu virtual machine
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
	Subsystem: Red Hat, Inc Qemu virtual machine
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
	Subsystem: Red Hat, Inc Qemu virtual machine
	Kernel driver in use: ata_piix
00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
	Subsystem: Red Hat, Inc Qemu virtual machine
	Kernel driver in use: uhci_hcd
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
	Subsystem: Red Hat, Inc Qemu virtual machine
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
	Subsystem: Red Hat, Inc Device 1100
00:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 20)
	Subsystem: Red Hat, Inc Device 1100
	Kernel driver in use: 8139cp
00:04.0 Ethernet controller: Red Hat, Inc Virtio network device
	Subsystem: Red Hat, Inc Device 0001
	Kernel driver in use: virtio-pci
00:05.0 SCSI storage controller: Red Hat, Inc Virtio block device
	Subsystem: Red Hat, Inc Device 0002
	Kernel driver in use: virtio-pci
00:06.0 RAM memory: Red Hat, Inc Virtio memory balloon
	Subsystem: Red Hat, Inc Device 0005
	Kernel driver in use: virtio-pci

Any ideas what is going on?

Danke,

Andrew





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: virtIO disks not usable
  2012-08-31 13:19 virtIO disks not usable Andrew Holway
@ 2012-08-31 16:05 ` Andrew Holway
  2012-09-03  6:41 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Holway @ 2012-08-31 16:05 UTC (permalink / raw)
  To: kvm

Stupid boy. I didnt have the virtIO modules loaded.

On Aug 31, 2012, at 3:19 PM, Andrew Holway wrote:

> Hi,
> 
> I am creating a VM with the following command:
> 
> virt-install --connect qemu:///system -n vm001 -r 2048 --vcpus=2 --disk path=/local/vm001.img,device=disk,bus=virtio,size=45 --vnc --noautoconsole --os-type linux --accelerate --network=bridge:br0,mac=00:00:00:00:00:0E --network=bridge:br1,mac=00:00:01:00:00:0E,model=virtio --pxe --hvm
> 
> [root@node001 ~]# ps aux | grep kvm
> qemu     26893  1.4  0.2 2491820 342852 ?      Sl   14:51   0:19 /usr/libexec/qemu-kvm -S -M rhel6.3.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name vm001 -uuid 1b379a13-c85f-aa62-7e1f-3cf0803ff095 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/vm001.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-reboot -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/local/vm001.img,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=2 -netdev tap,fd=28,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=00:00:00:00:00:0e,bus=pci.0,addr=0x3,bootindex=1 -netdev tap,fd=29,id=hostn
 et1,vhost=on,vhostfd=30 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=00:00:01:00:00:0e,bus=pci.0,addr=0x4 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc 127.
> 0.0.1:0 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6
> 
> but my os cannot see any usable disks:
> 
> root@vm001 ~]# ls -alF /dev/disk/by-path
> total 0
> drwxr-xr-x 2 root root 200 2012-08-23 23:41 ./
> drwxr-xr-x 5 root root 100 2012-07-25 18:48 ../
> lrwxrwxrwx 1 root root   9 2012-08-31 14:52 pci-0000:03:05.0-scsi-0:0:0:0 -> ../../sda
> lrwxrwxrwx 1 root root  10 2012-08-31 14:52 pci-0000:03:05.0-scsi-0:0:0:0-part1 -> ../../sda1
> lrwxrwxrwx 1 root root  10 2012-08-31 14:52 pci-0000:03:05.0-scsi-0:0:0:0-part2 -> ../../sda2
> lrwxrwxrwx 1 root root  10 2012-08-31 14:52 pci-0000:03:05.0-scsi-0:0:0:0-part3 -> ../../sda3
> lrwxrwxrwx 1 root root   9 2012-08-31 14:52 pci-0000:03:05.0-scsi-1:0:0:0 -> ../../sdb
> lrwxrwxrwx 1 root root  10 2012-08-31 14:52 pci-0000:03:05.0-scsi-1:0:0:0-part1 -> ../../sdb1
> lrwxrwxrwx 1 root root  10 2012-08-31 14:52 pci-0000:03:05.0-scsi-1:0:0:0-part2 -> ../../sdb2
> lrwxrwxrwx 1 root root  10 2012-08-31 14:52 pci-0000:03:05.0-scsi-1:0:0:0-part3 -> ../../sdb3
> 
> I have 4096 block devices from sda..sdx.
> 
> root@vm001 ~]# lspci -k
> 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
> 	Subsystem: Red Hat, Inc Qemu virtual machine
> 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
> 	Subsystem: Red Hat, Inc Qemu virtual machine
> 00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
> 	Subsystem: Red Hat, Inc Qemu virtual machine
> 	Kernel driver in use: ata_piix
> 00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
> 	Subsystem: Red Hat, Inc Qemu virtual machine
> 	Kernel driver in use: uhci_hcd
> 00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
> 	Subsystem: Red Hat, Inc Qemu virtual machine
> 00:02.0 VGA compatible controller: Cirrus Logic GD 5446
> 	Subsystem: Red Hat, Inc Device 1100
> 00:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 20)
> 	Subsystem: Red Hat, Inc Device 1100
> 	Kernel driver in use: 8139cp
> 00:04.0 Ethernet controller: Red Hat, Inc Virtio network device
> 	Subsystem: Red Hat, Inc Device 0001
> 	Kernel driver in use: virtio-pci
> 00:05.0 SCSI storage controller: Red Hat, Inc Virtio block device
> 	Subsystem: Red Hat, Inc Device 0002
> 	Kernel driver in use: virtio-pci
> 00:06.0 RAM memory: Red Hat, Inc Virtio memory balloon
> 	Subsystem: Red Hat, Inc Device 0005
> 	Kernel driver in use: virtio-pci
> 
> Any ideas what is going on?
> 
> Danke,
> 
> Andrew
> 
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: virtIO disks not usable
  2012-08-31 13:19 virtIO disks not usable Andrew Holway
  2012-08-31 16:05 ` Andrew Holway
@ 2012-09-03  6:41 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2012-09-03  6:41 UTC (permalink / raw)
  To: Andrew Holway; +Cc: kvm

Il 31/08/2012 15:19, Andrew Holway ha scritto:
> I have 4096 block devices from sda..sdx.

Do you mean (here and in your other cache=none message) that the host
devices have 4k logical blocks?

If so, and if you use cache=none, you need to export them as 4k block
devices to the guest as well.  This is done with the
"logical_block_size=4096" sub-option in the "-device virtio-blk-pci"
command-line option.  Libvirt however does not support this yet.

Alternatively, there were QEMU-side patches to support emulating a
512-over-4k device (using read-modify-write).  One version I posted is
at http://lists.gnu.org/archive/html/qemu-devel/2011-12/msg01570.html --
I need to rebase and repost.

Paolo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-03  6:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31 13:19 virtIO disks not usable Andrew Holway
2012-08-31 16:05 ` Andrew Holway
2012-09-03  6:41 ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.