(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:
- CPU > Uncheck "Copy host CPU configuration."
- Select ‘core2duo’
- Boot Options > Enable boot menu
- move SATA CDROM 1 to the top and check it, so both it and SATA Disk1 are in the menu.
- SATA CDROM 1 (in the left menu) > check to see the path is correct to the Win7 iso, but it probably already is.
- 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
- Boot Options > put disk a top again (otherwise it will not boot to installed system). Change will take place after rebooting VM.
- 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:)
- 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)
- the Win7 .iso (not sure if you actually need this, probably not)
- a folder called 'GhostISO' which has the extracted Win7 iso files in it (inside GhostISO is the ‘sources’ folder.
- 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
- Copy the .iso for Win 7 to the hard drive.
- Create a new VM for Win7
- 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).
- 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.
- 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.
- 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).
Once Windows7 boots and you are on the home screen, do:
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.
- 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".
- 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.
...
- 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.
Install 7zip.
Copy the Simplix UpdatePack7R2etcetc file to C: . Copy the win7 folder to C: also. In win7 folder, extract the .iso.
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