@@ -254,28 +254,28 @@ def update_boot_option(
254254def update_vm_default_kernel (
255255 vm ,
256256 kernel_version ,
257- reboot = True ,
257+ reboot ,
258+ guest_arch_name ,
258259 timeout = "" ,
259- guest_arch_name = "x86_64" ,
260260 serial_login = False ,
261261):
262262 """
263263 Update guest default kernel.
264264
265265 :param vm: The VM object.
266266 :param kernel_version: The full kernel version that should be set as the new default.
267+ Can use the entire kernel path or just be the full kernel name.
267268 :param reboot: Whether to reboot the VM and update the kernel used or not.
268- :param timeout: Timeout for login and reboot.
269269 :param guest_arch_name: Guest architecture, e.g. x86_64, s390x, aarch64.
270+ :param timeout: Timeout for login and reboot.
270271 :param serial_login: Login guest via serial session.
272+ :raise NotImplementedError: Raised if Windows guest, not Linux.
271273 :raise exceptions.TestError: Raised if failed to update the guest kernel.
272274 """
273- session = None
274275 if vm .params .get ("os_type" ) == "windows" :
275- msg = "update_vm_default_kernel() is supported only for Linux guest"
276- LOG .warning (msg )
277- return
278- timeout = int (timeout ) or int (vm .params .get ("login_timeout" ))
276+ raise NotImplementedError ("update_vm_default_kernel() is supported only for Linux guest" )
277+
278+ timeout = int (timeout ) if timeout else int (vm .params .get ("login_timeout" ))
279279 session = vm .wait_for_login (
280280 timeout = timeout , serial = serial_login , restart_network = True
281281 )
0 commit comments