
You can see the container I use in the picture above. It really isn't tall enough when using the fennel, but it still worked. I purchased this at Walmart, but they should be available at any pet store.
I collect the caterpillars as soon as I spot them, (usually the first instar). This year I even started with eggs. Whatever plant I find them on, (parsley or fennel), that is the plant I keep available for them to eat. This year they liked the fennel best, (I only spotted one caterpillar on the parsley all summer). I snip the plant with the caterpillar on it and bring it inside. I have a really small single stem vase that I use, (large openings can cause the caterpillars to drown if they fall in). I place the host plant with the caterpillar on it in the vase. Every couple of days I wash the vase, refill it with water and replenish the food. I place the stem with the caterpillar on it back into the vase. It doesn't take long for it to crawl to the fresh food. I usually take this opportunity to clean out the container too. Caterpillars are prolific poopers and they make quite a mess. Right about the time you think they are too messy and too much trouble is about the time they are getting ready to become a chrysalis, so don't give up, the worst part is almost over.
I had to leave the top of the container open a few times because the fennel was too tall, one day the caterpillar was very restless and I found it crawling on the microwave. I knew it was looking for something to attach to. I picked it up and placed it back on the fennel, closed the lid, and went outside to collect a few small twigs to place in the container. Within minutes it found its way to the stick. Usually I don't wait that long before placing twigs in the container. The caterpillars need something firm to attach too, usually it is a stick, however this year one of them attached to the top of the container.
This is the easy part. Once in the chrysalis stage there is nothing to do but wait for the butterfly to emerge. For me it usually takes anywhere from ten days to several weeks for this to happen. I try to keep the container in a place where I can check it often, (usually the kitchen). As soon as the butterfly emerges and the wings dry a bit, I take it outside and place it on a flower that is popular with the black swallowtails. Of course there is usually a photo session involved.
That is all there is to it. So easy to do and the experience is priceless.