Open romanholidaypancakes opened 2 months ago
You're missing Python's pip and venv modules first of all. Second of all why aren't you using the bash script I made for automating the installation? I also no longer really maintain this project, I'm working on another version that's much better. I won't be releasing it for a while though.
sudo apt -y install python3-venv python3-pip
New error
Installing /root/Downloads/qemu/pc-bios/petalogix-ml605.dtb to /usr/share/qemu
Installing /root/Downloads/qemu/build/pc-bios/descriptors/50-edk2-i386-secure.json to /usr/share/qemu/firmware
Installing /root/Downloads/qemu/build/pc-bios/descriptors/50-edk2-x86_64-secure.json to /usr/share/qemu/firmware
Installing /root/Downloads/qemu/build/pc-bios/descriptors/60-edk2-aarch64.json to /usr/share/qemu/firmware
Installing /root/Downloads/qemu/build/pc-bios/descriptors/60-edk2-arm.json to /usr/share/qemu/firmware
Installing /root/Downloads/qemu/build/pc-bios/descriptors/60-edk2-i386.json to /usr/share/qemu/firmware
Installing /root/Downloads/qemu/build/pc-bios/descriptors/60-edk2-x86_64.json to /usr/share/qemu/firmware
Installing /root/Downloads/qemu/pc-bios/keymaps/sl to /usr/share/qemu/keymaps
Installing /root/Downloads/qemu/pc-bios/keymaps/sv to /usr/share/qemu/keymaps
make[1]: Leaving directory '/root/Downloads/qemu/build'
mv: cannot stat 'qemu-system-x86_64': No such file or directory
But the file seems to exist
Maybe I should execute Auto-Hypervisor.sh?
Yes, try using Auto-Hypervisor.sh
I made it for automating the process of setting up a custom version of QEMU.
I'm using Ubuntu and it detects it as Debian, should I choose option 2? I selected 2 and kept selecting yes but it didn't seem to do anything
Ubuntu is based on Debian bruh, and yes select option 2. If it doesn't do anything it actually is, you need wait. It has to install and setup a lot.
How can I be sure it is done and can be used? https://streamable.com/yjjx7v
Yeah that didn't look right at all, It'll take a lot longer than that. You're going to have to troubleshoot the issues and fix them. I no longer maintain the script, and I'm working on a different better version. What I recommend doing is running everything manually, one by one and figure out where shit breaks. It'll be easy to identify the issue from there and fix it.
@romanholidaypancakes Alright, I just took the time and fixed up the manual guide a lot on the readme. Go take a look and follow the new updated instructions. There should be no reason why anything messes up honestly.
@romanholidaypancakes Alright, I just took the time and fixed up the manual guide a lot on the readme. Go take a look and follow the new updated instructions. There should be no reason why anything messes up honestly.
Maybe you shouldn't assume that the user's computer has curl
user-admin@admin-wx:~$ cd $HOME/Downloads
curl -sSO "https://download.qemu.org/qemu-8.2.6.tar.xz"
tar xJf "qemu-8.2.6.tar.xz" && cd "qemu-8.2.6"
Command 'curl' not found, but can be installed with:
sudo snap install curl # version 8.1.2, or
sudo apt install curl # version 7.81.0-1ubuntu1.17
See 'snap info curl' for additional versions.
tar (child): qemu-8.2.6.tar.xz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
I've now come to this step: https://github.com/Scrut1ny/Hypervisor-Phantom#modify-grubcfg, maybe this can be automated via commands as well?
I'll leave it like this for now. I don't know if it will have any effect.
Can I modify /etc/modprobe.d/vfio.conf and /etc/default/grub at the same time and then restart? This can save one restart (I'm trying this now
The output of executing the following command after restarting (was the gpu passthrough set up successfully?
In this step: https://github.com/Scrut1ny/Hypervisor-Phantom#virtual-machine-manager-guide , can I start using an existing virtual machine file(qcow2) so that I can reuse it instead of having to re-start it every time? Install
I don't have /usr/share/OVMF/OVMF_CODE_4M.ms.fd here (It's strange that my system is 64-bit but recognized as i686
Now I'm stuck here maybe it's something other than my firmware issue?
@romanholidaypancakes Alright, I just took the time and fixed up the manual guide a lot on the readme. Go take a look and follow the new updated instructions. There should be no reason why anything messes up honestly.
Maybe you shouldn't assume that the user's computer has curl
user-admin@admin-wx:~$ cd $HOME/Downloads curl -sSO "https://download.qemu.org/qemu-8.2.6.tar.xz" tar xJf "qemu-8.2.6.tar.xz" && cd "qemu-8.2.6" Command 'curl' not found, but can be installed with: sudo snap install curl # version 8.1.2, or sudo apt install curl # version 7.81.0-1ubuntu1.17 See 'snap info curl' for additional versions. tar (child): qemu-8.2.6.tar.xz: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now
Well curl is a very common tool thats used a lot, I'll add it to the required packages lol.
I've now come to this step: https://github.com/Scrut1ny/Hypervisor-Phantom#modify-grubcfg, maybe this can be automated via commands as well?
I'll leave it like this for now. I don't know if it will have any effect.
Yes, that can certainly be automated. I've already developed it, it just wasn't working perfectly right in this public version of the script. In my private version though it's perfect and works great. Also your PCI IDs are wrong, Idk if you looked at the tutorials or not but when did it ever say to put the same ID 4 times in a row? Each ID is supposed to be unique. Depending on what PCI device you pick you need to collect ALL PCI IDs from the same device. You can grep for the device you're looking for by just looking for the first part of the ID, everything behind the colon.
Can I modify /etc/modprobe.d/vfio.conf and /etc/default/grub at the same time and then restart? This can save one restart (I'm trying this now
The output of executing the following command after restarting (was the gpu passthrough set up successfully?
Yes, you can modify both first then restart. Just make sure to rebuild the bootloader and initramfs for the GPU to actually get isolated!
And no it wasn't successful, if you read the guide it literally says:
In this step: https://github.com/Scrut1ny/Hypervisor-Phantom#virtual-machine-manager-guide , can I start using an existing virtual machine file(qcow2) so that I can reuse it instead of having to re-start it every time? Install
Yes, you can reuse it.
I don't have /usr/share/OVMF/OVMF_CODE_4M.ms.fd here (It's strange that my system is 64-bit but recognized as i686
Yes, that is incorrect. You need to point to use the CORRECT one in the XML in the VMM (Virtual Machine Manager). The arch we use is obviously x86
and not i686
.
Now I'm stuck here maybe it's something other than my firmware issue?
yes.
The four identical IDs are just because I don't know where to get the correct one, I thought I could just use a random one.
I think there is something wrong with Virtual Machine Manager recognizing iso/qcow2, it mistakenly recognizes x86_64 as i686, how can I launch it from the command line
The four identical IDs are just because I don't know where to get the correct one, I thought I could just use a random one.
No, you cant just use a random one xD. It's easy getting the correct ones. I'll show you the easiest way.
lspci | grep -i vga | sort
Example Output:
00:02.0 VGA compatible controller: Intel Corporation Device 3e92 (rev 02)
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1eb8 (rev a1)
00:02.0
means:
00
02
0
So our Bus number would be 00
.
So in the terminal now run this:
bus_number=00
HWID="$(lspci -nn | grep -E "^${bus_number}:[0-9a-f]{2}.[0-9a-f]" | sed -n 's/.*\[\([0-9a-f:]*\)\].*/\1/p' | paste -sd, -)"
Now we can echo out the vfio-pci.ids
variable we just set and you can see the string you'll be copying and pasting into grub.cfg
and the vfio.conf
. We can automate this process by running these convenient commands I made though.
VFIO_CONF_PATH='/etc/modprobe.d/vfio.conf'
echo -e "options vfio-pci ids=${HWID}\nsoftdep nvidia pre: vfio-pci" | sudo tee "$VFIO_CONF_PATH"
IOMMU_SETTING="intel_iommu=on"
sudo sed -i '/etc/default/grub' -f - <<EOF
s#^\(GRUB_CMDLINE_LINUX_DEFAULT=".*\)"\$\
#\1 ${IOMMU_SETTING} iommu=pt vfio-pci.ids=${HWID} "#
EOF
sudo update-grub && sudo update-initramfs
To check just run this command and you'll see the GPU you chose now is under vfio-pci kernel driver control.
lspci -k | grep -E "vfio-pci"
I think there is something wrong with Virtual Machine Manager recognizing iso/qcow2, it mistakenly recognizes x86_64 as i686, how can I launch it from the command line
There isn't, it's your fault. You need to go to the VMM XML config and manually FIX the specified path of the emulator its using and the edk2 / ovmf (firmware / UEFI) file also.
WARNING: OURS WON'T BE THE SAME. You need to learn how everything works and NOT just blindly copy and paste shit. This is an example of how it SHOULD look though. Also since you're on Intel you need to make sure certain stuff is set to Intel.
I re-executed the command according to https://github.com/Scrut1ny/Hypervisor-Phantom/issues/14#issuecomment-2341562537
Doesn't seem to be set up correctly
Then fix it, it's not that hard. There's plenty of examples and tutorials online, you need to try harder. It isn't that complicated.
I am basically using Windows and don't know much about some Linux commands. I will try
Yikes, well this is a horrible idea. Suddenly trying to switch to linux and do vfio stuff is fucking wild xD. You need to understand linux first and tons of stuff about. Also I recommend Arch Linux, don't use Ubuntu. That shit is bloated and just shit.
I followed the commands at each step according to QEMU + Virt-Manager Setup