Jump to content

Hi all.

 

So to cut to the chase is there a way to pass over everything in a PC to a VM except the network card? I want to run win7 on a newer machine but obviously its not possible without drivers... (I only have experience with debian and distros based on it.)

 

Thanks in advance :) .

Link to comment
https://linustechtips.com/topic/976661-question-about-virtualization/
Share on other sites

Link to post
Share on other sites

10 minutes ago, jagdtigger said:

Hi all.

 

So to cut to the chase is there a way to pass over everything in a PC to a VM except the network card? I want to run win7 on a newer machine but obviously its not possible without drivers... (I only have experience with debian and distros based on it.)

 

Thanks in advance :) .

Depending on that kind of VM your using, you can download on their site a driver package for the OS you're using and install those to use the virtual hardware like GPU, USB and Network.

 

I know that VirtualBox has a passthrough function for USB but Network has to be installed seperately because it needs to handle dhcp and such

Positive Mental Additude!

Just another Tired IT guy...

Link to post
Share on other sites

5 minutes ago, FastRDust said:

Depending on that kind of VM your using, you can download on their site a driver package for the OS you're using and install those to use the virtual hardware like GPU, USB and Network.

 

I know that VirtualBox has a passthrough function for USB but Network has to be installed seperately because it needs to handle dhcp and such

Yeah i know, but the problem here is that i want to pass over everything including the igp, all usb etc... The only virtual HW gonna be the NIC since i need to reach the host OS somehow...

Link to post
Share on other sites

17 minutes ago, jagdtigger said:

Hi all.

 

So to cut to the chase is there a way to pass over everything in a PC to a VM except the network card? I want to run win7 on a newer machine but obviously its not possible without drivers... (I only have experience with debian and distros based on it.)

 

Thanks in advance :) .

It's not straightforward, and it is highly dependent on which VM you use, but basically, start here:

https://davidyat.es/2016/09/08/gpu-passthrough/

 

NOTE: I no longer frequent this site. If you really need help, PM/DM me and my e.mail will alert me. 

Link to post
Share on other sites

Just now, jagdtigger said:

Yeah i know, but the problem here is that i want to pass over everything including the igp, all usb etc... The only virtual HW gonna be the NIC since i need to reach the host OS somehow...

NIC is handled natively...that will be the least of your issues

NOTE: I no longer frequent this site. If you really need help, PM/DM me and my e.mail will alert me. 

Link to post
Share on other sites

you will ever need a second gpu... the virtualization platform will always need a own one...

Main System:

Anghammarad : Asrock Taichi x570, AMD Ryzen 7 5800X @4900 MHz. 32 GB DDR4 3600, some NVME SSDs, Gainward Phoenix RTX 3070TI

 

System 2 "Igluna" AsRock Fatal1ty Z77 Pro, Core I5 3570k @4300, 16 GB Ram DDR3 2133, some SSD, and a 2 TB HDD each, Gainward Phantom 760GTX.

System 3 "Inskah" AsRock Fatal1ty Z77 Pro, Core I5 3570k @4300, 16 GB Ram DDR3 2133, some SSD, and a 2 TB HDD each, Gainward Phantom 760GTX.

 

On the Road: Acer Aspire 5 Model A515-51G-54FD, Intel Core i5 7200U, 8 GB DDR4 Ram, 120 GB SSD, 1 TB SSD, Intel CPU GFX and Nvidia MX 150, Full HD IPS display

 

Media System "Vio": Aorus Elite AX V2, Ryzen 7 5700X, 64 GB Ram DDR4 3200 Mushkin, 1 275 GB Crucial MX SSD, 1 tb Crucial MX500 SSD. IBM 5015 Megaraid, 4 Seagate Ironwolf 4TB HDD in raid 5, 4 WD RED 4 tb in another Raid 5, Gainward Phoenix GTX 1060

 

(Abit Fatal1ty FP9 IN SLI, C2Duo E8400, 6 GB Ram DDR2 800, far too less diskspace, Gainward Phantom 560 GTX broken need fixing)

 

Nostalgia: Amiga 1200, Tower Build, CPU/FPU/MMU 68EC020, 68030, 68882 @50 Mhz, 10 MByte ram (2 MB Chip, 8 MB Fast), Fast SCSI II, 2 CDRoms, 2 1 GB SCSI II IBM Harddrives, 512 MB Quantum Lightning HDD, self soldered Sync changer to attach VGA displays, WLAN

Link to post
Share on other sites

Its a intel nuc so no chance of getting a second gpu in it... :D

 

@FastRDust

I wont buy that just for this ;) .

 

/EDIT

Okay, all virtualization related stuff is enabled in UEFI bot no output for 'dmesg | grep -e "Directed I/O" ', fresh headless debian install.

Edited by jagdtigger
Link to post
Share on other sites

Little update, got the system to finally load vfio-pci for igp and sound. Now i have to deal with usb...

 

