metan-ucw / runltp-ng

Minimalistic LTP testrunner
11 stars 16 forks source link

Use Virtio devices by default in QEMU #15

Open shunghsiyu opened 4 years ago

shunghsiyu commented 4 years ago

When running runltp-ng on openSUSE Tumbleweed (comes with QEMU 5.0.0) I notice that the guest VM created does not get a network interface card (NIC) by default, where as VM guests created openSUSE Leap 15.1 (QEMU 3.1.1.1) does get one.

Right now I just work around this by passing -nic user,model=virtio-net-pci inside the backend option opts.

Maybe its worth always passing a NIC option to QEMU explicitly? (Since backends needs to be able to reach internet after a successfull login/boot is one of the requirements of runltp-ng)

shunghsiyu commented 4 years ago

I take this back, there is a default e1000 NIC on the VM, it's just that the guest’s kernel did not come with an e1000 driver.

richiejp commented 4 years ago

Maybe we should use virtio NIC by default? All cloud providers should be using virtio nics, so using virtio will make testing more relevant to real world usage of VMs.

Same for other devices currently being emulated.

shunghsiyu commented 4 years ago

Maybe we should use virtio NIC by default? All cloud providers should be using virtio nics, so using virtio will make testing more relevant to real world usage of VMs.

I second that. It would certainly help in my use case as well.