First, stop and uninstall the existing image:

guest-os 1 stop
guest-os 1 image uninstall

The IOS command to install an IOx image is:

guest-os 1 image install flash:/ir800-ioxvm.1.2.4.2-T.bin verify

Note: verify must be specified for the image to be installed properly.

Check if it worked:

sh plat bundle-install

Your should see:

Installation: Cisco-GOS,version-1.2.4.2

reload
sh plat guest-os

You should see:

Installation: Cisco-GOS,version-1.2.4.2

After you have installed IOx you will need to re-enable SSH. See What Are The Possible Root Causes of IOx Not Running?, Section: Cannot SSH into IOx.