
997 P.2d 136 (2000)
Jose Alvaro OCHOA-LOPEZ, Appellant,
v.
WARDEN, Lovelock Correctional Center, John Ignacio, Respondent.
No. 32718.
Supreme Court of Nevada.
April 6, 2000.
Karla K. Butko, Reno, for appellant.
*137 Frankie Sue Del Papa, Attorney General, Carson City, Richard A. Gammick, District Attorney, Terrence P. McCarthy, Deputy District Attorney, Washoe County, for respondent.
BEFORE YOUNG, AGOSTI and LEAVITT, JJ.

OPINION
PER CURIAM.
This is an appeal from the district court's denial of a post-conviction petition for a writ of habeas corpus. Appellant Jose Ochoa-Lopez was charged with the most serious level of trafficking of a controlled substance. Appellant entered into plea negotiations with the State following a denial of his motion to suppress the seized controlled substances. Appellant did not appeal his conviction directly, but filed this petition for a writ of habeas corpus. Appellant argues that his guilty plea was not voluntarily or knowingly entered because the district court accepted his plea even though there was not a written plea agreement, as required by NRS 174.035(6). We conclude, in looking at the totality of the circumstances, that the violation of NRS 174.035(6) is harmless and not per se reversible error.

FACTS
In December 1994, after leaving Boomtown Casino at approximately 10:00 p.m., appellant was driving on Interstate 80 when Trooper Mel Pecson of the Nevada Highway Patrol stopped him. Appellant had just picked up the vehicle from acquaintances and did not own the vehicle or have it registered in his name. Trooper Pecson observed the vehicle straddle both lanes of travel, as appellant attempted to change lanes. Although appellant was not speeding, Trooper Pecson stopped him to determine if he was possibly intoxicated. Appellant was not under the influence of alcohol.
A check on the license plate indicated that it may have been a fictitious registration, an unregistered vehicle, or possibly a stolen vehicle. Appellant was unable to produce a driver's license or registration for the vehicle and identified himself to Trooper Pecson as Jose Mariscal. Trooper Pecson was unable to find any records matching this name, and appellant did not give the officer any other identifying information. Trooper Pecson then arrested appellant until a positive identity could be ascertained.
Trooper Pecson then requested a tow truck and proceeded to complete a vehicle report before the tow truck arrived. The vehicle report included a section entitled "vehicle inventory," which required Trooper Pecson to raise the hood of the car and located a rag inside the engine compartment, which appeared to have been purposely placed on the right front quarter panel close to the headlight area. Trooper Pecson pulled out the rag, which contained something hard and lumpy inside and was wrapped in at least two plastic shopping bags. Trooper Pecson's training in identification and packaging of narcotics led him to suspect that the rag was a method of concealing controlled substances. Further inspection revealed that the substance was wrapped in duct tape. Trooper Pecson believed this to be a controlled substance, so he took the substance and drove the vehicle to the highway patrol office to perform a presumptive test. The substance was later identified as at least 28 grams of methamphetamine.
Appellant pleaded not guilty to the charge of trafficking in controlled substances and moved to suppress the narcotics obtained by Trooper Pecson during the vehicle inventory. After conducting a hearing on the motion to suppress the narcotics, the district court denied appellant's motion to suppress.
Prior to trial, appellant entered a plea of guilty to a lesser charge, with both parties remaining free to argue what type of sentence appellant was to receive. The district court canvassed appellant regarding the rights he was waiving by pleading guilty to the lesser charge. At the sentencing hearing, appellant moved to withdraw his previously entered guilty plea, advising the court that he did not trust his counsel. The district court denied this motion and sentenced appellant to fifteen years in the Nevada State Prison and a fine of $100,000.00.
*138 Appellant did not appeal, but instead filed a petition for a writ of habeas corpus. The district court ruled that appellant's claim that the guilty plea was not voluntarily or knowingly entered, was belied by the record and summarily denied this claim for relief. After an evidentiary hearing on the petition for post-conviction relief, the district court denied the petition and entered factual findings. This appeal followed.

DISCUSSION
Appellant argues that his guilty plea was not voluntarily or knowingly entered because the district court accepted his plea even though there was not a written plea agreement, as required by NRS 174.035(6).[1] Appellant essentially argues that any violation of NRS 174.035(6) is per se reversible error. We hold that the failure to complete a written plea agreement, as required by NRS 174.035(6), is not per se reversible error.
Although NRS 174.035(6) does require a written plea memorandum, this court will determine if a defendant's guilty plea is valid even without the plea memorandum by looking at the totality of the circumstances, including the failure to satisfy NRS 174.035(6). See Bryant v. State, 102 Nev. 268, 271, 721 P.2d 364, 367 (1986) (holding that reviewing court should look to the totality of the circumstances to determine if a guilty plea is valid). During the entry of the plea by appellant, the district court extensively canvassed appellant regarding his right to a trial by jury that he was waiving and ensured that appellant knew that matters of sentencing were left completely to the court. The district court also ensured that appellant completely understood the elements of the charge to which he was pleading, the penalties that could be imposed for the charge, and that appellant was satisfied with the legal services rendered by his attorney.
We conclude that the district court thoroughly canvassed appellant and correctly concluded that his guilty plea was voluntarily and knowingly entered within the contemplation of Bryant. While it is certainly preferable that a guilty plea memorandum be executed as required by NRS 174.035(6), we decline to hold that the failure to do so is per se reversible error. Thus, in looking at the totality of the circumstances, we conclude that the violation of NRS 174.035(6) was harmless error.[2]
NOTES
[1]  NRS 174.035(6) provides:

A defendant may not enter a plea of guilty or guilty by mentally ill pursuant to a plea bargain for an offense punishable as a felony for which:
(a) Probation is not allowed; or
(b) The maximum prison sentence is more than 10 years, unless the plea bargain is set forth in writing and signed by the defendant, the defendant's attorney, if he is represented by counsel, and the prosecuting attorney.
[2]  Appellant contends that a number of other errors occurred: that appellant did not receive effective assistance of counsel because appellant was not informed of his right to appeal, and he did not consent to forego an appeal; that appellant's guilty plea was not knowing or voluntary because appellant was not informed that any sentence in the present case would have to be served consecutively to his sentence in a parole revocation case; and that appellant is entitled to a new sentencing hearing because he provided substantial assistance to law enforcement officials. After a thorough review of the entire record and consideration of the relevant law, we conclude that none of these contentions has merit.
