Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
block: Advertise block support for q35
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
amshinde committed Oct 1, 2018
1 parent a8284f8 commit 0cab192
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions virtcontainers/qemu_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down
2 changes: 1 addition & 1 deletion virtcontainers/qemu_amd64_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0cab192

Please sign in to comment.