mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	systemvm: Fixes #2561 patching on XenServer
This fixes incorrect xenstore-read binary path, this failed systemvm to be patched/started correctly on xenserver. The other fix is to keep the xen-domU flag that may be returned by virt-what. This effect won't change the cmdline being consumed as the mgmt server side (java) code sets the boot args in both xenstore and as pv args. The systemvm's /boot is ext2 that can be booted by PyGrub on both old and recent XenServer versions. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
		
							parent
							
								
									ddc8d131c0
								
							
						
					
					
						commit
						8533def696
					
				| @ -71,16 +71,16 @@ config_guest() { | |||||||
| 
 | 
 | ||||||
| get_boot_params() { | get_boot_params() { | ||||||
|   case $HYPERVISOR in |   case $HYPERVISOR in | ||||||
|      xen-pv) |      xen-pv|xen-domU) | ||||||
|           cat /proc/cmdline > $CMDLINE |           cat /proc/cmdline > $CMDLINE | ||||||
|           sed -i "s/%/ /g" $CMDLINE |           sed -i "s/%/ /g" $CMDLINE | ||||||
|           ;; |           ;; | ||||||
|      xen-hvm) |      xen-hvm) | ||||||
|           if [ ! -f /usr/sbin/xenstore-read ]; then |           if [ ! -f /usr/bin/xenstore-read ]; then | ||||||
|             log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 |             log_it "ERROR: xentools not installed, cannot found xenstore-read" && exit 5 | ||||||
|           fi |           fi | ||||||
|           /usr/sbin/xenstore-read vm-data/cloudstack/init > /var/cache/cloud/cmdline |           /usr/bin/xenstore-read vm-data/cloudstack/init > $CMDLINE | ||||||
|           sed -i "s/%/ /g" /var/cache/cloud/cmdline |           sed -i "s/%/ /g" $CMDLINE | ||||||
|           ;; |           ;; | ||||||
|      kvm) |      kvm) | ||||||
|           VPORT=$(find /dev/virtio-ports -type l -name '*.vport' 2>/dev/null|head -1) |           VPORT=$(find /dev/virtio-ports -type l -name '*.vport' 2>/dev/null|head -1) | ||||||
|  | |||||||
| @ -86,9 +86,9 @@ function install_packages() { | |||||||
|   fi |   fi | ||||||
| 
 | 
 | ||||||
|   # Install xenserver guest utilities as debian repos don't have it |   # Install xenserver guest utilities as debian repos don't have it | ||||||
|   wget https://mirrors.kernel.org/ubuntu/pool/universe/x/xe-guest-utilities/xe-guest-utilities_7.4.0-0ubuntu1_amd64.deb |   wget https://mirrors.kernel.org/ubuntu/pool/main/x/xe-guest-utilities/xe-guest-utilities_7.10.0-0ubuntu1_amd64.deb | ||||||
|   dpkg -i xe-guest-utilities_7.4.0-0ubuntu1_amd64.deb |   dpkg -i xe-guest-utilities_7.10.0-0ubuntu1_amd64.deb | ||||||
|   rm -f xe-guest-utilities_7.4.0-0ubuntu1_amd64.deb |   rm -f xe-guest-utilities_7.10.0-0ubuntu1_amd64.deb | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| return 2>/dev/null || install_packages | return 2>/dev/null || install_packages | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user