network: fix vhost-user net creation

When creating a device structure to be added to the hypervisor, make
sure that the device includes the vhost-user type.  In particular,
for network devices, specificy VhostUserNet.

Fixes: #601

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
This commit is contained in:
Eric Ernst 2018-08-17 20:38:38 +00:00
parent 0bcb32f704
commit ee1ea36d0a

View File

@ -286,6 +286,7 @@ func (endpoint *VhostUserEndpoint) Attach(h hypervisor) error {
ID: id,
SocketPath: endpoint.SocketPath,
MacAddress: endpoint.HardAddr,
Type: config.VhostUserNet,
}
return h.addDevice(d, vhostuserDev)