Sandro Bonazzola has uploaded a new change for review. Change subject: vdsm: vm.conf: migrate boot to bootOrder ......................................................................
vdsm: vm.conf: migrate boot to bootOrder migrated boot keyword used previously at VM configuration level to the new specification of bootOrder now used at devices specification level. Change-Id: I2f5cb3bde2bcb48d8e943201c3447b572835d5ef Bug-Url: https://bugzilla.redhat.com/1011031 Signed-off-by: Sandro Bonazzola <sbona...@redhat.com> --- M src/plugins/ovirt-hosted-engine-setup/engine/os_install.py M src/plugins/ovirt-hosted-engine-setup/vm/configurevm.py M templates/vm.conf.in 3 files changed, 16 insertions(+), 11 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-hosted-engine-setup refs/changes/10/19510/1 diff --git a/src/plugins/ovirt-hosted-engine-setup/engine/os_install.py b/src/plugins/ovirt-hosted-engine-setup/engine/os_install.py index 9a5388d..78c5c0b 100644 --- a/src/plugins/ovirt-hosted-engine-setup/engine/os_install.py +++ b/src/plugins/ovirt-hosted-engine-setup/engine/os_install.py @@ -59,7 +59,11 @@ ], ) def _closeup(self): - self.environment[ohostedcons.VMEnv.SUBST]['@BOOT@'] = 'c' + self.environment[ohostedcons.VMEnv.SUBST][ + '@BOOT_DISK@' + ] = ',bootOrder:1' + self.environment[ohostedcons.VMEnv.SUBST]['@BOOT_PXE@'] = '' + self.environment[ohostedcons.VMEnv.SUBST]['@BOOT_CDROM@'] = '' content = ohostedutil.processTemplate( template=ohostedcons.FileLocations.ENGINE_VM_TEMPLATE, subst=self.environment[ohostedcons.VMEnv.SUBST], diff --git a/src/plugins/ovirt-hosted-engine-setup/vm/configurevm.py b/src/plugins/ovirt-hosted-engine-setup/vm/configurevm.py index 7d848ae..255eee4 100644 --- a/src/plugins/ovirt-hosted-engine-setup/vm/configurevm.py +++ b/src/plugins/ovirt-hosted-engine-setup/vm/configurevm.py @@ -48,9 +48,9 @@ """ BOOT_DEVICE = { - 'cdrom': 'd', - 'pxe': 'n', - 'disk': 'c', + 'cdrom': '@BOOT_CDROM@', + 'pxe': '@BOOT_PXE@', + 'disk': '@BOOT_DISK@', } def __init__(self, context): @@ -206,9 +206,11 @@ if self.environment[ ohostedcons.VMEnv.BOOT ] in self.BOOT_DEVICE.keys(): - subst['@BOOT@'] = self.BOOT_DEVICE[ - self.environment[ohostedcons.VMEnv.BOOT] - ] + for key in self.BOOT_DEVICE.keys(): + if key != self.environment[ohostedcons.VMEnv.BOOT]: + subst[self.BOOT_DEVICE[key]] = '' + else: + subst[self.BOOT_DEVICE[key]] = ',bootOrder:1' if self.environment[ ohostedcons.VMEnv.CDROM diff --git a/templates/vm.conf.in b/templates/vm.conf.in index 0207f91..6071211 100644 --- a/templates/vm.conf.in +++ b/templates/vm.conf.in @@ -1,12 +1,11 @@ vmId=@VM_UUID@ memSize=@MEM_SIZE@ display=@CONSOLE_TYPE@ -devices={index:2,iface:ide,address:{ controller:0, target:0,unit:0, bus:1, type:drive},specParams:{},readonly:true,deviceId:@CDROM_UUID@,path:@CDROM@,device:cdrom,shared:false,type:disk} -devices={index:0,iface:virtio,format:raw,poolID:@SP_UUID@,volumeID:@VOL_UUID@,imageID:@IMG_UUID@,specParams:{},readonly:false,domainID:@SD_UUID@,optional:false,deviceId:@IMG_UUID@,address:{bus:0x00, slot:0x06, domain:0x0000, type:pci, function:0x0},device:disk,shared:exclusive,propagateErrors:off,type:disk} +devices={index:2,iface:ide,address:{ controller:0, target:0,unit:0, bus:1, type:drive},specParams:{},readonly:true,deviceId:@CDROM_UUID@,path:@CDROM@,device:cdrom,shared:false,type:disk@BOOT_CDROM@} +devices={index:0,iface:virtio,format:raw,poolID:@SP_UUID@,volumeID:@VOL_UUID@,imageID:@IMG_UUID@,specParams:{},readonly:false,domainID:@SD_UUID@,optional:false,deviceId:@IMG_UUID@,address:{bus:0x00, slot:0x06, domain:0x0000, type:pci, function:0x0},device:disk,shared:exclusive,propagateErrors:off,type:disk@BOOT_DISK@} devices={device:scsi,model:virtio-scsi,type:controller} -devices={nicModel:pv,macAddr:@MAC_ADDR@,linkActive:true,network:@BRIDGE@,filter:vdsm-no-mac-spoofing,specParams:{},deviceId:@NIC_UUID@,address:{bus:0x00, slot:0x03, domain:0x0000, type:pci, function:0x0},device:bridge,type:interface} +devices={nicModel:pv,macAddr:@MAC_ADDR@,linkActive:true,network:@BRIDGE@,filter:vdsm-no-mac-spoofing,specParams:{},deviceId:@NIC_UUID@,address:{bus:0x00, slot:0x03, domain:0x0000, type:pci, function:0x0},device:bridge,type:interface@BOOT_PXE@} devices={device:console,specParams:{},type:console,deviceId:@CONSOLE_UUID@,alias:console0} -boot=@BOOT@ vmName=@NAME@ spiceSecureChannels=smain,sdisplay,sinputs,scursor,splayback,srecord,ssmartcard,susbredir smp=@VCPUS@ -- To view, visit http://gerrit.ovirt.org/19510 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f5cb3bde2bcb48d8e943201c3447b572835d5ef Gerrit-PatchSet: 1 Gerrit-Project: ovirt-hosted-engine-setup Gerrit-Branch: master Gerrit-Owner: Sandro Bonazzola <sbona...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches