Commit 64066532 authored by Łukasz Nowak's avatar Łukasz Nowak

Revert "software/kvm: Allow many CD-ROMs to boot from"

This reverts commit cc1713c3.

Unfortunately a lot of installation OS ISOs (like Debian 9 and 10) do not
support such device during installation process, because of missing drivers
on the OS CD.
parent c58a7a80
...@@ -55,7 +55,7 @@ md5sum = b7e87479a289f472b634a046b44b5257 ...@@ -55,7 +55,7 @@ md5sum = b7e87479a289f472b634a046b44b5257
[template-kvm-run] [template-kvm-run]
filename = template/template-kvm-run.in filename = template/template-kvm-run.in
md5sum = 4a6f149177a453a13436f320f6841518 md5sum = 84e40e43a74559f3b31677c2b2052360
[template-kvm-controller] [template-kvm-controller]
filename = template/kvm-controller-run.in filename = template/kvm-controller-run.in
......
...@@ -371,7 +371,6 @@ for nbd_ip, nbd_port in nbd_list: ...@@ -371,7 +371,6 @@ for nbd_ip, nbd_port in nbd_list:
'-drive', '-drive',
'file=nbd:[%s]:%s,media=cdrom' % (nbd_ip, nbd_port)]) 'file=nbd:[%s]:%s,media=cdrom' % (nbd_ip, nbd_port)])
else: else:
index = 0
if boot_image_url_select_json_config: if boot_image_url_select_json_config:
# Support boot-image-url-select # Support boot-image-url-select
with open(boot_image_url_select_json_config) as fh: with open(boot_image_url_select_json_config) as fh:
...@@ -381,11 +380,9 @@ else: ...@@ -381,11 +380,9 @@ else:
link = os.path.join(image_config['destination-directory'], image['link']) link = os.path.join(image_config['destination-directory'], image['link'])
if os.path.exists(link) and os.path.islink(link): if os.path.exists(link) and os.path.islink(link):
kvm_argument_list.extend([ kvm_argument_list.extend([
'-drive', 'file=%s,media=cdrom,if=none,id=cdrom%s' % (link, index), '-drive',
'-device', 'virtio-scsi-pci,id=scsi%s' % (index,), 'file=%s,media=cdrom' % (link,)
'-device', 'scsi-cd,bus=scsi%s.0,drive=cdrom%s' % (index, index)
]) ])
index += 1
if boot_image_url_list_json_config: if boot_image_url_list_json_config:
# Support boot-image-url-list # Support boot-image-url-list
with open(boot_image_url_list_json_config) as fh: with open(boot_image_url_list_json_config) as fh:
...@@ -395,16 +392,12 @@ else: ...@@ -395,16 +392,12 @@ else:
link = os.path.join(image_config['destination-directory'], image['link']) link = os.path.join(image_config['destination-directory'], image['link'])
if os.path.exists(link) and os.path.islink(link): if os.path.exists(link) and os.path.islink(link):
kvm_argument_list.extend([ kvm_argument_list.extend([
'-drive', 'file=%s,media=cdrom,if=none,id=cdrom%s' % (link, index), '-drive',
'-device', 'virtio-scsi-pci,id=scsi%s' % (index,), 'file=%s,media=cdrom' % (link,)
'-device', 'scsi-cd,bus=scsi%s.0,drive=cdrom%s' % (index, index)
]) ])
index += 1
# Always add by default the default image # Always add by default the default image
kvm_argument_list.extend([ kvm_argument_list.extend([
'-drive', 'file=%s,media=cdrom,if=none,id=cdrom%s' % (default_cdrom_iso, index), '-drive', 'file=%s,media=cdrom' % default_cdrom_iso
'-device', 'virtio-scsi-pci,id=scsi%s' % (index,),
'-device', 'scsi-cd,bus=scsi%s.0,drive=cdrom%s' % (index, index)
]) ])
......
...@@ -604,7 +604,7 @@ class TestBootImageUrlList(InstanceTestCase): ...@@ -604,7 +604,7 @@ class TestBootImageUrlList(InstanceTestCase):
# check that the image is NOT YET available in kvm # check that the image is NOT YET available in kvm
self.assertEqual( self.assertEqual(
['file=/parts/debian-amd64-netinst.iso/debian-amd64-netinst.iso,' ['file=/parts/debian-amd64-netinst.iso/debian-amd64-netinst.iso,'
'media=cdrom,if=none,id=cdrom0'], 'media=cdrom'],
getRunningImageList() getRunningImageList()
) )
...@@ -618,12 +618,10 @@ class TestBootImageUrlList(InstanceTestCase): ...@@ -618,12 +618,10 @@ class TestBootImageUrlList(InstanceTestCase):
# now the image is available in the kvm, and its above default image # now the image is available in the kvm, and its above default image
self.assertEqual( self.assertEqual(
[ [
'file=/srv/%s/image_001,media=cdrom,if=none,id=cdrom0' % ( 'file=/srv/%s/image_001,media=cdrom' % (self.image_directory,),
self.image_directory,), 'file=/srv/%s/image_002,media=cdrom' % (self.image_directory,),
'file=/srv/%s/image_002,media=cdrom,if=none,id=cdrom1' % (
self.image_directory,),
'file=/parts/debian-amd64-netinst.iso/debian-amd64-netinst.iso,' 'file=/parts/debian-amd64-netinst.iso/debian-amd64-netinst.iso,'
'media=cdrom,if=none,id=cdrom2' 'media=cdrom'
], ],
getRunningImageList() getRunningImageList()
) )
...@@ -647,7 +645,7 @@ class TestBootImageUrlList(InstanceTestCase): ...@@ -647,7 +645,7 @@ class TestBootImageUrlList(InstanceTestCase):
# again only default image is available in the running process # again only default image is available in the running process
self.assertEqual( self.assertEqual(
['file=/parts/debian-amd64-netinst.iso/debian-amd64-netinst.iso,' ['file=/parts/debian-amd64-netinst.iso/debian-amd64-netinst.iso,'
'media=cdrom,if=none,id=cdrom0'], 'media=cdrom'],
getRunningImageList() getRunningImageList()
) )
...@@ -786,7 +784,7 @@ class TestBootImageUrlSelect(TestBootImageUrlList): ...@@ -786,7 +784,7 @@ class TestBootImageUrlSelect(TestBootImageUrlList):
# check that the image is NOT YET available in kvm # check that the image is NOT YET available in kvm
self.assertEqual( self.assertEqual(
['file=/parts/debian-amd64-netinst.iso/debian-amd64-netinst.iso,' ['file=/parts/debian-amd64-netinst.iso/debian-amd64-netinst.iso,'
'media=cdrom,if=none,id=cdrom0'], 'media=cdrom'],
getRunningImageList() getRunningImageList()
) )
...@@ -800,12 +798,10 @@ class TestBootImageUrlSelect(TestBootImageUrlList): ...@@ -800,12 +798,10 @@ class TestBootImageUrlSelect(TestBootImageUrlList):
# now the image is available in the kvm, and its above default image # now the image is available in the kvm, and its above default image
self.assertEqual( self.assertEqual(
[ [
'file=/srv/boot-image-url-select-repository/image_001,media=cdrom,' 'file=/srv/boot-image-url-select-repository/image_001,media=cdrom',
'if=none,id=cdrom0', 'file=/srv/boot-image-url-list-repository/image_001,media=cdrom',
'file=/srv/boot-image-url-list-repository/image_001,media=cdrom,'
'if=none,id=cdrom1',
'file=/parts/debian-amd64-netinst.iso/debian-amd64-netinst.iso,' 'file=/parts/debian-amd64-netinst.iso/debian-amd64-netinst.iso,'
'media=cdrom,if=none,id=cdrom2' 'media=cdrom'
], ],
getRunningImageList() getRunningImageList()
) )
...@@ -834,7 +830,7 @@ class TestBootImageUrlSelect(TestBootImageUrlList): ...@@ -834,7 +830,7 @@ class TestBootImageUrlSelect(TestBootImageUrlList):
# again only default image is available in the running process # again only default image is available in the running process
self.assertEqual( self.assertEqual(
['file=/parts/debian-amd64-netinst.iso/debian-amd64-netinst.iso,' ['file=/parts/debian-amd64-netinst.iso/debian-amd64-netinst.iso,'
'media=cdrom,if=none,id=cdrom0'], 'media=cdrom'],
getRunningImageList() getRunningImageList()
) )
......
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