block: Advertise block support for q35

Add block device capability for q35 as this machine type supports it.
This was never added with the introduction of q35 support.

Fixes #771

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
Archana Shinde 2018-09-21 14:21:50 -07:00
parent a8284f875b
commit 0cab1924c2
2 changed files with 2 additions and 3 deletions

View File

@ -102,8 +102,7 @@ func newQemuArch(config HypervisorConfig) qemuArch {
func (q *qemuAmd64) capabilities() capabilities {
var caps capabilities
// Only pc machine type supports hotplugging drives
if q.machineType == QemuPC {
if q.machineType == QemuPC || q.machineType == QemuQ35 {
caps.setBlockDeviceHotplugSupport()
}

View File

@ -31,7 +31,7 @@ func TestQemuAmd64Capabilities(t *testing.T) {
amd64 = newTestQemu(QemuQ35)
caps = amd64.capabilities()
assert.False(caps.isBlockDeviceHotplugSupported())
assert.True(caps.isBlockDeviceHotplugSupported())
}
func TestQemuAmd64Bridges(t *testing.T) {