Tutorial: Running Windows from inside of Linux

Nice thorough article, thanks for it.

1 Like

So I am trying to set up a Virtual Machine and run Win10 inside of Linux and I have followed the instructions or at least I think I have and after it creates my virtual machine, I try to launch it and it just crashes/closes WMWare with no message or warning. It does this every time.
What is going wrong?

It might depend on the available resources on your Linux system. Let’s see what your system has. Open up a terminal and type:

sudo apt install inxi

Once it installs, run:

inxi --full

And please post the output it gives you. :slight_smile:

Vasileious,
Here is the output result
System:
Host: jeff-HP-i5 Kernel: 5.11.0-43-generic x86_64 bits: 64
Desktop: Gnome 3.38.4 Distro: Zorin OS 16
Machine:
Type: Laptop System: HP product: HP Notebook v: Type1ProductConfigId
serial: <superuser/root required>
Mobo: HP model: 81ED v: 62.55 serial: <superuser/root required>
UEFI: Insyde v: F.49 date: 06/26/2020
Battery:
ID-1: BAT1 charge: 23.6 Wh condition: 23.6/32.6 Wh (72%)
CPU:
Topology: Dual Core model: Intel Core i5-7200U bits: 64 type: MT MCP
L2 cache: 3072 KiB
Speed: 500 MHz min/max: 400/3100 MHz Core speeds (MHz): 1: 550 2: 2201
3: 856 4: 1343
Graphics:
Device-1: Intel HD Graphics 620 driver: i915 v: kernel
Display: x11 server: X.Org 1.20.13 driver: i915 resolution: 1366x768~60Hz
OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 21.0.3
Audio:
Device-1: Intel Sunrise Point-LP HD Audio driver: snd_hda_intel
Sound Server: ALSA v: k5.11.0-43-generic
Network:
Device-1: Realtek RTL810xE PCI Express Fast Ethernet driver: r8169
IF: enp1s0 state: down mac: 3c:52:82:0c:19:23
Device-2: Realtek RTL8188EE Wireless Network Adapter driver: rtl8188ee
IF: wlo1 state: up mac: f0:03:8c:ac:ef:9c
IF-ID-1: vmnet1 state: unknown speed: N/A duplex: N/A
mac: 00:50:56:c0:00:01
IF-ID-2: vmnet8 state: unknown speed: N/A duplex: N/A
mac: 00:50:56:c0:00:08
Drives:
Local Storage: total: 931.51 GiB used: 67.95 GiB (7.3%)
ID-1: /dev/sda vendor: Toshiba model: MQ01ABD100 size: 931.51 GiB
Partition:
ID-1: / size: 915.40 GiB used: 67.94 GiB (7.4%) fs: ext4 dev: /dev/sda2
Sensors:
System Temperatures: cpu: 31.0 C mobo: 29.8 C
Fan Speeds (RPM): N/A
Info:
Processes: 212 Uptime: 6h 22m Memory: 7.69 GiB used: 1.30 GiB (16.9%)
Shell: bash inxi: 3.0.38

Hey @Gr8_4w4k3n1n9!
This can be a tricky part and it’s mostly because of Windows not liking the settings too much, compared to your host system. your system has a total of 8GB, minus the 1.3GB of the Linux host system. If we add in the VMware required RAM and the on-board graphics chip, that would be an average of 1.5GB. So, you will be able to allocate 4GB to your Win10 and 1 CPU core (since you have a dual-core system).

In general, it’s ideal to keep the Windows allocated settings around 50% of your system’s resources.

Try it with those settings and see if it crashes or not. If it does, Windows may be looking for more SWAP file for its purposes. In that scenario, you might want to direct the Kernel to not make huge files (and defragment them) for it. That will require the following Terminal commands:

echo never | sudo tee /sys/kernel/mm/transparent_hugepage/defrag
echo 0 | sudo tee /sys/kernel/mm/transparent_hugepage/khugepaged/defrag

Once that is done, give it another shot, preferrably after a reboot so that the Kernel can re-arrange the SWAP file properties.

If that doesn’t help either, can you please take a few screenshots of the settings you’re using on VMware so that we can find the ideal conditions? (for example, some non i7 CPUs don’t deal great with certain hypervisor interpreters).

The main reason I run Wine under Linux is so I can use PicPick (Pro version, in my case; free version also available). It’s a simple but powerful, light graphics editor, similar to Windows Paint. It’s the only graphics editor I know of that gives you control handles on all 4 sides of a graphic, allowing you to change the size of any of the 4 sides. Sometimes I need to widen the left side of a graphic a client sends me so I can balance that side with the right side, when there’s more margin on the right side than the left side. PicPick - All-in-one Graphic Design, Best Screen Capture and Recording Software, Image Editor, Color Picker, Pixel Ruler and More.

Zorin 16 will prompt you to automatically install Wine if you double-click on an .exe file. OK that prompt, and, after the install, it will also install the .exe program, and, later, any other .exe you want to install. Not every .exe will install and/or work properly under Wine, but smaller one are very likely to work. Every other distro I’ve used, I’ve had to go look up Wine and install it myself. Zorin also installs Play on Linux (POL) in that install process, but you don’t have to use POL yourself to install .exe files. I suppose you could, if you needed to tweak an install, but it’s far easier to just double-click the .exe and let Zorin do it for you.

