Commit 80eacbe4 authored by Guillaume Hervier's avatar Guillaume Hervier

software/kvm: Fix NBD handling.

Close the NBD socket when testing it so it won't mess up qemu.

/reviewed-on !516
parent b0ed0bc0
...@@ -59,7 +59,7 @@ md5sum = 2036bf145f472f62ef8dee5e729328fd ...@@ -59,7 +59,7 @@ md5sum = 2036bf145f472f62ef8dee5e729328fd
[template-kvm-run] [template-kvm-run]
filename = template/template-kvm-run.in filename = template/template-kvm-run.in
md5sum = 9e40246b4bc4f968f0631016c939b014 md5sum = c8ca875bf246997137552538ab9d8b1a
[template-kvm-controller] [template-kvm-controller]
filename = template/kvm-controller-run.in filename = template/kvm-controller-run.in
......
...@@ -359,6 +359,8 @@ for nbd_ip, nbd_port in nbd_list: ...@@ -359,6 +359,8 @@ for nbd_ip, nbd_port in nbd_list:
print 'Warning : Nbd is not available.' print 'Warning : Nbd is not available.'
else: else:
# NBD is available # NBD is available
# We close the NBD socket else qemu won't be able to use it apparently
s.close()
kvm_argument_list.extend([ kvm_argument_list.extend([
'-drive', '-drive',
'file=nbd:[%s]:%s,media=cdrom' % (nbd_ip, nbd_port)]) 'file=nbd:[%s]:%s,media=cdrom' % (nbd_ip, nbd_port)])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment