mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-21 05:43:12 +00:00
Eject cdrom first before changing an image. Use 'force' when ejecting.
This commit is contained in:
parent
b7af2e4d5c
commit
7a463676cd
@ -451,13 +451,14 @@ class QemuVM(BaseNode):
|
|||||||
if self.is_running():
|
if self.is_running():
|
||||||
if self._cdrom_image:
|
if self._cdrom_image:
|
||||||
self._cdrom_option() # this will check the cdrom image is accessible
|
self._cdrom_option() # this will check the cdrom image is accessible
|
||||||
|
await self._control_vm("eject -f ide1-cd0")
|
||||||
await self._control_vm("change ide1-cd0 {}".format(self._cdrom_image))
|
await self._control_vm("change ide1-cd0 {}".format(self._cdrom_image))
|
||||||
log.info('QEMU VM "{name}" [{id}] has changed the cdrom image path to {cdrom_image} for the guest OS'.format(name=self._name,
|
log.info('QEMU VM "{name}" [{id}] has changed the cdrom image path to {cdrom_image}'.format(name=self._name,
|
||||||
id=self._id,
|
id=self._id,
|
||||||
cdrom_image=self._cdrom_image))
|
cdrom_image=self._cdrom_image))
|
||||||
else:
|
else:
|
||||||
await self._control_vm("eject ide1-cd0")
|
await self._control_vm("eject -f ide1-cd0")
|
||||||
log.info('QEMU VM "{name}" [{id}] has ejected the cdrom image for the guest OS'.format(name=self._name, id=self._id))
|
log.info('QEMU VM "{name}" [{id}] has ejected the cdrom image'.format(name=self._name, id=self._id))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def bios_image(self):
|
def bios_image(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user