[GitHub] khos2ow commented on a change in pull request #2465: CLOUDSTACK-10232: SystemVMs and VR to run as HVM on XenServer
khos2ow 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_r186106111 ## File path: systemvm/debian/opt/cloud/bin/setup/cloud-early-config ## @@ -64,10 +71,17 @@ config_guest() { get_boot_params() { case $HYPERVISOR in - xen-domU|xen-hvm) + xen-pv) cat /proc/cmdline > $CMDLINE sed -i "s/%/ /g" $CMDLINE ;; + xen-hvm) + if [ ! -f /usr/sbin/xenstore-read ]; then +log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 + fi + /usr/sbin/xenstore-read vm-data/cloudstack/init > /var/cache/cloud/cmdline Review comment: Thanks @rhtyd for the update, that's exactly how I have been testing, I'm gonna double check on my side once again, but if you've done the testing and validated the changes are good that's really good news. 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
[GitHub] khos2ow commented on a change in pull request #2465: CLOUDSTACK-10232: SystemVMs and VR to run as HVM on XenServer
khos2ow 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_r185519409 ## File path: systemvm/debian/opt/cloud/bin/setup/cloud-early-config ## @@ -64,10 +71,17 @@ config_guest() { get_boot_params() { case $HYPERVISOR in - xen-domU|xen-hvm) + xen-pv) cat /proc/cmdline > $CMDLINE sed -i "s/%/ /g" $CMDLINE ;; + xen-hvm) + if [ ! -f /usr/sbin/xenstore-read ]; then +log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 + fi + /usr/sbin/xenstore-read vm-data/cloudstack/init > /var/cache/cloud/cmdline Review comment: That's strange, I really don't know what's going on. I just checked dozens of random VMs, on various Xenserver version (7.x.x+ though) and all of them had `xenstore-read` in both places! I guess using `/usr/bin` would be safer. or even check both places then log an error? BTW I wrote a comment on your PR as well. 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
[GitHub] khos2ow commented on a change in pull request #2465: CLOUDSTACK-10232: SystemVMs and VR to run as HVM on XenServer
khos2ow 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_r170110155 ## 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 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: Makes totally sense to me. Removed the IF condition. 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
[GitHub] khos2ow commented on a change in pull request #2465: CLOUDSTACK-10232: SystemVMs and VR to run as HVM on XenServer
khos2ow 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_r170077117 ## 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 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: I didn't get your point! Are your pro on this specific IF block or against it? 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
[GitHub] khos2ow commented on a change in pull request #2465: CLOUDSTACK-10232: SystemVMs and VR to run as HVM on XenServer
khos2ow 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_r170060637 ## 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 xenstoreData = new HashMap<>(); + +xenstoreData.put("vm-data/cloudstack/init", bootArgs); Review comment: sure. 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
[GitHub] khos2ow commented on a change in pull request #2465: CLOUDSTACK-10232: SystemVMs and VR to run as HVM on XenServer
khos2ow 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_r170022564 ## 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 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: Technically it can be removed, but as its javadoc says: `This function is intended to lessen the computational cost of disabled log debug statements.` and the fact that they are used all over the place I added the same if block. 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
[GitHub] khos2ow commented on a change in pull request #2465: CLOUDSTACK-10232: SystemVMs and VR to run as HVM on XenServer
khos2ow 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_r170010228 ## File path: systemvm/debian/opt/cloud/bin/setup/cloud-early-config ## @@ -42,7 +42,14 @@ hypervisor() { grep -q QEMU /var/log/messages && echo "kvm" && return 0 [ -d /proc/xen ] && mount -t xenfs none /proc/xen - [ -d /proc/xen ] && echo "xen-domU" && return 0 + if [ -d /proc/xen ]; then +`dmesg | grep -q "Xen HVM"` Review comment: sure. 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