I have a tent roof that is at a 45° angle.
In the tent, I have a woodstove that has a vertical stove pipe.
I want to cut a hole in the roof of the tent that will be the exact shape of the protruding pipe.
How can I determine what the exact shape of the hole will be?

As Vasya already answered correctly in a comment, the shape will be an ellipse. The minor axis has a length of $d$, the diameter of the pipe. That's horizontal on your tent, so the slope doesn't affect that direction. The major axis has a diameter of $d\sqrt2$. That's along the direction of the full $45°$ slope. It corresponds to how a square of edge length $d$ has a diagonal of length $d\sqrt2$ at a slope of $45°$. Or alternatively you can get the factor from $d\sec(45°)=d/\cos(45°)=d\sqrt2$ which can be easily adapted for other angles.
As for drawing the ellipse, I's suggest the pins and string method. You put two pins into your tent roof at a given distance, and then wrap a string around them forming a loop with a given length. Then put a pen into that string loop and move it while keeping the string tight. The string will form a triangle with the two pins and the pen as corners.
The length of the string is the major axis, $d\sqrt2$. The distance from the center to the ellipse is called the focal distance, so the distance between the pins would be twice that focal distance. Wikipedia states that $a^2=b^2+c^2$ where $a$ is the semi-major axis, i.e. half the major axis or $d/\sqrt2$ in your case. $b$ is the semi-minor axis, or $d/2$ in your case. $c$ is the focal distance. From this you get
$$2c=2\sqrt{a^2-b^2}=2d\sqrt{\frac12-\frac14}=d$$
So make the distance between the two pins equal to the diameter of the pipe, and the length of the string $\sqrt2$ that. For $d=1$ you get something like this: