Bug 601022 - kvm process always set guest's interface type as "if=none"
Summary: kvm process always set guest's interface type as "if=none"
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.1
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-07 02:46 UTC by Jianjiao Sun
Modified: 2011-04-14 05:32 UTC (History)
3 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2010-06-07 09:43:48 UTC


Attachments (Terms of Use)

Description Jianjiao Sun 2010-06-07 02:46:52 UTC
Description of problem:
Not matter my disk's type is ,When I use 'ps -ef |grep kvm',interface's content is 'if=none',not set the type correct.

Version-Release number of selected component (if applicable):
# rpm -qa |grep libvirt
libvirt-python-0.8.1-7.el6.x86_64
libvirt-0.8.1-7.el6.x86_64
libvirt-client-0.8.1-7.el6.x86_64
# rpm -qa |grep kvm
qemu-kvm-0.12.1.2-2.68.el6.x86_64
# uname -a
Linux dhcp-65-144.nay.redhat.com 2.6.32-31.el6.x86_64 #1 SMP Thu May 27 18:26:27 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux


How reproducible:
100%

Steps to Reproduce:
1. Install a guest with virtio/ scsi disk image
2. Shut off the guest and add an IDE disk
3. Start the guest
4. # ps -ef|grep kvm
  
Actual results:
qemu      9318 31.0  0.4 808532 17348 ?        Sl   22:42   0:01 /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -name rhel5_5_32_2 -uuid 6f569164-0a5a-b8c1-54e0-53095d311dc5 -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/rhel5_5_32_2.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -boot c -drive file=/var/lib/libvirt/images/RHEL-Server-5.5-32-virtio-2.qcow2,

if=none,id=drive-virtio-disk1,boot=on,format=qcow2 -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1 -drive file=/var/lib/libvirt/images/bb.img,

if=none,id=drive-ide0-0-1,cache=off -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -netdev tap,fd=20,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:92:92:17,bus=pci.0,addr=0x5 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:0 -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
(Because I can't use bold character,in order to clarify the problem more clear I add two new line before "if=none")

Expected results:
qemu      9318 31.0  0.4 808532 17348 ?        Sl   22:42   0:01 /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -name rhel5_5_32_2 -uuid 6f569164-0a5a-b8c1-54e0-53095d311dc5 -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/rhel5_5_32_2.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -boot c -drive file=/var/lib/libvirt/images/RHEL-Server-5.5-32-virtio-2.qcow2,

if=virtio,id=drive-virtio-disk1,boot=on,format=qcow2 -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk1,id=virtio-disk1 -drive file=/var/lib/libvirt/images/bb.img,

if=ide,id=drive-ide0-0-1,cache=off -device ide-drive,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -netdev tap,fd=20,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:92:92:17,bus=pci.0,addr=0x5 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:0 -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
(Because I can't use bold character,in order to clarify the problem more clear I add two new line before "if=...")

Additional info:
I have check the guest on rhel5,the result is right.
man qemu-kvm ,I only find the "Available types are: ide, scsi, sd, mtd, floppy,
pflash, virtio.",I can't find "none" type

Comment 2 Daniel Berrange 2010-06-07 09:43:48 UTC
This is the correct new syntax for QEMU.  Using '-drive if=ide' is the *old* way of setting up disks in QEMU.

The recommended way of setting up disks with latest QEMU is to use a combination of '-drive' (for the host side config) and '-device' (for the guest side config).  The bus type (ide, scsi, sd, etc) is a host side config parameter, hence its done using -device.

  '-drive if=none...   -device ide-drive...'

Comment 3 Jianjiao Sun 2010-06-07 10:12:11 UTC
I see ,Thank you!


Note You need to log in before you can comment on or make changes to this bug.