Adding machine type code.
Properly setting machine type to  virtual for known virtual machines.
Removing leftover pass statement.
Ignoring dpkg-preconfigure error as it seems to be harmless.
Adding more things from development branch.