Use vm.name instead vm object
This helps create_new_vm since we don't have the vm yet
This commit is contained in:
parent
31f4297c7d
commit
094ec99829
@ -38,7 +38,7 @@ class VMBootFromDeviceWindow(ui_bootfromdevice.Ui_BootDialog,
|
|||||||
|
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
self.setWindowTitle(
|
self.setWindowTitle(
|
||||||
self.tr("Boot {vm} from device").format(vm=self.vm.name))
|
self.tr("Boot {vm} from device").format(vm=self.vm))
|
||||||
|
|
||||||
self.buttonBox.accepted.connect(self.save_and_apply)
|
self.buttonBox.accepted.connect(self.save_and_apply)
|
||||||
self.buttonBox.rejected.connect(self.reject)
|
self.buttonBox.rejected.connect(self.reject)
|
||||||
@ -74,7 +74,7 @@ class VMBootFromDeviceWindow(ui_bootfromdevice.Ui_BootDialog,
|
|||||||
|
|
||||||
def __warn_if_running__(self):
|
def __warn_if_running__(self):
|
||||||
try:
|
try:
|
||||||
if self.vm.is_running():
|
if self.qubesapp.domains[self.vm].is_running():
|
||||||
QtWidgets.QMessageBox.warning(
|
QtWidgets.QMessageBox.warning(
|
||||||
self,
|
self,
|
||||||
self.tr("Warning!"),
|
self.tr("Warning!"),
|
||||||
@ -104,7 +104,8 @@ class VMBootFromDeviceWindow(ui_bootfromdevice.Ui_BootDialog,
|
|||||||
)
|
)
|
||||||
|
|
||||||
device_choice = []
|
device_choice = []
|
||||||
for domain in self.vm.app.domains:
|
|
||||||
|
for domain in self.qubesapp.domains:
|
||||||
try:
|
try:
|
||||||
for device in domain.devices["block"]:
|
for device in domain.devices["block"]:
|
||||||
device_choice.append((str(device), device))
|
device_choice.append((str(device), device))
|
||||||
|
@ -1025,7 +1025,7 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog):
|
|||||||
|
|
||||||
def boot_from_cdrom_button_pressed(self):
|
def boot_from_cdrom_button_pressed(self):
|
||||||
boot_dialog = bootfromdevice.VMBootFromDeviceWindow(
|
boot_dialog = bootfromdevice.VMBootFromDeviceWindow(
|
||||||
self.vm, self.qapp, self.qubesapp, self)
|
self.vm.name, self.qapp, self.qubesapp, self)
|
||||||
if boot_dialog.exec_():
|
if boot_dialog.exec_():
|
||||||
self.save_and_apply()
|
self.save_and_apply()
|
||||||
qvm_start.main(['--cdrom', boot_dialog.cdrom_location, self.vm.name])
|
qvm_start.main(['--cdrom', boot_dialog.cdrom_location, self.vm.name])
|
||||||
|
Loading…
Reference in New Issue
Block a user