Cook the hamburger and onions until done. Stire in tomatoes, beans, tomato sauce, and chili powder. Cook uncovered over medium heat about 10 minutes, stirring occasionally, until desired consistency. Meanwhile, cook and drain spaghetti. For each serving spoon about 3/4 cup beef mixture over 1 cup spaghetti. Sprinkle each serving with 1/4 cup cheese.