Skip to main content
YannV
New Member
August 31, 2020
Solved

Simulate USB device in FortiOS VM64 QEMU

  • August 31, 2020
  • 1 reply
  • 3032 views

Hi,

 

We are builting a virtual lab with the wonderful "Eve-ng", and for being able to restore quickly a configuration, we would like to use the "USB Device" via "execute restore config usb <file>".

 

But we have to simulate the USB device through QEMU option.

 

Could someone help us on this topic ?

 

Thx.

    Best answer by YannV

    Good news, it's working with these QEMU options : 

     

    Prepare image :

    dd if=/dev/null of=fortigate_config_usb.img bs=1M seek=100

     

    Format : 

    mkfs.ext2 -F fortigate_config_usb.img

     

    QEMU Options : 

    -drive if=none,id=usbstick,file=/root/fortigate_config_usb.img -usb -device usb-ehci,id=ehci -device usb-tablet,bus=usb-bus.0 -device usb-storage,bus=ehci.0,drive=usbstick


    1 reply

    YannV
    YannVAuthorAnswer
    New Member
    September 10, 2020

    Good news, it's working with these QEMU options : 

     

    Prepare image :

    dd if=/dev/null of=fortigate_config_usb.img bs=1M seek=100

     

    Format : 

    mkfs.ext2 -F fortigate_config_usb.img

     

    QEMU Options : 

    -drive if=none,id=usbstick,file=/root/fortigate_config_usb.img -usb -device usb-ehci,id=ehci -device usb-tablet,bus=usb-bus.0 -device usb-storage,bus=ehci.0,drive=usbstick