I want to develop an app for the iOS app store, but don't want to invest in a mac since they start very expensive. So I considered running Xcode via VMware using OSX Lion on my windows 7 computer. Would it be legal for me to create and sell an app if it was created on windows? Is Apple fine with it? Selling it on Cydia or other jailbreak stores are not an option.
It is against the Apple and Mac OS terms of agreement to install Mac OS on anything aside from an Apple authorized machine. You are in breach of your user agreement by doing even that. So app-store stuff aside - you are in legal hot water.
However! Pushing that aside, I'd like to note at least one game has been published with a similar method as the one you have developed. If you see this article you can read about it.
The paragraph I want to quote is:
"And one final thing to know about releasing to the app store when you make your app on a PC: you REQUIRE a mac to upload the binary to apple.
ITunes Connect used to allow you to upload through http, but no longer. There is a binary uploader program in the iOS SDK that checks and uploads your binary to apple. That uploader program only works on a mac. So while you can build and test the entire app on a PC, you need a mac for 10 minutes to upload your final binary. I’ve seen someone suggest just going to an apple store and using a demo mac to upload. In my case I already had the mac mini, so it wasn’t terribly inconvenient, but it was a real surprise."
They developed on the PC but uploaded on a Mac Mini. But apparently others have uploaded via just a demo computer and done well.
Even though legal advice should not be given here, it is a clean case as was noted earlier: you are not legally allowed to run OS X on non-Apple hardware.
However, to the question can you submit apps to AppStore the answer is yes. You can run OS X in a VM, develop there, send the apps to Apple and everything will be fine. Either Apple doesn't send any information about the machine (just the serial number would be enough to show it's not Apple HW), or they don't care.
So legal issues aside, you don't need a Mac to develop and submit, you just need OS X to do that. How you get it and run it is in your hands and there are no known cases where Apple would've not allowed an app that had been developed or submitted via OS X in a VM.
And, of course, if you happen to have Apple HW but prefer to run Windows/Linux on it, the legality of running OS X in a VM there is a bit greyer matter. You are running OS X on Apple HW in that case.