vm/qubesvm: check if all required devices are available before start
Fail the VM start early if some persistently-assigned device is missing. This will both save time and provide clearer error message. Fixes QubesOS/qubes-issues#3810
This commit is contained in:
parent
2aa14623bf
commit
ba82d9dc21
@ -865,6 +865,12 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
|
||||
pre_event=True,
|
||||
start_guid=start_guid, mem_required=mem_required)
|
||||
|
||||
for devclass in self.devices:
|
||||
for dev in self.devices[devclass].persistent():
|
||||
if isinstance(dev, qubes.devices.UnknownDevice):
|
||||
raise qubes.exc.QubesException(
|
||||
'{} device {} not available'.format(devclass, dev))
|
||||
|
||||
qmemman_client = None
|
||||
try:
|
||||
if self.virt_mode == 'pvh' and self.kernel is None:
|
||||
|
Loading…
Reference in New Issue
Block a user