Here’s another very small Windows utility I use from time to time. It’s called EmailStripper. It was originally designed to strip out all of the vertical bars at the left of text that was brought into a new email that was once part of an earlier email. It will strip out those unnecessary bars and word-wrap the text again, so it flows smoothly.

You can also copy text that was once word-wrapped but then saved in a form that inserted line breaks into the copy, which make it appear as a long line of text followed by a shorter line, instead of being properly word-wrapped. Pasting that text into EmailStripper and clicking Strip It! button will clean up the text, which you can then copy and paste somewhere else, and it will once again be properly word-wrapped.

If you have need of that kind of processing, it’s a quick and easy way to clean up that text, so you can paste it elsewhere as clean, word-wrapped text again.

It’s no longer shown on the regular internet. You have to get it from an archived copy of a previously existing web page. It still works fine. The company that originally put it out simply doesn’t promote it any longer. It was once a paid product, but later was changed to a free product. That free product is still available at this link:

Click the Download The Installer link. Run the installer’s .exe file.

That site is known as The Way Back Machine. The Brave browser can automatically check the Way Back Machine for a web page if it doesn’t find that page currently on the web.

1 Like

Hello @vasileios,
This tutorial is very helpful but I am stuck on the Virtual Machine Name. I downloaded the Windows 10 ISO to my external hard drive and was able to use the above comment from @hissword to find my Windows product key. Now I don’t know where to place the virtual machine. None of the locations I have browsed to allow me to proceed. I am running Linux Mint Cinnamon on a Dell Inspiron 5502 purchased June 2021.

Hi PJ,

Click that Browse button and if you have enough disk space in your home folder, /home/user, then you can store it there.

Most likely you are seeing a permissions issue. If the locations you are trying to create and save the VM are not in your home directory, you probably don’t have write permission.

So choose your Home directory, maybe create a folder in there for VMs, or use the chown command to give your username permissions where you do want to create the VM.

For example, If you have a large drive as a secondary drive in your system, you can create a directory there using sudo, then use chown to give yourself (your user account) ownership of that directory.

Example: cd /opt

sudo mkdir /vm_dir

chown pj /vm_dir

Now go back into VMware Player and try to create the VM again. It should work.

If you create in inside your Home directory somewhere then it should not give you issues.

Is that clear enough?

2 Likes

Hey @PJ,
@hissword is right. You will need to select a folder within your /home/your_username directory. I tend to create a folder inside my Documents and place it there.

1 Like

When I hit the browse button it didn’t let me select any folder to open, which appears to be where I was getting stuck. Once I typed in /user/my name (rather than browsing) it allowed me to progress. Thank you so much!

1 Like

In that case, you might want to create a folder called vms in your home/your_name folder, so that the additional files don’t spill out on your main directory. :slight_smile:
And you’re very welcome!

1 Like

Hey @vasileios
I got to the VM tools installation but can not change the CD connection to use ISO image as it is grayed out. My laptop doesn’t have a CD/DVD drive.

Hey @PJ!
It doesn’t really matter if you have a CD/DVD/BluRay drive. It can simulate it via ISO. As for the grayed out area, are you trying to change the settings while a VM is running?

1 Like

Hey @vasileios
Oh, I see now. I had suspended the virtual machine instead of powering it off to change that setting. Thank you so much!

1 Like

Where did you buy a Windows license for $25?

Margo, I saw your query and have linked here to an article on MUO, How to Get Windows 10 for Free or Cheap, a popular technology website, about inexpensive Windows licenses. Since the url shows “Windows 8,” it must be an updated article, since it now includes Windows 10. The article seems to be aimed at people who didn’t upgrade for free, from Windows 8 or 8.1 to Windows 10. If you pursue this route, be careful when doing so, since “buying a key from an illegal reseller means you run the risk of having your Windows installation deactivated without notice.”

1 Like

I found it a while back when they had a big sale.
Right now, you can get Windows 10 Home for $34 and Windows 10 Pro for $38.
https://pcsalesonline.com/en/software/operating-systems/windows-10

1 Like

This video gives excellent detailed information on these various ways to run Windows in Linux, including Wine; CrossOver, a commercial Wine helper; Winetricks and PlayonLinux, two Linux applications usually available from within Linux distros; Lutris and ProtonDB, additional assistance for running Windows games; setting up Windows in a virtual machine; dual-booting Windows and Linux, and running Windows in a cloud server, from your Linux browser, a costly option but still a way to keep you in Linux and still have a functional Windows machine online. You should definitely check out this video if you need Windows under Linux.

Linux Survival Guide #2: Running Windows Applications

6 Likes

Thanks Blueghost. I really need to tackle this issue.

1 Like

I really need to start getting to this. I am an Excel user from waaaaaaay back. I have not found an acceptable alternative that can easily do the simple formatting things as well as the more complex sorts and filters I may be stuck with excel forever, so I will need to run windows using Wine or something like it. The only thing holding me back from kicking Big Brotha to the curb is money and knowledge, LOL - the will is there, the ability is there just stroke dulled - HAHA. Cheers!

1 Like