it won't work. Vga to dvi is possible, because there are two kinds of dvi signal (DVI-I, which has both analog and digital output, and DVI-A which has only the analog output.). So if you hook in the vga->dvi cable, the signal will analog on the dvi-end of the cable. Since hdmi is digital, it doesn't support analog signals.
But there are signal converters that can convert digital to analog rgb, but they cost like 300$ at least. So you'll need a hdmi to dvi -cable and a signal converter