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
 
(103 intermediate revisions by 8 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.
{{--}} Running a virtualization of another OS inside an existing OS is more taxing to your system than running the OS natively.
+
'''General information'''
{{--}} 3D acceleration has plenty of problems currently, so it's usefulness in gaming varies.  
+
:{{W|Virtualization}}
 +
{{mm}} [https://www.youtube.com/watch?v=O5gkmDV7XrM quickhakker - Program Tutorial: Running 16 bit programs on 64 bit operating systems - YouTube]
  
'''General information'''
+
==Hardware virtualization==
{{mm}} [[wikipedia:Virtual machine|Virtual machine at Wikipedia]]
+
{{++}} 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.
 +
 
 +
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.
 +
 
 +
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==
 +
'''''{{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 a means of running a guest operating system in host OS. Virtual Machines ('''VM''') can be created in a virtualization program, almost any OS can be installed in a VM. A system running the VM is usually called the '''host''' and the OS running the virtual machine is called the '''guest'''.
+
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.
  
Virtualization and emulation should not be confused with each other as they are both very different things. Emulation is the replication of how hardware operates either on a low level or a high level. Whereas virtualization is running an OS on existing hardware that can already run the operating system.
+
Examples of some common solutions:
  
Usage of a VM can be used to combat compatibility issues with newer operating systems, such as when the program might require some certain functionality that has been removed.  
+
{| class="wikitable" style="text-align: center"
One of the best examples of this is with 16-bit backwards-compatibility software support in Windows, which is not supported in the 64-bit variants of Windows. However, 32-bit variants of Windows still support 16-bit applications natively. Virtuisation also has plenty of other usage cases such as: running an isolated environment (sandbox), running older software or a different OS without dual-booting the host machine.  
+
! 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]
 +
|-
 +
|}
  
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).
+
==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.
  
With gaming, some problems may arise. When running a VM, or when using a hyper-visor, it will take more resources to run than when the OS is running natively. Emulating an entire machine including its hardware can be near impossible due to how costly it is compared to virtualization (for example; QEMU). 3D accelerated games may also have problems in VM’s as they aren't designed for gaming, so 3D acceleration support is generally poor.
+
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's usually safer to disable all connections from the VM to the host computer. When using shared folders, it's safer to marked the folder as read-only if you don't need to move files to the host. Taking all of these security measures into consideration can make running a guest OS a lot 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.
  
==Applications==
 
{{mm}} [https://www.virtualbox.org/wiki/VBox_vs_Others VBox vs Others - Oracle VM VirtualBox] - Page comparing VirtualBox, Parallels and VMware features.
 
 
{| class="wikitable" style="text-align: center"
 
{| class="wikitable" style="text-align: center"
! style="width:200px;" | Software
+
! style="width:140px;" | Software
 +
! 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|DOSBox]]''
 +
| Emulation
 
| {{OS|Windows}} {{OS|OS X}} {{OS|Linux}}
 
| {{OS|Windows}} {{OS|OS X}} {{OS|Linux}}
| [[wikipedia:DOSBox| ]]
+
| {{W|DOSBox| }}
| [http://www.dosbox.com/ Link]
+
| [https://www.dosbox.com/ Link]
 
| Free
 
| Free
 +
|
 +
|-
 +
| ''Hyper-V''
 +
| Virtualization
 +
| {{OS|Windows}}
 +
| {{W|Hyper-V| }}
 +
| [https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/about/ Link]
 +
| Included in Windows 10/11
 +
| Not suited for 3D games.
 
|-
 
|-
| ''VirtualBox''
+
| ''[[#Parallels|Parallels]]''
| {{OS|Windows}} {{OS|OS X}} {{OS|Linux}}
+
| Virtualization
| [[wikipedia:VirtualBox| ]]
+
| {{OS|OS X}}
| [https://www.virtualbox.org/ Link]
+
| {{W|Parallels Desktop for Mac| }}
 +
| [https://www.parallels.com/ Link]
 +
| Costs
 +
|
 +
|-
 +
| ''[[#PCem|PCem]]''
 +
| Emulation
 +
| {{OS|Windows}}{{OS|Linux}}
 +
| {{W|PCem| }}
 +
| [https://pcem-emulator.co.uk/index.html Link]
 
| Free
 
| Free
 +
|
 
|-
 
|-
| ''VMware''
+
| ''[[#86box|86box]]''
| {{OS|Windows}} {{OS|OS X}} {{OS|Linux}}
+
| Emulation
| [[wikipedia:VMware| ]]
+
| {{OS|Windows}}{{OS|Linux}}{{OS|OS X}}
| [http://www.vmware.com/ Link]
+
| {{W|PCem| }}
| Basic free<br/>Premium costs
+
| [https://86box.net/ Link]
 +
| Free
 +
| Fork of Pcem
 
|-
 
|-
| ''QEMU''
+
| ''[[#QEMU|QEMU]]''
| {{OS|Windows}} {{OS|OS X}} {{OS|Linux}}
+
| Virtualization or Emulation
| [[wikipedia:QEMU| ]]
+
| {{OS|Windows}} {{OS|OS X}}   {{OS|Linux}}
| [http://wiki.qemu.org/Main_Page Link]
+
| {{W|QEMU| }}
 +
| [https://wiki.qemu.org/Main_Page Link]
 
| Free
 
| Free
 +
|
 
|-
 
|-
| ''Windows Virtual PC''
+
| ''[[#WineVDM on 64-bit Windows|WineVDM on 64-bit Windows]]''
 +
| Compatibility layer<br>Emulation
 
| {{OS|Windows}}
 
| {{OS|Windows}}
| [[wikipedia:Windows Virtual PC#Windows Virtual PC| ]]
+
|  
| [http://www.microsoft.com/windows/virtual-pc/ Link]
+
| [https://github.com/otya128/winevdm/ Link]
 
| Free
 
| Free
 +
| OTVDM (WineVDM)
 
|-
 
|-
| ''Microsoft Virtual PC 2007''
+
| ''[[#VirtualBox|VirtualBox]]''
| {{OS|Windows}}
+
| Virtualization
| [[wikipedia:Windows Virtual PC#Microsoft Virtual PC| ]]
+
| {{OS|Windows}} {{OS|OS X}} {{OS|Linux}}
| [http://www.microsoft.com/windows/virtual-pc/ Link]
+
| {{W|VirtualBox| }}
 +
| [https://www.virtualbox.org/ Link]
 
| Free
 
| Free
 +
|
 
|-
 
|-
| ''Parallels''
+
| ''[[#VMware|VMware]]''
| {{OS|OS X}}
+
| Virtualization
| [[wikipedia:Parallels Desktop for Mac| ]]
+
| {{OS|Windows}} {{OS|OS X}} {{OS|Linux}}
| [http://www.parallels.com/ Link]
+
| {{W|VMware| }}
| Costs
+
| [https://www.vmware.com/ Link]
 +
| Basic free<br/>Premium costs
 +
|
 
|-
 
|-
 
|}
 
|}
  
 
===DOSBox===
 
===DOSBox===
 +
{{++}} Suitable for DOS era gaming (pre-1998).
 +
{{ii}} DOSBox emulates DOS.
 
{{ii}} For more information see [[DOSBox]].
 
{{ii}} For more information see [[DOSBox]].
{{ii}} It's possible to install early Windows versions with DOSBox (3.1, 95), however it's much more suitable for DOS gaming thus it's recommended to use other applications unless you have good reason to use DOSBox instead.
 
 
===VirtualBox===
 
{{++}} Mostly open source and non-open source material is free for personal use.
 
{{ii}} Can be installed almost for every OS and can run a wide variety of different operating systems. However it does have problems with Windows ME and earlier which require some fiddling to work.
 
{{ii}} Guest Additions have to be installed to make the guest operating system work optimally, Direct3D support is experimental and installation requires additions to be installed in safe mode.
 
  
====Installing media from physical or virtual devices in the guest OS====
+
===PCem===
{{Fixbox|description=Install from a physical disc or disc image|fix=
+
{{++}} Suitable for Windows 95/98 gaming, supports 3D hardware acceleration (up to 3dfx Voodoo 3 emulation)
# Start the Virtual Machine.
+
{{ii}} All hardware emulated on CPU. ''Pentium 2 200-250 MHz - voodoo 1 '' equivalent performance on ''Ryzen 3xxx/Intel 10th Gen'' CPUs.
# Once the OS has fully loaded, select '''Devices''', '''CD/DVD Devices''' and either:
+
{{--}} Due to hard drive emulated 90s actual hardware's speed, io speed is very low.
#* '''Host drive 'X:'''' from a physical disc drive and replace the '''X''' with the actual drive letter.
+
{{--}} High resolusions and refresh rates need tweaking in vm, mouse movement is very sluggish on low refresh rates
#* '''Choose a virtual CD/DVD disc file...''' for a disc image, choose DMG, ISO or CDR.
+
{{--}} No state save feature
# When loaded, the disc can be accessed from the guest OS normally.  
 
}}
 
{{Fixbox|description=Use a shared folder to move install file to guest|fix=
 
# Open VMs Settings and open '''Shared folders'''
 
# Click on the icon with the blue folder and the green plus sign to add a new folder.
 
# Search for the folder you want to use within guest, name it, tick '''auto-mount''' and click OK.
 
#* If you are only using a shared folder to install your media, tick '''read only'''.
 
# Click OK to save changes and start up VM.
 
  
'''Notes'''
+
===86box===
{{ii}} Guest additions should be installed prior doing this.
+
{{++}} Suitable for Windows 95/98 gaming, supports 3D hardware acceleration (up to 3dfx Voodoo 3 emulation)
{{ii}} If you add a shared folder while the VM is open, you may need to restart the guest operating system.
+
{{++}} 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.
===VMware===
+
{{--}} High resolusions and refresh rates need tweaking in vm, mouse movement is very sluggish on low refresh rates
{{++}} Superior 3D acceleration support in Windows XP and later OSes.
+
{{--}} No state save feature
{{--}} Closed-source, the free version is very basic.
 
  
 
===QEMU===
 
===QEMU===
{{++}} Greater compatibility with programs due to emulation.
+
{{++}} On Linux, using QEMU virtualisation + KVM + GPU-passthrough can achieve almost native performance (80-90%).
{{--}} High performance penalties when emulating.
+
{{--}} On Linux, GPU-passthrough requires multiple GPUs.
 +
{{ii}} Good compatibility with programs when using emulation, though carries a high performance penalty.
  
===Microsoft Virtual PC 2007===
+
===WineVDM on 64-bit Windows===
{{ii}} Installing on Windows 8 and later requires some tweaking (see [[#Windows 8 compatibility issues|Windows 8 compatibility issues]]).
+
{{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]].
  
====Windows 8 compatibility issues====
+
===VirtualBox===
{{--}} Virtual PC 2007 causes a BSOD on Windows 8 and later because it uses an outdated version of <code>vmm.sys</code>.
+
{{++}} 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.
 +
{{++}} 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.
  
{{Fixbox|description=Install Virtual PC|ref={{cn|The link below is definitively linking to 6.0.192.0 version mentioned blocked in ACT compatibility manager.. But can't you just orthodoxly disable it? also, isn't there a newer version? https://www.microsoft.com/en-us/download/details.aspx?id=3702}}|fix=
 
# Install [https://www.microsoft.com/en-us/download/details.aspx?id=24439 Microsoft Virtual PC 2007 SP1] if you haven't already.
 
# Install the [https://www.microsoft.com/en-us/download/details.aspx?id=27570 Windows Phone SDK 7.1].
 
# Install the [https://www.microsoft.com/en-us/download/details.aspx?id=29233 Windows Phone SDK 7.1.1 Update].
 
# Rename <code>Virtual PC.exe</code> to <code>VirtualPC.exe</code> to bypass the compatibility warning.
 
# Microsoft Virtual PC 2007 SP1 will now run correctly on Windows 8.
 
{{ii}} The updated <code>vmm.sys</code> can be backed up for future use to avoid having to install the Windows Phone SDK in the future.
 
}}
 
  
===Windows Virtual PC===
+
===VMware===
{{ii}} Only available on certain editions of Windows 7.
+
{{++}} 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.
{{--}} Official guest support for operating systems earlier than Windows XP was removed.
+
{{--}} Only supports 60Hz refresh-rate and stereo sound output.{{cn}}
{{--}} Lots of features were removed, making this version of Virtual PC inferior.
+
{{--}} The free version, VMware Workstation Player, lacks a snapshot feature.
{{Fixbox|description=Install Windows Virtual PC|ref={{CN|date=February 2019}}|fix=
+
{{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.
# Download the [https://www.microsoft.com/en-us/download/details.aspx?id=3702 Windows Virtual PC] installer.
 
# Run the <code>.msu</code> package.
 
# Create a new virtual machine and install your OS.
 
'''Notes'''
 
{{ii}} Make sure to select the right version (32-bit or 64-bit) appropriate for your operating system.
 
}}
 
  
==External links==
+
{{References}}
{{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"