diff options
Diffstat (limited to 'resources')
-rw-r--r-- | resources/libraries/python/QemuUtils.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/resources/libraries/python/QemuUtils.py b/resources/libraries/python/QemuUtils.py index ea1d56a3c0..1e3a8aa6b6 100644 --- a/resources/libraries/python/QemuUtils.py +++ b/resources/libraries/python/QemuUtils.py @@ -39,7 +39,7 @@ class QemuUtils(object): # Daemonize the QEMU process after initialization. Default one # management interface. self._qemu_opt['options'] = '-cpu host -daemonize -enable-kvm ' \ - '-machine pc-1.0,accel=kvm,usb=off,mem-merge=off ' \ + '-machine pc,accel=kvm,usb=off,mem-merge=off ' \ '-net nic,macaddr=52:54:00:00:02:01 -balloon none' self._qemu_opt['ssh_fwd_port'] = 10022 # Default serial console port @@ -60,6 +60,8 @@ class QemuUtils(object): 'password': 'cisco', 'interfaces': {}, } + # Virtio queue count + self._qemu_opt['queues'] = 1 self._vhost_id = 0 self._ssh = None self._node = None @@ -194,15 +196,15 @@ class QemuUtils(object): chardev += ',server' self._qemu_opt['options'] += chardev # Create Vhost-user network backend. - netdev = ' -netdev vhost-user,id=vhost{0},chardev=char{0}'.format( - self._vhost_id) + netdev = ' -netdev vhost-user,id=vhost{0},chardev=char{0},'\ + 'queues={1}'.format(self._vhost_id, self._qemu_opt['queues']) self._qemu_opt['options'] += netdev # If MAC is not specified use autogenerated 52:54:00:00:04:<vhost_id> # e.g. vhost1 MAC is 52:54:00:00:04:01 if mac is None: mac = '52:54:00:00:04:{0:02x}'.format(self._vhost_id) - extend_options = 'csum=off,gso=off,guest_tso4=off,guest_tso6=off,'\ - 'guest_ecn=off,mrg_rxbuf=off' + extend_options = 'mq=on,csum=off,gso=off,guest_tso4=off,'\ + 'guest_tso6=off,guest_ecn=off,mrg_rxbuf=off' # Create Virtio network device. device = ' -device virtio-net-pci,netdev=vhost{0},mac={1},{2}'.format( self._vhost_id, mac, extend_options) |