Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.


Warning for game developers: PCGamingWiki staff members will only ever reach out to you using the official press@pcgamingwiki.com mail address.
Be aware of scammers claiming to be representatives or affiliates of PCGamingWiki who promise a PCGW page for a game key.

Difference between revisions of "Virtualization"

From PCGamingWiki, the wiki about fixing PC games
 
(79 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{stub}}
+
{{Category:System abstraction}}
 +
{{Tocbox}}
 +
{{disambig|a general overview of virtualization|software emulating a gaming console|[[Emulation]]}}
 +
 
 +
'''''Virtualization''''' refers to various methods used to creating a virtual version of something at the same abstraction level. This is not to be confused with ''[[Emulation|emulation]]'', which is the replication of the same or different hardware via software (e.g. a NES emulator running on a PC) and has significant performance penalties due to conversion through an interpreter compared to virtualization methods.
  
 
'''Key points'''
 
'''Key points'''
{{++}} Allows the use of older software which which may have problems running natively on newer OSes.  
+
{{++}} Allows the use of older software which may have problems running natively on newer OSes or hardware.
{{++}} Ability to use 16-bit software even if the host machine is 64-bit without native support for 16-bit software.
+
{{ii}} 3D acceleration support varies drastically between virtualization type as well as software.
{{++}} Removes the need to install another OS to the host system and having to separately boot into it.  
+
{{ii}} Virtualization will generally run slower than software running natively unless the virtualization layer includes or enables optimizations that the software benefits from.
{{++}} State save or snapshot features allows saving specific moment(s), being useful for testing old games and software.
+
'''General information'''
{{ii}} Running a virtualization of another OS inside an existing OS is more taxing to a computer than running the OS natively. The gaming performance is typically between 25%-70% depending on hypervisor and game code compatibility.
+
:{{W|Virtualization}}
{{ii}} 3D acceleration support varies dramatically from virtualization software ('''hypervisor''').
+
{{mm}} [https://www.youtube.com/watch?v=O5gkmDV7XrM quickhakker - Program Tutorial: Running 16 bit programs on 64 bit operating systems - YouTube]
 +
 
 +
==Hardware virtualization==
 +
{{++}} Removes the need to install another OS to the host system and having to separately boot into it.
 +
{{++}} Snapshot or save state features allow saving a virtual machines current state, which can be useful for troubleshooting or testing.
 +
 
 +
'''Virtualization''' is commonly used to refers to {{W|Hardware virtualization|'''''hardware virtualization'''''}}, the act of creating and running an operating system within a ''virtual machine'' (''VM'') alongside code belong to other virtual machine(s) running on the same architecture and hardware (without converting; no emulation). As few elements as possible are emulated, therefore most of the expected CPU performance can be obtained with a variable overhead depending on the system. The underlying machine used for the virtualization is referred to as the ''host'', and the software that creates these virtual machines is called the ''hypervisor'' or ''virtual machine monitor'' (''VMM''), while the virtual machines themselves are often referred to as ''guests''.
 +
 
 +
Modern computers have additional hardware capabilities to assist in virtualization called ''Intel VT-x'' and ''AMD-V'', commonly just referred to as ''hardware-assisted virtualization''. While older hypervisors allowed hardware virtualization even without these features enabled, they were often recommended or required for virtual machines to achieve their most optimal performance. As of 2022 most of the prominent hypervisors requires hardware-assisted virtualization and will not work without it.<ref>{{Refcheck|user=Aemony|date=2022-09-22|comment=Both Hyper-V and VMware Workstation Pro on a Windows 11 install requires Intel VT-x to even work, and I came across a website that mentioned VirtualBox does the same as of a few years ago.}}</ref>
  
 +
A common use case for hardware virtualization is to circumvent compatibility issues with older software by running the software inside a suitable VM. One example is 16-bit program compatibility as support for these is not included in 64-bit variants of Windows. However since modern CPUs still support 16-bit execution through the {{W|Virtual_8086_mode#64-bit_and_VMX_support|virtual 8086 mode}} when running in {{W|X86-64#Legacy_mode|legacy mode}}, hardware virtualization allows 16-bit execution through a suitable guest VM with a 16-bit or 32-bit operating system installed.
  
'''General information'''
+
Hardware virtualization also has plenty of other use cases such as for e.g. running an isolated environment (sandbox), running older software, or a different OS without dual booting the host machine. Modern versions of Hyper-V also features the ability to [https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/boot-to-vhd--native-boot--add-a-virtual-hard-disk-to-the-boot-menu natively boot] some OSes from virtual hard disks, giving the user the benefits of dual booting different OSes without having to manage separate boot launchers or hard drive partitions.
{{mm}} [[wikipedia:Virtual machine|Virtual machine at Wikipedia]]
+
 
{{mm}} [[wikipedia:Emulator|Emulator at Wikipedia]]
+
When running an older version of an OS in a VM, the same security risks apply when installing & running that OS natively, so there will always be a possibility of viruses and malware that can take advantage of the guest OSes vulnerabilities; even of the VM software itself. If the software in question does not need access to internet, it is usually safer to disable all connections from the VM to the host computer. When using shared folders, it is safer to mark the folder as read-only if moving files to the host is not required. Taking these security measures into consideration can make running a guest OS considerably more secure.
<br>
 
'''Emulation''' is the replication of the same or different hardware via software (e.g. a NES emulator running on PC or Android). Emulating a system within another system has significant performance penalties due to conversion through abstraction. PC, Android, PlayStation, Atari, and NES systems all have different instruction sets, with significantly different hardware. Therefore running a game on another system requires using emulation. For a list of emulators and more information see [[Emulation]].
 
  
 +
==Application virtualization==
 +
'''''{{W|Application virtualization}}''''' is a form of software technology where a virtualization layer is used to isolate applications files and/or registry keys from the host machine, allowing the ability to make programs completely portable between different computers or system configurations. Instead of virtualizing the entire operating system, as with a VM through hardware virtualization, only the files and/or registry keys of the application are virtualized. This method allows for a wide range of isolation options, such as the application being able to merge with the existing system, select parts of it, or to be ''completely'' isolated from the rest of the system. Necessary prerequisites or runtimes can also be bundled within the virtual application bundle itself instead of having to be natively installed on the host machine.
  
'''Virtualization''' is running an operating system directly on the same architecture and hardware (without converting; no emulation) alongside other-OS-related code. Only a few elements are emulated, therefore most of the expected CPU performance can be obtained with some overhead.
+
This type of technology is most often used for enterprise purposes where a third-party application suite comprising of a management tool, distribution channel, and client agent is used to create, distribute, and run virtualized applications. The closely related consumer option is the so called ''{{W|Portable application creators}}'' which allows users to create portable applications which does not require an installation to be run on a system. These ''portable applications'' are most often ''agentless'' in that they do not rely on a pre-installed client agent on a computer to run.
  
Modern personal computers have the hardware functionality for virtualization, such as '''Intel VT-x''' or '''AMD-V'''. If  using virtualization, the relevant option needs to be enabled from the BIOS. On a host machine, Virtual Machines ('''VM''') can be created. An OS running inside a virtual machine is called the '''guest'''.
+
Examples of some common solutions:
  
 +
{| class="wikitable" style="text-align: center"
 +
! style="width: 150px;" | Software
 +
! style="width: 130px;" | Primary Audience
 +
! style="width: 80px;"  | Platforms
 +
! style="width: 80px;"  | Homepage
 +
|-
 +
| ''{{W|Citrix Virtual Apps}}''
 +
| Enterprise
 +
| {{OS|Windows}}
 +
| [https://www.citrix.com/ Link]
 +
|-
 +
| ''{{W|Cameyo}}''
 +
| Enterprise
 +
| {{OS|Windows}}
 +
| [https://cameyo.com/ Link]
 +
|-
 +
| ''{{W|Microsoft App-V}}''
 +
| Enterprise
 +
| {{OS|Windows}}
 +
| [https://learn.microsoft.com/en-us/windows/application-management/app-v/appv-for-windows Link]
 +
|-
 +
| ''{{W|PortableApps.com}}''
 +
| Consumer
 +
| {{OS|Windows}}
 +
| [https://portableapps.com/ Link]
 +
|-
 +
| ''{{W|Sandboxie Plus}}''
 +
| Consumer
 +
| {{OS|Windows}}
 +
| [https://sandboxie-plus.com/ Link]
 +
|-
 +
| ''{{W|Turbo (software)|Turbo Studio}}''
 +
| Enterprise
 +
| {{OS|Windows}}
 +
| [https://turbo.net/ Link]
 +
|-
 +
| ''{{W|VMware|VMware ThinApp}}''
 +
| Enterprise
 +
| {{OS|Windows}}
 +
| [https://www.vmware.com/products/thinapp.html Link]
 +
|-
 +
|}
  
Problems with older software can circumvented by running old software inside suitable VM. One example is 16-bit program compatibility, as Microsoft removed support for 16-bit programs in 64-bit variants of Windows. However, 32-bit variants of Windows still support 16-bit applications natively. Since modern CPUs still support 16-bit applications, 16-bit programs can be run inside virtual machines.
+
==Compatibility/translation layers==
 +
{{W|Compatibility layer|'''''Compatibility layers'''''}} are another common but less known type of virtualization which allows applications of a legacy or foreign system to run in environments it was never intended for. The layer intercepts system calls made by the application during runtime and manipulates or translates them into a more appropriate equivalent if necessary. This can range from just fixing up a few individual system calls that was changed in later versions of the OS than the application was developed for, to translating ''all'' system calls to alternate APIs allowing the application to run on completely foreign systems. If a direct one-to-one translation is not possible between the original and replacement APIs, the compatibility layer also emulates the behaviors of the original API as much as possible through multiple calls to the replacement API.
  
Virtualization also has plenty of other usage cases such as for e.g. running an isolated environment (sandbox), running older software, or a different OS without dual booting the host machine.  
+
The performance impact of a compatibility layer comes down to the extent of translation required, whether direct one-to-one translation is possible or if more complex translation is needed, as well as other factors involved such as the accuracy and performance of the translation and use of any custom behavior to optimize and fix unnecessary performance issues and overhead caused by unoptimized calls made by the application. As a result applications running through a compatibility layers is often capable of reaching close to native performance, and in some cases even outperform native systems due to the aforementioned optimizations made by the compatibility layer.
  
When running an older version of an OS in a VM, the same security risks apply when installing & running that OS natively, so there will always be a possibility of viruses and malware that can take advantage of the guest OSes vulnerabilities; even of the VM software itself. If the software in question does not need access to internet, it is usually safer to disable all connections from the VM to the host computer. When using shared folders, it is safer to mark the folder as read-only if you do not need to move files to the host. Taking these security measures into consideration can make running a guest OS considerably more secure.
+
Some common compatibility layers are:
 +
* [[Wine]] (originally an acronym for "Wine Is Not an Emulator") is a compatibility layer that translates and allows running Windows applications on Linux, macOS, and other Unix-like systems.
 +
* [[Glossary:Display wrapper|Display wrappers]] such as [[DgVoodoo_2|dgVoodoo2]] are a type of compatibility layer that translates calls made in one graphics API to another API.
 +
* 32-bit versions of Windows included '''WOW''' ('''W'''indows '''o'''n '''W'''indows) which provided support for running legacy 16-bit programs written for Windows 3.x or earlier. This compatibility layer was never included in 64-bit versions of Windows despite the underlying component {{abbr|NTVDM|NT Virtual DOS Machine}} including full emulation capabilities of 16-bit CPU instructions.<ref>{{Refurl|url=https://en.wikipedia.org/wiki/Virtual_DOS_machine#Windows_NTVDM|title=Wikipedia - Virtual DOS machine - Windows NTVDM|date=2022-09-17|snippet=Since virtual 8086 mode is not available on non-x86-based processors (more specifically, MIPS, DEC Alpha, and PowerPC) NTVDM was instead implemented as a full emulator in these versions of NT, using code licensed from Insignia's SoftPC. Up to Windows NT 3.51, only 80286 emulation was available. With Windows NT 4.0, 486 emulation was added.}}</ref><ref>{{Refurl|url=https://github.com/leecher1337/ntvdmx64|title=GitHub - leecher1337/ntvdmx64|date=2022-09-17|snippet=NTVDMx64 is a port of the well-known Windows NTVDM, which is used by windows to run DOS-Applications, to 64bit Windows, so that you can run your DOS-Applications on 64bit Windows too. This is a proof-of-concept that it is possible to run the NTVDM on 64bit Windows}}</ref>
 +
** [[#WineVDM on 64-bit Windows|WineVDM on 64-bit Windows]] is an alternate compatibility layer and emulator which allows 16-bit programs to be executed on Windows 64-bit.
 +
* 64-bit versions of Windows includes '''WOW64''' ('''W'''indows 32-bit '''o'''n '''W'''indows '''64'''-bit) which provides support for running 32-bit applications.
 +
* [[Windows_Compatibility_Mode|Windows Compatibility Mode]] is an underlying compatibility engine within Windows that uses compatibility shims to apply fixes and changes for applications that might otherwise not function properly.
 +
* [https://github.com/microsoft/D3D9On12 D3D9On12] is a mapping layer in Windows 10 and 11 that maps calls made by the D3D9 API to the D3D9 display driver interface (the role D3D9On12 fills in this case) over to their respective D3D12 API equivalent. It is automatically used by Windows for display drivers that lack native D3D9 drivers and allows D3D9 applications to still be used provided the driver supports D3D12. It differs from more typical display wrappers as the original D3D9 API and runtime is still present and doing its thing &mdash; D3D9On12 essentially sits "below" those at the driver level. This mapping layer also handles earlier D3D versions, including DirectDraw.<ref>{{Refurl|url=https://discord.gg/directx|title=DirectX Discord Server - #dx9-dx11-developers - Jesse Natalie on August 18, 2022|date=2022-08-18|snippet=9on12 handles all D3D versions before 10 including DDraw}}</ref>
  
 +
==Virtualization and emulation software==
 +
These are some notable hardware virtualization and emulation software.
  
==Virtualization-PC Emulation software for gaming==
 
 
{| class="wikitable" style="text-align: center"
 
{| class="wikitable" style="text-align: center"
! style="width:160px;" | Software
+
! style="width:140px;" | Software
! style="width:160px;" | Type
+
! style="width:140px;" | Type
 
! style="width:120px;" | Platforms
 
! style="width:120px;" | Platforms
 
! style="width: 50px;" | Wikipedia
 
! style="width: 50px;" | Wikipedia
 
! style="width: 50px;" | Homepage
 
! style="width: 50px;" | Homepage
! style="width:100px;" | Cost
+
! style="width:120px;" | Cost
 +
! style="width:180px;" | Comment
 +
|-
 +
| ''[[#DOSBox|DOSBox]]''
 +
| Emulation
 +
| {{OS|Windows}} {{OS|OS X}} {{OS|Linux}}
 +
| {{W|DOSBox| }}
 +
| [https://www.dosbox.com/ Link]
 +
| Free
 +
|
 
|-
 
|-
| ''VMware''
+
| ''Hyper-V''
 
| Virtualization  
 
| Virtualization  
| {{OS|Windows}} {{OS|OS X}} {{OS|Linux}}
+
| {{OS|Windows}}
| [[wikipedia:VMware| ]]
+
| {{W|Hyper-V| }}
| [http://www.vmware.com/ Link]
+
| [https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/ Link]
| Basic free<br/>Premium costs
+
| Included in Windows 10/11
 +
| Not suited for 3D games.
 +
|-
 +
| ''[[#Parallels|Parallels]]''
 +
| Virtualization
 +
| {{OS|OS X}}
 +
| {{W|Parallels Desktop for Mac| }}
 +
| [https://www.parallels.com/ Link]
 +
| Costs
 +
|
 
|-
 
|-
| ''DOSBox''
+
| ''[[#PCem|PCem]]''
| Emulation
+
| Emulation
| {{OS|Windows}} {{OS|OS X}} {{OS|Linux}}
+
| {{OS|Windows}}{{OS|Linux}}
| [[wikipedia:DOSBox| ]]
+
| {{W|PCem| }}
| [http://www.dosbox.com/ Link]
+
| [https://pcem-emulator.co.uk/index.html Link]
 
| Free
 
| Free
 +
|
 
|-
 
|-
| ''Pcem''
+
| ''[[#86box|86box]]''
| Emulation
+
| Emulation
| {{OS|Windows}}{{OS|Linux}}
+
| {{OS|Windows}}{{OS|Linux}}{{OS|OS X}}
| [[wikipedia:PCem| ]]
+
| {{W|PCem| }}
| [http://pcem-emulator.co.uk/index.html Link]
+
| [https://86box.net/ Link]
 
| Free
 
| Free
 +
| Fork of Pcem
 
|-
 
|-
| ''QEMU''
+
| ''[[#QEMU|QEMU]]''
| Virtualization or Emulation
+
| Virtualization or Emulation
 
| {{OS|Windows}} {{OS|OS X}}  {{OS|Linux}}
 
| {{OS|Windows}} {{OS|OS X}}  {{OS|Linux}}
| [[wikipedia:QEMU| ]]
+
| {{W|QEMU| }}
| [http://wiki.qemu.org/Main_Page Link]
+
| [https://wiki.qemu.org/Main_Page Link]
 
| Free
 
| Free
 +
|
 
|-
 
|-
| ''VirtualBox''
+
| ''[[#WineVDM on 64-bit Windows|WineVDM on 64-bit Windows]]''
 +
| Compatibility layer<br>Emulation
 +
| {{OS|Windows}}
 +
|
 +
| [https://github.com/otya128/winevdm/ Link]
 +
| Free
 +
| OTVDM (WineVDM)
 +
|-
 +
| ''[[#VirtualBox|VirtualBox]]''
 
| Virtualization  
 
| Virtualization  
 
| {{OS|Windows}} {{OS|OS X}} {{OS|Linux}}
 
| {{OS|Windows}} {{OS|OS X}} {{OS|Linux}}
| [[wikipedia:VirtualBox| ]]
+
| {{W|VirtualBox| }}
 
| [https://www.virtualbox.org/ Link]
 
| [https://www.virtualbox.org/ Link]
 
| Free
 
| Free
 +
|
 
|-
 
|-
| ''Parallels''
+
| ''[[#VMware|VMware]]''
 
| Virtualization  
 
| Virtualization  
| {{OS|OS X}}
+
| {{OS|Windows}} {{OS|OS X}} {{OS|Linux}}
| [[wikipedia:Parallels Desktop for Mac| ]]
+
| {{W|VMware| }}
| [http://www.parallels.com/ Link]
+
| [https://www.vmware.com/ Link]
| Costs
+
| Basic free<br/>Premium costs
|-
+
|  
|}
 
 
 
 
 
===VMware===
 
{{++}} Superior 3D acceleration support in Windows XP and later OSes.
 
{{++}} For windows users (hosts), VMware is generally the best option for gaming
 
{{ii}} VMware has stopped developing its virtual 3D drivers for Windows XP and Vista. The final drivers for Windows XP runs some DirectX 6-7-8 games very slowly. For lightweight games, Windows XP has enough performance, and for more demanding games, using Vista or 7 guests are strongly recommended.
 
{{ii}} Relative performance table for VMware Workstation 15 ( on Ryzen 5 1600 + GTX 970), although this testing is not perfect, (old games and benchmarks are mostly bottlenecked by the CPU), it shows relative OS and DirectX differences on performance. It can give an idea about how much relative performance you could get. VMware still is updating their 3D drivers for Windows 7 and newer guests. On newer VMware versions, these numbers may be different.
 
{| class="wikitable" style="text-align: center"
 
! style="width:300px;" | Expected Performance Approximation
 
! style="width:180px;" | Windows 10 (x64) (Native)
 
! style="width: 140px;" | Windows 7 (x64, SP1) Virtualization
 
! style="width: 140px;" | Windows Vista (x32, SP2) Virtualization
 
! style="width:140px;" | Windows XP (SP3) Virtualization
 
|-
 
| | ''DirectX 7 - 3Dmark 2000 ''
 
| '''%100'''-----''64737''
 
| '''%27''' -----''17656''
 
| '''%28'''-----''18639''
 
| '''%1.4'''-----''932''
 
|-
 
| ''DirectX 8 - 3Dmark 2001''
 
| '''%100'''-----''53652''
 
| '''%95'''-----''51470''
 
| '''%88'''-----''47635''
 
| '''%14'''-----''7948''
 
|-
 
|''DirectX 9c - 3Dmark 2006''
 
| '''%100'''-----''30616''
 
| '''%81'''-----''24851''
 
| N/A
 
| '''%35'''-----''10749''
 
 
|-
 
|-
 
|}
 
|}
{{--}} Only supports 60Hz refresh-rate.
 
{{--}} Only supports stereo sound output.
 
{{--}} Closed-source, the free version is very basic.
 
 
  
 
===DOSBox===
 
===DOSBox===
 
{{++}} Suitable for DOS era gaming (pre-1998).  
 
{{++}} Suitable for DOS era gaming (pre-1998).  
{{ii}} Comes with DOS inside.
+
{{ii}} DOSBox emulates DOS.
 
{{ii}} For more information see [[DOSBox]].
 
{{ii}} For more information see [[DOSBox]].
 
  
 
===PCem===
 
===PCem===
{{++}} Suitable for windows 95-98 gaming.
+
{{++}} Suitable for Windows 95/98 gaming, supports 3D hardware acceleration (up to 3dfx Voodoo 3 emulation)
{{++}} 3d acceleration support on windows 9x (3dfx vodoo 3 3000 emulation)
+
{{ii}} All hardware emulated on CPU. ''Pentium 2 200-250 MHz - voodoo 1 '' equivalent performance on ''Ryzen 3xxx/Intel 10th Gen'' CPUs.
{{ii}} All emulation is done on cpu. Pentium 3 350-500 mhz + tnt2 equvalent performance is possible on ryzen 3xxx- intel 10xxx cpu's.
+
{{--}} Due to hard drive emulated 90s actual hardware's speed, io speed is very low.
{{--}} The developer quits from project.
+
{{--}} High resolusions and refresh rates need tweaking in vm, mouse movement is very sluggish on low refresh rates
{{--}} Only support for 4:3 resolutions
+
{{--}} No state save feature
{{--}} Mouse movement is also emulated through ps/2, therefore little sluggish
 
  
 +
===86box===
 +
{{++}} Suitable for Windows 95/98 gaming, supports 3D hardware acceleration (up to 3dfx Voodoo 3 emulation)
 +
{{++}} Hard drive emulation with ramdisk speed option provides much better usage.
 +
{{ii}} Fork of pcem that aims to achieve complete emulation without performance shortcuts, therefore, little slower. it has more organized ui and more device options.
 +
{{ii}} All hardware emulated on CPU. ''Pentium 2 200-250 MHz - voodoo 1 '' equivalent performance on ''Ryzen 3xxx/Intel 10th Gen'' CPUs.
 +
{{--}} High resolusions and refresh rates need tweaking in vm, mouse movement is very sluggish on low refresh rates
 +
{{--}} No state save feature
  
 
===QEMU===
 
===QEMU===
{{++}} On Linux, using QEMU + KVM + GPU-passthrough gives about %90-95 native performance (gaming on windows guest and using Linux for general purpose is possible)
+
{{++}} On Linux, using QEMU virtualisation + KVM + GPU-passthrough can achieve almost native performance (80-90%).
{{++}} Greater compatibility with programs due to emulation.
+
{{--}} On Linux, GPU-passthrough requires multiple GPUs.
{{ii}}High performance penalties when emulating.
+
{{ii}} Good compatibility with programs when using emulation, though carries a high performance penalty.
  
 +
===WineVDM on 64-bit Windows===
 +
{{ii}} ''WineVDM on 64-bit Windows'' is an altered version of [[Wine]]'s 16-bit compatibility layer called WineVDM coupled with an 80386 CPU emulator that allows running 16-bit Windows apps (Windows 1.x, 2.x, 3.0, 3.1, etc.) transparently on 64-bit Windows.
 +
{{++}} The compatibility layer allows 16-bit apps to interact transparently with the host 64-bit Windows operating system and filesystem.
 +
{{++}} Minimal to set up and use compared to using [[#Hardware virtualization|hardware virtualization]].
  
 
===VirtualBox===
 
===VirtualBox===
{{++}} Mostly open-source with non-open source material is free for personal use.  
+
{{++}} Suitable for Windows 98/ME gaming with modern fast cpus(ryzen 3xxx-intel 12xxx or more) with 2 patches, 1- [https://github.com/JHRobotics/patcher9x/releases/tag/v0.8.50 speed and instruction fix] 2 - [https://github.com/JHRobotics/softgpu/releases cpu emulated 3d accelerated gpu], also [https://archive.org/details/PATCHMEM rloew 4gb ram patch] strongly suggested for more than 512 mb ram, with all these fixes, tnt2 equvalent GPU performance possible.
{{--}} Due to incomplete 3D hardware acceleration (and instruction set support issues on AMD), it is not suitable for 3D gaming, however DOS and software-rendered 3D games can run.
+
{{++}} Have state save (snapshot) feature
 
+
{{--}} Due to incomplete 3D hardware acceleration (and instruction set support issues on AMD), it is not suitable for 3D gaming on xp or newer systems, however DOS-98-ME and software-rendered 3D games can run.
==Application virtualization software==
 
{{ii}} In-depth technical knowledge is required for proper use and configuration.
 
{{ii}} Public help topics, knowledge, and information are sparse in many cases.
 
{{++}} Applications can be sandboxed and isolated completely from the host operating system.
 
{{--}} Virtual child processes can be configured to run normally, but may require additional configuration.
 
{| class="wikitable" style="text-align: center"
 
! style="width:200px;" | Software
 
! style="width:120px;" | Platforms
 
! style="width: 50px;" | Wikipedia
 
! style="width: 50px;" | Homepage
 
! style="width:100px;" | Cost
 
|-
 
| | ''Cameyo Client''
 
| {{OS|Windows}}
 
| [[wikipedia:Cameyo| ]]
 
| [https://cameyo.com/ Link]
 
| Free & Premium licenses available
 
|-
 
| ''Turbo Studio''
 
| {{OS|Windows}}
 
| [[wikipedia:Turbo_(software)| ]]
 
| [https://turbo.net/ Link]
 
| Subscription-based, account required
 
|-
 
|''VMware ThinApp''
 
| {{OS|Windows}}
 
| [[wikipedia:VMware| ]]
 
| [https://www.vmware.com/products/thinapp.html Link]
 
| Premium license, account required
 
|-
 
|}
 
  
  
 +
===VMware===
 +
{{++}} For Windows hosts, VMware is generally the best option for GPU intensive games, 3d hardware acceleration support for Windows XP and later is typically superior than alternative software.
 +
{{--}} Only supports 60Hz refresh-rate and stereo sound output.{{cn}}
 +
{{--}} The free version, VMware Workstation Player, lacks a snapshot feature.
 +
{{mm}} No 3D acceleration on Windows 95/98/ME, and the virtual 3D drivers for XP and Vista is no longer being developed. The final drivers for Windows XP runs some DirectX 6-8 games slow to the point of being unplayable. For lightweight games Windows XP has enough performance, but for more demanding games using Vista or 7 guests are strongly recommended.
  
A lesser-known form of software distribution is called '''application virtualization'''. Programs like [https://cameyo.com/ Cameyo client], [https://turbo.net/ Turbo Studio], and [https://www.vmware.com/products/thinapp.html VMware ThinApp] can be used to isolate applications files and/or registry keys from the host machine including the ability to make programs completely portable between different computers or system configurations. Instead virtualizing the entire operating system, as with a typical VM, only an application's files and/or registry keys virtualize. This method typically follows a container approach to isolation. For example; an application that requires the Microsoft .NET, Visual Studio C++ runtime or other middleware components can have the runtime either bundled within the application itself or added as an SVM ‘‘(in the case of Turbo Studio)'' instead of having to be natively installed on the host machine. Isolation options include being able to merge with the entire existing system, select parts of it, or to be ''completely'' isolated and much more depending on your knowledge of the software. The software required to make virtualized applications can be expensive though due to the obscurity and specialty of the technology. Most components of virtualization will require an advanced-level of knowledge of the Windows operating system in order to use and operate virtualization software successfully.
+
{{References}}
 
 
Another type of virtualization is called a '''compatibility layer''', running a Windows application on Linux through [[Wine]] can offer better compatibility for older programs than newer versions of Windows itself. However, '''W'''ine '''I'''s '''N'''ot an '''E'''mulator (W.I.N.E) and is classified as a compatibility layer (a.k.a translation layer).
 
 
 
 
 
 
 
 
 
==External links==
 
{{mm}} [https://www.youtube.com/watch?v=O5gkmDV7XrM quickhakker - Program Tutorial: Running 16 bit programs on 64 bit operating systems - YouTube]
 
  
[[Category:Guide]]
+
[[Category:System abstraction]]
[[Category:Troubleshooting]]
 

Latest revision as of 10:21, 17 October 2023

This page is for a general overview of virtualization. For software emulating a gaming console, see Emulation.

Virtualization refers to various methods used to creating a virtual version of something at the same abstraction level. This is not to be confused with emulation, which is the replication of the same or different hardware via software (e.g. a NES emulator running on a PC) and has significant performance penalties due to conversion through an interpreter compared to virtualization methods.

Key points

Allows the use of older software which may have problems running natively on newer OSes or hardware.
3D acceleration support varies drastically between virtualization type as well as software.
Virtualization will generally run slower than software running natively unless the virtualization layer includes or enables optimizations that the software benefits from.

General information

Virtualization
quickhakker - Program Tutorial: Running 16 bit programs on 64 bit operating systems - YouTube

Hardware virtualization

Removes the need to install another OS to the host system and having to separately boot into it.
Snapshot or save state features allow saving a virtual machines current state, which can be useful for troubleshooting or testing.

Virtualization is commonly used to refers to hardware virtualization, the act of creating and running an operating system within a virtual machine (VM) alongside code belong to other virtual machine(s) running on the same architecture and hardware (without converting; no emulation). As few elements as possible are emulated, therefore most of the expected CPU performance can be obtained with a variable overhead depending on the system. The underlying machine used for the virtualization is referred to as the host, and the software that creates these virtual machines is called the hypervisor or virtual machine monitor (VMM), while the virtual machines themselves are often referred to as guests.

Modern computers have additional hardware capabilities to assist in virtualization called Intel VT-x and AMD-V, commonly just referred to as hardware-assisted virtualization. While older hypervisors allowed hardware virtualization even without these features enabled, they were often recommended or required for virtual machines to achieve their most optimal performance. As of 2022 most of the prominent hypervisors requires hardware-assisted virtualization and will not work without it.[1]

A common use case for hardware virtualization is to circumvent compatibility issues with older software by running the software inside a suitable VM. One example is 16-bit program compatibility as support for these is not included in 64-bit variants of Windows. However since modern CPUs still support 16-bit execution through the virtual 8086 mode when running in legacy mode, hardware virtualization allows 16-bit execution through a suitable guest VM with a 16-bit or 32-bit operating system installed.

Hardware virtualization also has plenty of other use cases such as for e.g. running an isolated environment (sandbox), running older software, or a different OS without dual booting the host machine. Modern versions of Hyper-V also features the ability to natively boot some OSes from virtual hard disks, giving the user the benefits of dual booting different OSes without having to manage separate boot launchers or hard drive partitions.

When running an older version of an OS in a VM, the same security risks apply when installing & running that OS natively, so there will always be a possibility of viruses and malware that can take advantage of the guest OSes vulnerabilities; even of the VM software itself. If the software in question does not need access to internet, it is usually safer to disable all connections from the VM to the host computer. When using shared folders, it is safer to mark the folder as read-only if moving files to the host is not required. Taking these security measures into consideration can make running a guest OS considerably more secure.

Application virtualization

Application virtualization is a form of software technology where a virtualization layer is used to isolate applications files and/or registry keys from the host machine, allowing the ability to make programs completely portable between different computers or system configurations. Instead of virtualizing the entire operating system, as with a VM through hardware virtualization, only the files and/or registry keys of the application are virtualized. This method allows for a wide range of isolation options, such as the application being able to merge with the existing system, select parts of it, or to be completely isolated from the rest of the system. Necessary prerequisites or runtimes can also be bundled within the virtual application bundle itself instead of having to be natively installed on the host machine.

This type of technology is most often used for enterprise purposes where a third-party application suite comprising of a management tool, distribution channel, and client agent is used to create, distribute, and run virtualized applications. The closely related consumer option is the so called Portable application creators which allows users to create portable applications which does not require an installation to be run on a system. These portable applications are most often agentless in that they do not rely on a pre-installed client agent on a computer to run.

Examples of some common solutions:

Software Primary Audience Platforms Homepage
Citrix Virtual Apps Enterprise
Windows
Link
Cameyo Enterprise
Windows
Link
Microsoft App-V Enterprise
Windows
Link
PortableApps.com Consumer
Windows
Link
Sandboxie Plus Consumer
Windows
Link
Turbo Studio Enterprise
Windows
Link
VMware ThinApp Enterprise
Windows
Link

Compatibility/translation layers

Compatibility layers are another common but less known type of virtualization which allows applications of a legacy or foreign system to run in environments it was never intended for. The layer intercepts system calls made by the application during runtime and manipulates or translates them into a more appropriate equivalent if necessary. This can range from just fixing up a few individual system calls that was changed in later versions of the OS than the application was developed for, to translating all system calls to alternate APIs allowing the application to run on completely foreign systems. If a direct one-to-one translation is not possible between the original and replacement APIs, the compatibility layer also emulates the behaviors of the original API as much as possible through multiple calls to the replacement API.

The performance impact of a compatibility layer comes down to the extent of translation required, whether direct one-to-one translation is possible or if more complex translation is needed, as well as other factors involved such as the accuracy and performance of the translation and use of any custom behavior to optimize and fix unnecessary performance issues and overhead caused by unoptimized calls made by the application. As a result applications running through a compatibility layers is often capable of reaching close to native performance, and in some cases even outperform native systems due to the aforementioned optimizations made by the compatibility layer.

Some common compatibility layers are:

  • Wine (originally an acronym for "Wine Is Not an Emulator") is a compatibility layer that translates and allows running Windows applications on Linux, macOS, and other Unix-like systems.
  • Display wrappers such as dgVoodoo2 are a type of compatibility layer that translates calls made in one graphics API to another API.
  • 32-bit versions of Windows included WOW (Windows on Windows) which provided support for running legacy 16-bit programs written for Windows 3.x or earlier. This compatibility layer was never included in 64-bit versions of Windows despite the underlying component NTVDM including full emulation capabilities of 16-bit CPU instructions.[2][3]
    • WineVDM on 64-bit Windows is an alternate compatibility layer and emulator which allows 16-bit programs to be executed on Windows 64-bit.
  • 64-bit versions of Windows includes WOW64 (Windows 32-bit on Windows 64-bit) which provides support for running 32-bit applications.
  • Windows Compatibility Mode is an underlying compatibility engine within Windows that uses compatibility shims to apply fixes and changes for applications that might otherwise not function properly.
  • D3D9On12 is a mapping layer in Windows 10 and 11 that maps calls made by the D3D9 API to the D3D9 display driver interface (the role D3D9On12 fills in this case) over to their respective D3D12 API equivalent. It is automatically used by Windows for display drivers that lack native D3D9 drivers and allows D3D9 applications to still be used provided the driver supports D3D12. It differs from more typical display wrappers as the original D3D9 API and runtime is still present and doing its thing — D3D9On12 essentially sits "below" those at the driver level. This mapping layer also handles earlier D3D versions, including DirectDraw.[4]

Virtualization and emulation software

These are some notable hardware virtualization and emulation software.

Software Type Platforms Wikipedia Homepage Cost Comment
DOSBox Emulation
Windows
macOS (OS X)
Linux
Link Free
Hyper-V Virtualization
Windows
Link Included in Windows 10/11 Not suited for 3D games.
Parallels Virtualization
macOS (OS X)
Link Costs
PCem Emulation
Windows
Linux
Link Free
86box Emulation
Windows
Linux
macOS (OS X)
Link Free Fork of Pcem
QEMU Virtualization or Emulation
Windows
macOS (OS X)
Linux
Link Free
WineVDM on 64-bit Windows Compatibility layer
Emulation
Windows
Link Free OTVDM (WineVDM)
VirtualBox Virtualization
Windows
macOS (OS X)
Linux
Link Free
VMware Virtualization
Windows
macOS (OS X)
Linux
Link Basic free
Premium costs

DOSBox

Suitable for DOS era gaming (pre-1998).
DOSBox emulates DOS.
For more information see DOSBox.

PCem

Suitable for Windows 95/98 gaming, supports 3D hardware acceleration (up to 3dfx Voodoo 3 emulation)
All hardware emulated on CPU. Pentium 2 200-250 MHz - voodoo 1 equivalent performance on Ryzen 3xxx/Intel 10th Gen CPUs.
Due to hard drive emulated 90s actual hardware's speed, io speed is very low.
High resolusions and refresh rates need tweaking in vm, mouse movement is very sluggish on low refresh rates
No state save feature

86box

Suitable for Windows 95/98 gaming, supports 3D hardware acceleration (up to 3dfx Voodoo 3 emulation)
Hard drive emulation with ramdisk speed option provides much better usage.
Fork of pcem that aims to achieve complete emulation without performance shortcuts, therefore, little slower. it has more organized ui and more device options.
All hardware emulated on CPU. Pentium 2 200-250 MHz - voodoo 1 equivalent performance on Ryzen 3xxx/Intel 10th Gen CPUs.
High resolusions and refresh rates need tweaking in vm, mouse movement is very sluggish on low refresh rates
No state save feature

QEMU

On Linux, using QEMU virtualisation + KVM + GPU-passthrough can achieve almost native performance (80-90%).
On Linux, GPU-passthrough requires multiple GPUs.
Good compatibility with programs when using emulation, though carries a high performance penalty.

WineVDM on 64-bit Windows

WineVDM on 64-bit Windows is an altered version of Wine's 16-bit compatibility layer called WineVDM coupled with an 80386 CPU emulator that allows running 16-bit Windows apps (Windows 1.x, 2.x, 3.0, 3.1, etc.) transparently on 64-bit Windows.
The compatibility layer allows 16-bit apps to interact transparently with the host 64-bit Windows operating system and filesystem.
Minimal to set up and use compared to using hardware virtualization.

VirtualBox

Suitable for Windows 98/ME gaming with modern fast cpus(ryzen 3xxx-intel 12xxx or more) with 2 patches, 1- speed and instruction fix 2 - cpu emulated 3d accelerated gpu, also rloew 4gb ram patch strongly suggested for more than 512 mb ram, with all these fixes, tnt2 equvalent GPU performance possible.
Have state save (snapshot) feature
Due to incomplete 3D hardware acceleration (and instruction set support issues on AMD), it is not suitable for 3D gaming on xp or newer systems, however DOS-98-ME and software-rendered 3D games can run.


VMware

For Windows hosts, VMware is generally the best option for GPU intensive games, 3d hardware acceleration support for Windows XP and later is typically superior than alternative software.
Only supports 60Hz refresh-rate and stereo sound output.[citation needed]
The free version, VMware Workstation Player, lacks a snapshot feature.
No 3D acceleration on Windows 95/98/ME, and the virtual 3D drivers for XP and Vista is no longer being developed. The final drivers for Windows XP runs some DirectX 6-8 games slow to the point of being unplayable. For lightweight games Windows XP has enough performance, but for more demanding games using Vista or 7 guests are strongly recommended.


References

  1. Verified by User:Aemony on 2022-09-22
    Both Hyper-V and VMware Workstation Pro on a Windows 11 install requires Intel VT-x to even work, and I came across a website that mentioned VirtualBox does the same as of a few years ago.
  2. Wikipedia - Virtual DOS machine - Windows NTVDM - last accessed on 2022-09-17
    "Since virtual 8086 mode is not available on non-x86-based processors (more specifically, MIPS, DEC Alpha, and PowerPC) NTVDM was instead implemented as a full emulator in these versions of NT, using code licensed from Insignia's SoftPC. Up to Windows NT 3.51, only 80286 emulation was available. With Windows NT 4.0, 486 emulation was added."
  3. GitHub - leecher1337/ntvdmx64 - last accessed on 2022-09-17
    "NTVDMx64 is a port of the well-known Windows NTVDM, which is used by windows to run DOS-Applications, to 64bit Windows, so that you can run your DOS-Applications on 64bit Windows too. This is a proof-of-concept that it is possible to run the NTVDM on 64bit Windows"
  4. DirectX Discord Server - #dx9-dx11-developers - Jesse Natalie on August 18, 2022 - last accessed on 2022-08-18
    "9on12 handles all D3D versions before 10 including DDraw"