I finally successfully updated to 8.1 after >10 tries.
My case 0x40017 error everytime
windows 8 laptop, MSI GT70 with NVIDIA 680M and intel HD 4000, bigfoot killer GigE network
I tried all the suggestions I can find on the web, update graphic cards to the newest, remove the cards before install and without reboot, disable device, disable antivirus. No luck. Then I found the problem is with the driver of the bigfoot network card.
There is a new beta driver released for 8.1, I installed it, still not working.
In the last try, I removed all graphic card drivers (intel and nvidia) and the related software, before reboot, I start upgrade windows 8.1, as soon as the system finished downloading from windows store and in the 'gather info' stage, I quickly removed the entire software and driver for network ( I can't do this before upgrade cuz I need it to connect to windows store), and the rest of upgrade went through without any issue.
Hope this can help some of you guys.