Troubleshooting Qemu VM

When booting, it suddenly just goes to (initramfs). NOTE this will reset the VM ie you lose everything on it. I didn't research yet a way to just recover without losing data.

  1. type blkid ... and look for something that has ext4 (ie looks like a filesystem)
  2. fsck /dev/sda1 -y (modify this for your disk path ... this should check and fix the corrupt partition
  3. reboot -f
TTTThis

Blog page

sudo dpkg -i --force-overwrite /var/cache/apt/archives/*.deb

sudo apt-get install -f

IME stuff

lspci | grep -i "MEI"

... no response is good

dmesg | grep -i "mei"

... no response is good, but there's usually something here in kali, so ...

(file test with ls /dev/mei* ... no response is good, no such file or directory)

sudo nano /etc/modprobe.d/ghost-build.conf

and type

# Kill the Management Engine Interface
blacklist mei
blacklist mei_me
# Kill the HDCP link (Privacy win: prevents hardware-level tracking via DRM)
blacklist mei_hdcp

then

sudo update-initramfs -u

reboot and

dmesg | grep -i "mei"

... should now return nothing.

RANDOMIZE RAM

sudo nano /etc/default/grub

Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT. It probably looks like this right now: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Add the shuffle parameter inside the quotes. Update it to look like this: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash page_alloc.shuffle=1"

Save and exit: Press Ctrl + O, then Enter to save. Press Ctrl + X to exit.

then...

sudo update-grub

then ...

sudo reboot

then ...

cat /sys/module/page_alloc/parameters/shuffle

You will probably get the response "Ywhich is what you want to see. But if you want the full printout docat /proc/cmdline`. Look for page_alloc.shuffle=1 in the output. If it's there, the kernel has the "deck of cards" and is shuffling it.

QEMU

sudo apt update && sudo apt install virt-manager -y

sudo apt update && sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils

sudo apt install virtiofsd

open virtual machine manager (virt manager) but it says 'error: no active connection to install on'

so...

Start the virtualization daemon

sudo systemctl start libvirtd

Make it start automatically every time you boot

sudo systemctl enable libvirtd

then

Add yourself to the group

sudo usermod -aG libvirt $USER

Refresh your group membership without logging out

newgrp libvirt

Then connect to virt manager and add connection

do this because VMs probably wont start after reboot, because the default connection isn't connecting...

sudo virsh net-list --all

then

sudo virsh net-start default

now VMs should start

but you'll have to do it every time you boot, so do

sudo virsh net-autostart default

ERROR?

The error "unsupported configuration: security driver model 'apparmor' is not available" indicates that the virtual machine configuration specifies the apparmor security driver, but the host system cannot find or use it.

Edit the file /etc/libvirt/qemu.conf

find #security_driver = "selinux" and change it to security_driver = "none". If the line doesn't exist, add it to the file.

Save the file and then Terminal

sudo systemctl restart libvirtd.service

Restart VM.

...

TTTThis

Making a computer with separate screen, with midi buttons, with audio interface and HDMI to USB

E6430 Yes has HDMI port (Full Size) Socketed CPU, Easiest to build with. E6530 Yes has HDMI port (Full Size) Socketed CPU, Often has better dedicated GPU. E6230 No (Mini-HDMI) Soldered Very tiny motherboard. E6330 No (Mini-HDMI) Soldered Middle ground size.

Socketed CPUs: These are the only two in the range where the processor isn't permanent. You can take out the i5 and drop in a Quad-Core i7 later.

The E6...30 series has a power button and HDMI, so don't need a keyboard like x230

You can just buy "E6430 Motherboard", you don't need the computer.

Elitebook 8470p also has socketed CPU, so you can put a quad core i7 (x230 is dual core, but therefore cooler), and some Elitebooks come with dedicated AMD graphics (x230 uses Intel integrated graphics). Elitebook can have Quad-Core i7-3630QM, whereas x230 can have Dual-Core i7-3520M, as their max CPUs. Both have 16gb ram. Thei7-3740QM has a passmark of 5600, whereas the i7-3520M is 2900.

Elitebook 2570p also you can put in the quad core i7.

Wood

The Grounding Trick: Laptops use the metal "shielding" inside the plastic case for grounding. In a wood case, you just need to ensure the motherboard is mounted on brass standoffs (the little gold screws).

Powerbank

Yes but because the X230 is a laptop and not a phone, you can't just use any cheap power bank from a gas station. You need one that meets the "65W PD" standard. A 20,000mAh bank will give you roughly 2 to 4 hours of run time.

HDMI Screen or connect with VGA (x230 has VGA and displayport mini but without audio). x230 supports up to 2 external monitors if you use a docking station, or 1 external if using the side port.

Mini DisplayPort to HDMI Adapter

Pixel8 as a monitor

Pixel 8 is the first Pixel with DisplayPort Output hardware.

Since your Windows 7 motherboard (like the Dell E6430) is spitting out a standard HDMI signal, you can "trick" your Pixel 8 into thinking that signal is a webcam or video feed, using an HDMI to USB-C Video Capture Card. Open an app on your Pixel called "USB Camera" or "nExt Camera" (available on the Play Store). You can also use Spacedesk (wireless, if the x230 has wifi), by installing it on the x230 and the Pixel8, but Spacedesk isn't foss, isn't encrypted, and creates a hole in the Windows Firewall.

TTTThis

How to make a Win7 machine on NVME, using a Linux machine to set up the install disc

(I didn't successfully do this yet, but the process is make a Win7 VM on your linux machine, transfer / download the Windows Updater software (there are various that do this task out there, I tried 2 so far because first one didn't work at least not on my Win7 VM), use the Win7 install (unpacked, add plugins to the 'sources' folder with the Windows Updater software, which then should package a new .iso which you can use to install a Win7 that has drivers for NVME, trackpad, etc, to use on a more modern machine (not all machines, and less so for post 2018 machines it seems).

CLEANER SECOND TRY NOTES

When you create the new VM you select the location of the Win7 iso. Make it 100gb. Give it 8192 RAM.

(Note, you do not need to ‘add hardware’ at all in this. 'Add hardware is for shared folders in Linux guest VMs).

Cancel the boot because it will probably freeze once it gets to the first screen and do this:

  1. CPU > Uncheck "Copy host CPU configuration."
  2. Select ‘core2duo’
  3. Boot Options > Enable boot menu
  4. move SATA CDROM 1 to the top and check it, so both it and SATA Disk1 are in the menu.
  5. SATA CDROM 1 (in the left menu) > check to see the path is correct to the Win7 iso, but it probably already is.
  6. Video > VGA

Boot and install Win 7 64bit Ultimate.

Open Advanced System Settings in Windows. Performance > Settings > Advanced > Change, then uncheck ‘automatically manage’, then Select C drive, then Select Custom size and set both Initial and Maximum to 16384 (16GB). Click ‘Set’ button. Restart VM. (This is all so you don't run out of virtual memory. It's fine you only allocated 8gb RAM to the VM because this is a different thing.

On Host (linux)

Make a ‘transfer_payload.iso’. Put all the stuff you want (UpdatePack software (there are several out there), the win7 .iso (which you extract to the folder because you need access to it), probably need 7zip for windows .exe. Geniso is ok software for linux, although a bit dated.

genisoimage -o ~/Desktop/transfer_payload.iso -R -J ~/Desktop/vm-transfer

Now you can do

  1. Boot Options > put disk a top again (otherwise it will not boot to installed system). Change will take place after rebooting VM.
  2. SATA CDROM (in the left menu) > set to the packaged up ‘transfer_payload.iso’.

COPY STUFF FROM (Win7) Computer > CD Drive (D) (where the vm-transfer .iso has access to your files now) to C drive. You should have (in C:)

  1. UpdatePack7R2-26.1.15 (or whatever update pack you want to use (but the following code is for this one) (DO NOT DOUBLE CLICK INSTALL THIS, just have it there)
  2. the Win7 .iso (not sure if you actually need this, probably not)
  3. a folder called 'GhostISO' which has the extracted Win7 iso files in it (inside GhostISO is the ‘sources’ folder.
  4. Create a folder there called 'GhostTemp' also.

In Win7 Command Prompt (run as admin), you need to discover the Index number for the Win7 you want to repackage as your new modified Win7 installer. Do

dism /Get-WimInfo /WimFile:C:\GhostISO\sources\install.wim

Mine had 9 indexs (9 versions of Windows). Ultimate was the biggest one (filesize) and was Index 9. You can run this to double check

dism /Get-WimInfo /WimFile:C:\GhostISO\sources\install.wim /Index:9

Anyway, this command will package up the new Win7 installer iso . This will make only the 64 bit Ultimate. It is a lengthy process.

C:\UpdatePack7R2-26.1.15.exe /WimFile=C:\GhostISO\sources\install.wim /Index:9 /Optimize /Passive /Temp=C:\GhostTemp

You can open System Monitor and look for things happening, but there isn't much visual progress monitoring for tihs. Expect it to take a couple hours.

But the VM just kept running out of space. I even went to 8gb ram, 100gb hd, but it was the same. Might have to try on a machine not VM.

...

...

ORIIGNAL NOTES

QEMU VM, MAKE A WIN7 VM

  1. Copy the .iso for Win 7 to the hard drive.
  2. Create a new VM for Win7
  3. Might cause freezing when you try to install with it. If so do the following changes:

CPU Configuration:

  • Click CPUs in the left sidebar.
  • Uncheck "Copy host CPU configuration" (if checked).
  • In the "Model" dropdown (or type it in), select Westmere or Nehalem. These are Intel architectures from the era Windows 7 was designed for.

Video Selection:

  • Click Video QXL -> change Model to VGA.

Display (Spice/VNC):

  • Click Display Spice (or Display VNC).
  • Ensure "Listen type" is set to Address (not None).
  • Set OpenGL to Off (Unchecked).
  1. Now, if it says there's no boot device, do:
  • Go to Boot Options.
  • Crucial: Make sure the checkbox next to SATA CDROM 1 (your ISO) is checked.
  • Move it to the very top of the list.
  1. Install Win 7 Pro or Ultimate (Ultimate isn't better except Bitlocker, and both allow lots of RAM (more than the 40gb limit of the T480s.
  2. It may try to boot into the installer again. Power off and go to the VM settings and Boot Options and uncheck the CD from the boot options (just boot from SATA).
  3. Once Windows7 boots and you are on the home screen, do:

  4. User Account Control (UAC) - Turn it Off

  • The "Image Updater" tool needs to perform thousands of administrative actions (mounting images, registry edits). If UAC is on, you will get a pop-up every 10 seconds.
  • Once you reach the desktop, go to Start -> type UAC.
  • Click "Change User Account Control settings".
  • Drag the slider all the way to the bottom (Never notify).
  • Click OK and Restart the VM.
  1. Windows Updates - Set to "Never" This VM is a temporary workbench. You do not want Windows 7 trying to download 10 years of updates while you are trying to use the CPU to patch your ISO.
  • When the setup asks about "Help protect your computer and improve Windows automatically," choose "Ask me later" or "Skip".
  • If you're already past that, go to Control Panel -> Windows Update -> Change Settings -> Set to "Never check for updates".
  1. Screen Sleep & Power Settings Patching a Windows 7 ISO can take 30–60 minutes depending on your Kali machine's speed. You don't want the VM falling asleep mid-patch.
  • Go to Control Panel -> Power Options.
  • Select "High Performance".
  • Click "Change plan settings" and set "Put the computer to sleep" to Never.

...

  1. Back on the Host Linux, install an (there are several different ones out there) Windows 7 Image Updater (.8gb) into a folder on your desktop called vm-transfer.

https://forum.videohelp.com/threads/384921-Windows-7-Image-Updater-SkyLake-KabyLake-CoffeLake-Ryzen-Threadripper (this guy is rep trusted)

(direct link: http://www.mediafire.com/file/rboz5cp9glofjd0/Windows_7_Image_Updater.7z )

That Image Updater didn't seem to work.

I put in the Simplix one updatepack7r2 (but be careful because if you just double click this it will start updating your Windows 7 guest.

Also put 7zip in that folder. https://www.7-zip.org/download.html (you need this to open the .7z file). Also put a text file with this in it: C:\UpdatePack7R2.exe /WimFile=C:\win7\sources\install.wim /Index=* /NVMe /Optimize and C:\UpdatePack7R2.exe /WimFile=C:\win7\sources\boot.wim /Index=2 /NVMe

Now in the vm-transfer folder, you have the win7 folder and inside that the win7 .iso, and also the Windows_7_Image_Updater.7z.

In Terminal, run:

sudo genisoimage -o ~/Desktop/transfer.iso -R -J ~/Desktop/vm-transfer

This creates the transfer.iso image (5.7gb) on your desktop.

Add that new CD image to the VM in the VM's info section > CPUs, select SATA CD and you should see on the list on the left an item for SATA CDROM 1 and change the path to the transfer.iso on your Desktop. In Boot Options, SATA CDROM 1 doesn't need to be checked though.

  1. Install 7zip.

  2. Copy the Simplix UpdatePack7R2etcetc file to C: . Copy the win7 folder to C: also. In win7 folder, extract the .iso.

  3. Open Command Prompt as admin (r click it and open as admin). Do C:\UpdatePack7R2orwhatever.exe /WimFile=C:\win7\sources\install.wim /Index=* /NVMe /Optimize

kb917607

TTTThis

How to make a Win7 machine on NVME, using a Windows machine to set up the install disc

Installing Windows 7 on a ThinkPad T480s is a multi-step process because you have to "modernize" the installer to recognize the hardware. You'll find the preparation is the hardest part; the installation itself is standard once the drivers are injected.

Phase 1: Prepare the "Patched" Installer

(You cannot use a standard Windows 7 ISO. You must inject NVMe (for the SSD) and USB 3.0/xHCI (for the ports) drivers, or the installer will freeze or fail to find the disk.)

The Easiest Method: Use a Patcher Tool

  1. Download a Clean ISO: Get a 64-bit Windows 7 Professional or Ultimate ISO.
  2. Use "Windows 7 Image Updater" or "Gigabyte USB Tool": These tools automate the driver injection.
  3. Windows 7 Image Updater: Highly recommended. Point it to your ISO, and it will automatically download and "slipstream" the NVMe and USB 3.0 updates for you.

Flash to USB: Use Rufus.

  1. Partition Scheme: Select MBR (this is crucial for Legacy/CSM boot).
  2. Target System: BIOS (or UEFI-CSM).

Phase 2: Configure the T480s BIOS

(Before plugging in your SSD, you must tell the T480s to act like an older computer.)

  1. Repeatedly press F1 during boot to enter BIOS.
  2. Security Tab: * Go to Secure Boot → Set to Disabled.
  3. Startup Tab: * UEFI/Legacy Boot: Set to Both or Legacy Only.
  4. CSM Support: Set to Yes.
  5. Restart Tab:
  6. OS Optimized Defaults: Set to Disabled.
  7. Press F10 to save and exit.

Phase 3: The Installation

  1. Insert your Music SSD and your Patched USB Drive.
  2. Press F12 during boot and select the USB drive.
  3. Follow the standard Windows 7 prompts. If you patched the ISO correctly, your SSD will appear in the list.
  4. Important: Once it reaches the desktop, do not connect to the internet. ---

Phase 4: Critical Driver Installation (Offline)

(Since you won't be using the internet, have these drivers ready on a second USB stick:)

TABLE


| Graphics | Modded Intel UHD 620 | Essential for Ableton UI fluidity. Search for "Win7 UHD 620 modded driver." |
| Audio | Realtek High Definition | Standard ThinkPad driver works fine. |
| Trackpad | Synaptics/Elan | Lenovo’s official Win7 T470s drivers often work for T480s. |
| Power Mgmt | Lenovo Power Manager | Helps with battery life and thermal throttling. |


Pro Tip for Ableton: Once the drivers are installed, go to Power Options → High Performance and disable "USB Selective Suspend." This prevents your audio interface from dropping out during a session.

Phase 5: The "Swap" Test

  1. Shut down, pull the Win7 SSD, and insert your Linux SSD.
  2. Go back into BIOS and ensure Secure Boot is still off (most Linux distros are fine with this).
  3. Test your Linux VMs. You should see all 4 cores / 8 threads available.
TTTThis