Help, I need a Windows VM for my work

Linux for blind general discussion blinux-list at redhat.com
Tue Aug 10 22:18:00 UTC 2021


Hi all,

as other folks could be interested, I post the content of the script 
inline below. Save it and name it windows.sh or whatever.

#!/bin/sh
# Make a directory /home/<username>/qemu if not already done
mkdir -p ~/qemu
# Change directory to ~/qemu
cd ~/qemu
# If the virtual hard disk doesn't exit yet, create it
if [ ! -f windows.qcow2 ]; then
	qemu-img create -f qcow2 windows.qcow2 64G
fi
# If the file that stores the UEFI firmware variables doesn't exit, 
create it
if [ ! -f edk2-i386-vars.fd ]; then
	cp /usr/share/qemu/edk2-i386-vars.fd   ./
fi
# if the Windows ISO is not yet in  ~/qemu/, put it there
if [ ! -f  windows.iso ]; then
	echo "please store in ~/qemu the Windows ISO, renamed windows.iso then 
try again."
	exit
fi
# Start the virtual machine
qemu-system-x86_64 \
-cpu host \
-enable-kvm \
-smp $(nproc) \
-m 4G \
-k us \
-boot menu=off \
-boot order=c,once=d \
-device intel-hda \
-device hda-duplex \
-display sdl \
-vga std \
-drive file=windows.qcow2,format=qcow2,media=disk \
-drive 
if=pflash,format=raw,readonly=on,file=/usr/share/qemu/edk2-x86_64-code.fd \
-drive if=pflash,format=raw,file=edk2-i386-vars.fd \
-cdrom windows.iso


Le 10/08/2021 à 15:59, Didier Spaier a écrit :
> Hi again Brandt,
> 
> The script is attached
> 
> Intructions for use:
> 1. Create a directory ~/qemu
> Assuming that your username is brandt; hust type to do that:
> mkdir /home/brandt/qemu
> or just:
> mkdir ~/qemu
> As a reminder, ~ stands for /home/<username>
> In my case /usr/didier, in yours I assume /home/brandt
> but anyway the output of this command will tell you:
> echo ~
> 
> 2. move the Windows ISO file in ~/qemu,  renamed ~/qemu/windows.iso
> For instance her I did this:
> 
> mv /data/images_ISO/Windows10_InsiderPreview_Client_x64_fr-fr_21354.iso ~/qemu/windows.iso
> 
> 3. Download the script windows.sh and store it somewhere
> Change to the directory where it is installed and run it like this:
> sh windows.sh
> Then press Enter.
> Press  Enter again after 5 seconds to make sure it starts the Windows
> Wait patiently until the installer displays its first screen in the VM.
> 
> Notes:
> You need to be in a graphical environment like Mate.
> If the VM steals the focus, type Ctrl+Alt+G to get it back on the host.
> 
> After Windows installation, running the script should start Windows 
> directly in
> the VM.
> 
> Cheers,
> Didier
> 
> 
> Le 10/08/2021 à 15:06, Linux for blind general discussion a écrit :
>> Hi Brandt,
>>
>> I will attach to my next message a script that sets up a qemu VM
>> allowing to install then run Windows later today after more testing.
>>
>> It should be usable in any Linux distribution with a recent qemu 
>> installed.
>>
>> Cheers,
>>
>> Didier
>>
>>
>> Le 10/08/2021 à 12:55, Linux for blind general discussion a écrit :
>>> Hi all,
>>>
>>>
>>> As I stated before, I am running Slint on the bare metal, however my 
>>> work entails teaching NVDA to clients, obviously running Windows.
>>>
>>>
>>> Therefor I desperately need a Windows VM, so I can make a living. I 
>>> cannot figure qemu, virtual-box, I have no idea, and VMWare 
>>> Workstation Player doesn't want to install under Slint.
>>>
>>>
>>> Could someone please, please, give me concise instructions for 
>>> setting up a VM using qemu in Slint?
>>>
>>>
>>> Warm regards,
>>>
>>>
>>> Brandt Steenkamp
>>>
>>>
>>> Sent from my gass powered Slint hair dryer.





More information about the Blinux-list mailing list