qemu中做pci hotplug

http://blog.csdn.net/gudujianjsk/article/details/7900058

官方的手册

http://www.linux-kvm.org/page/Hotadd_pci_devices


启动guest,使用本地的kernel

~/git/qemu/i386-softmmu/qemu-system-i386 -enable-kvm -drive file=ubuntu.img -boot dc -m 512  -monitor stdio -netdev user,id=usernet -device rtl8139,netdev=usernet -kernel /home/ywywyang/git/local/arch/x86/boot/bzImage -append "root=/dev/sda1 rw console=ttyS0,115200n8 "


在monitor中输入

(qemu) pci_add auto nic model=e1000
OK domain 0, bus 0, slot 4, function 0
(qemu) info pci

现在用新的命令了,在monitor中输入

     (qemu) netdev_add user,id=nd1
     (qemu) device_add e1000,netdev=nd1

gest中再输入

     drmgr -c pci -s "Slot 0" -a n



    

你可能感兴趣的:(qemu中做pci hotplug)