def METHOD_NAME(uvm_nano):
    """
    Test pause/resume operations are not allowed pre-boot.
    """
    basevm = uvm_nano
    expected_err = "not supported before starting the microVM"
    # Try to pause microvm when not running, it must fail.
    with pytest.raises(RuntimeError, match=expected_err):
        basevm.api.vm.patch(state="Paused")
    # Try to resume microvm when not running, it must fail.
    with pytest.raises(RuntimeError, match=expected_err):
        basevm.api.vm.patch(state="Resumed")