root@intelnuc:/home/jagdtigger# ./iommu.sh 
IOMMU Group 0 00:00.0 Host bridge [0600]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Host Bridge [8086:5af0] (rev 0b)
IOMMU Group 10 00:1a.0 Serial bus controller [0c80]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series PWM Pin Controller [8086:5ac8] (rev 0b)
IOMMU Group 11 00:1f.0 ISA bridge [0601]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Low Pin Count Interface [8086:5ae8] (rev 0b)
IOMMU Group 11 00:1f.1 SMBus [0c05]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SMBus Controller [8086:5ad4] (rev 0b)
IOMMU Group 1 00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:5a85] (rev 0b)
IOMMU Group 2 00:0e.0 Audio device [0403]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Audio Cluster [8086:5a98] (rev 0b)
IOMMU Group 3 00:0f.0 Communication controller [0780]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Trusted Execution Engine [8086:5a9a] (rev 0b)
IOMMU Group 4 00:12.0 SATA controller [0106]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SATA AHCI Controller [8086:5ae3] (rev 0b)
IOMMU Group 5 00:13.0 PCI bridge [0604]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series PCI Express Port A #1 [8086:5ad8] (rev fb)
IOMMU Group 5 00:13.1 PCI bridge [0604]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series PCI Express Port A #2 [8086:5ad9] (rev fb)
IOMMU Group 5 00:13.2 PCI bridge [0604]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series PCI Express Port A #3 [8086:5ada] (rev fb)
IOMMU Group 5 01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader [10ec:5229] (rev 01)
IOMMU Group 5 02:00.0 Network controller [0280]: Intel Corporation Device [8086:24fb] (rev 10)
IOMMU Group 5 03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
IOMMU Group 6 00:15.0 USB controller [0c03]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series USB xHCI [8086:5aa8] (rev 0b)
IOMMU Group 7 00:16.0 Signal processing controller [1180]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series I2C Controller #1 [8086:5aac] (rev 0b)
IOMMU Group 8 00:18.0 Signal processing controller [1180]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series HSUART Controller #1 [8086:5abc] (rev 0b)
IOMMU Group 9 00:19.0 Signal processing controller [1180]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #1 [8086:5ac2] (rev 0b)
IOMMU Group 9 00:19.1 Signal processing controller [1180]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #2 [8086:5ac4] (rev 0b)
IOMMU Group 9 00:19.2 Signal processing controller [1180]: Intel Corporation Celeron N3350/Pentium N4200/Atom E3900 Series SPI Controller #3 [8086:5ac6] (rev 0b)

Its in a separate group so it should work but its refusing to cooperate. I went and blacklisted xhci_hcd then update-initramfs -u but still loads that module and not vfio-pci.... :/

 

/EDIT

Okay, forced usb to vfio-pci manually:

root@intelnuc:/home/jagdtigger# echo "0000:00:15.0" > /sys/bus/pci/devices/0000:00:15.0/driver/unbind
root@intelnuc:/home/jagdtigger# echo 0x8086 0x2067 > /sys/bus/pci/drivers/vfio-pci/new_id

Then tried to fire up the VM:

root@intelnuc:/home/jagdtigger# ./win7_vm
cat: /etc/vfio-pci.cfg: No such file or directory
qemu-system-x86_64: -device vfio-pci,host=00:02.0,multifunction=on: Failed to mmap 0000:00:02.0 BAR 2. Performance may be slow
qemu-system-x86_64: -device vfio-pci,host=0000:00:02.0,bus=pci.0,addr=02.0: Bus 'pci.0' not found
./win7_vm: line 52: -drive: command not found

Start script:

Spoiler

 

 

 

 

Edited by jagdtigger
Link to post
Share on other sites

On 9/27/2018 at 11:23 PM, jagdtigger said:

Hi all.

 

So to cut to the chase is there a way to pass over everything in a PC to a VM except the network card? I want to run win7 on a newer machine but obviously its not possible without drivers... (I only have experience with debian and distros based on it.)

 

Thanks in advance :) .

I mean technically, but if you're going to install drivers and set up in a VM to then DHD it to a new desktop.....  why not just use VM passthrough or just set up a new desktop?  Seems kinda like a waste of time.

Link to post
Share on other sites

2 minutes ago, Aremis said:

I mean technically, but if you're going to install drivers and set up in a VM to then DHD it to a new desktop.....  why not just use VM passthrough or just set up a new desktop?  Seems kinda like a waste of time.

That is the issue, there are no drivers for win7 in case of new machines.....

 

I just hit a brick wall with a error that says the IGP cant work in legacy mode because xy pci address is already taken...

Link to post
Share on other sites

11 minutes ago, jagdtigger said:

That is the issue, there are no drivers for win7 in case of new machines.....

 

I just hit a brick wall with a error that says the IGP cant work in legacy mode because xy pci address is already taken...

mThen you're out of PCI lanes?

Link to post
Share on other sites

  • 4 weeks later...

dont know if your still working on this idea, but the only solution i could think of that might work, comes from when grub4dos was a thing and qemu. 

 

but i cant remember exactly how the guy actually sets it up, its been awhile.

your win 7 may still have issues if its not a fresh install (even to a VHdd image) because its not the same hardware it remembers.

 

i remember something about in the grub boot lines you forced it to look into the VHDD image as start of drive, so it would start the virtual image as though it was the real hard drive, just not sure about the network card.

 

id have a look here to see if there is a way

https://qemu.weilnetz.de/doc/qemu-doc.html (on my computer it shows in english).

current main system: as of 1st Jan 2023

motherboard : Gigabyte B450M DS3H V2

CPU: Ryzen 5 3600

ram : 16Gig Corsair Vengeance 3600mhz

OS :multi-boot

Video Card : RX 550 4 GIG

Monitor: BENQ 21 inch

 

Link to post
Share on other sites

I given up on it after i hit that brick wall, it seems this little NUC do not have enough PCI lanes to pass over the IGP... I already moved on and decided to have a separate machine for general stuff(some mini PC, but with a beefier CPU and IGP) and a desk PC for gaming with its own white listing HW firewall.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×