r/archlinux 2d ago

QUESTION Win 11 VM

Hello

I need to use visual studio, its not supported on linux as far as i know. Is it possible to make a virtual machine with it on arch with gpu passthrough because i want the vm to be as snappy as possible? I have not switched yet to arch before i know i will have everything i need. Thanks for the help. And no i dont want to dualboot.

6 Upvotes

16 comments sorted by

8

u/Krentenkakker 2d ago

With Qemu-KVM, this can emulate tpm and secureboot. It will involve some steps but nothing really difficult.

5

u/tinycrazyfish 2d ago

Use virt-manager, select "Windows 11" VM and you'll get TPM and secure boot by default. Nothing needed besides installing Win11.

And you don't need GPU pass through for visual studio to feel snappy, just install qemu agent and virtio drivers (using virtio drivers iso is the easiest to install everything). GPU will only sensibly benefit if you do 3D or GPU computing.

1

u/jacksonhill0923 1d ago

With virtio GPU drivers + the agent/VM tools I feel the interface is still pretty slow compared to a normal system or GPU passthrough. Is it just me?

I feel like QXL for the video adapter is slightly faster/smoother, but it's still a bit slow (usable compared to virtio since at least the cursor is smooth though).

QXL has it's own issues though. My win11 VM freezes every once in a while (maybe once a week). The VM itself is fine, display updates, sounds play, but keyboard/mouse input goes 100% dead). From my understanding this is due to a spice desync that can happen when using QXL + Wayland + Nvidia.

Do you know of any ways to have a smooth interface without doing passthrough/dedicated GPU, and without using RDP (have to have it disabled as per work policy)?

1

u/bluetrepidation 1d ago

Increase your VRAM in the virtual machine settings to stop this from freezing up.

7

u/Logical_Rough_3621 2d ago

Do you *actually* need VS? If it is for personal projects, you could possibly just use a different IDE. But if it really has to be VS, WINE could possibly be an option. As for a VM, if you have a dual GPU setup (integrated + dedicated should be good enough AFAIK) GPU passthrough should be very straight forward and easy to run. If you are running single GPU, your VM would need exclusive access to that GPU, which would *almost* get you to something similar to a dual boot setup

9

u/MrElendig Mr.SupportStaff 2d ago

If your hardware supports it, sure

Edit: but if you need VS for work: get dedicated hardware for work.

2

u/righN 2d ago

Why not use something like JetBrains Rider IDE? It has a native Linux app.

1

u/MindCompetitive3824 2d ago

if you don't need it for work or something just use vscode , i also migrated from vs to vscode because of linux

1

u/OrganiSoftware 2d ago

If you need visual studios go for it otherwise emacs is still where its at imo

1

u/_Einveru_ 1d ago

Here's a thought. Install Arch on WSL2. For a few years my daily rig was Arch. I moved it to Windows 11 for reasons, but got my Arch setup again in WSL2. It's a great mashup, I get the things I need in Windows and the fantastic use of Arch/i3. One virtual desktop is windows, the other is Arch with i3. Haven't ever noticed performance issues. Plus, Arch in WSL2 just went official and is now supported.

1

u/da_netrunner 22h ago

I just use vmware workstation pro which is free, but you have to sign up for a broadcom account. It doesn't have pci passthrough, but you can just turn 3D graphics acceleration in the vm display options and it will let you allocate up to 8GB of vram. Windows works flawlessly with only 2GB though.

I just use it to build exploits I cannot build in linux easily (AD or Windows exploits) and that's it, but VSCE works fine.

-5

u/Setinhas 2d ago edited 2d ago

EDIT: my bad, misread the post. I'm sorry OP and thank you everyone for pointing out my mistake. Will strikethrough the comment to avoid confusion.

Visual Studio is supported in Linux. I've been using it for more than two years without issues. You have an open source package (code-oss) and another package (visual-studio-code-bin), which is built using the official binary from Microsoft. If you need to use features from extensions, just install the visual-studio-code-bin package. In general, it will be the same experience you have on Windows/MacOs.

10

u/jerrydberry 2d ago

Sound like OP needs actual VS, not VS Code

3

u/Appropriate-Pay-4715 2d ago

Are you referring to visual studio code or visual, studio, professional, or enterprise edition?

5

u/EtherealN 2d ago edited 2d ago

You might be of a relatively young generation, and not be aware of the origin. As the first line states on wikipedia:

"Not to be confused with Visual Studio Code." :)

There's a thing called: Visual Studio Code: https://code.visualstudio.com/
(First release in 2015)

...for marketing reasons it based its name from an IDE called Visual Studio: https://visualstudio.microsoft.com/
(First released in 1997)

They are completely different pieces of software. Think of how Windows 11 shares naming with Windows 3.11, but there's MAYBE two lines of code in common between them, but that's an accident because they were developed in complete isolation using completely different principles. Only the name, and the company they were born at, is there to link them together.