rafaelweingartner commented on a change in pull request #2465: CLOUDSTACK-10232: SystemVMs and VR to run as HVM on XenServer URL: https://github.com/apache/cloudstack/pull/2465#discussion_r170073522
########## File path: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java ########## @@ -1368,12 +1368,23 @@ public VM createVmFromTemplate(final Connection conn, final VirtualMachineTO vmS final String bootArgs = vmSpec.getBootArgs(); if (bootArgs != null && bootArgs.length() > 0) { + // send boot args for PV instances String pvargs = vm.getPVArgs(conn); pvargs = pvargs + vmSpec.getBootArgs().replaceAll(" ", "%"); if (s_logger.isDebugEnabled()) { s_logger.debug("PV args are " + pvargs); } vm.setPVArgs(conn, pvargs); + + // send boot args into xenstore-data for HVM instances + Map<String, String> xenstoreData = new HashMap<>(); + + xenstoreData.put("vm-data/cloudstack/init", bootArgs); + vm.setXenstoreData(conn, xenstoreData); + + if (s_logger.isDebugEnabled()) { + s_logger.debug("HVM args are " + bootArgs); Review comment: In this type of system such as ACS, I believe it is worth the cost of a tiny bit of more processing to remove an If statement. Specially in cases such as this one, when you already have others IFs where this one is nested. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services