vm: send domain-start-failed event also if some device is missing
Checking device presence wasn't covered with try/except that send the event.
This commit is contained in:
parent
0eab082d85
commit
35a53840f1
@ -962,14 +962,15 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
|
|||||||
reason=str(exc))
|
reason=str(exc))
|
||||||
raise
|
raise
|
||||||
|
|
||||||
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
|
qmemman_client = None
|
||||||
try:
|
try:
|
||||||
|
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))
|
||||||
|
|
||||||
if self.virt_mode == 'pvh' and not self.kernel:
|
if self.virt_mode == 'pvh' and not self.kernel:
|
||||||
raise qubes.exc.QubesException(
|
raise qubes.exc.QubesException(
|
||||||
'virt_mode PVH require kernel to be set')
|
'virt_mode PVH require kernel to be set')
|
||||||
|
Loading…
Reference in New Issue
Block a user