Install Windows 10 from local .iso using Qemu

Yes…that let it advance, but then a different outcome than what I expected:

I couldn’t take a screenshot as my mouse stopped working once I hit ESC, but it took me to a UEFI Shell and started mapping table and said to Press ESC in 1 second to skip start.nsh or any other key to continue. I guess it froze.

Sheila

1 Like

One question about network: in Oracle, was told not to use NAT, but bridge. I did not switch to that before attempting the install and looking at the details of the W10 machine, it is using NAT. Could that have anything to do with why it did not start the regular install from the ISO in the VM?

I wouldn’t think so since I planned to do the install without network as I did in Oracle, but did not see where to change the setting to enable/disable networking in QEMU.

I will do some testing.

Sheila

Hi all, :wave:

this is mine:

 ps ax |  grep virt
   1127 ?        Ssl    0:00 /usr/sbin/libvirtd
   1318 ?        S      0:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
   1319 ?        S      0:00 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leaseshelper
   7838 pts/2    S+     0:00 grep --color=auto virt

Seems about the same as Sheila´s.

Cheers from Rosika :slightly_smiling_face:

1 Like

right, I guess so as well.

Here´s my output:

groups rosika
rosika : rosika adm cdrom sudo dip plugdev kvm lpadmin sambashare libvirt
2 Likes

This time I noticed ‘Press Ctrl + L Alt to release pointer’ message at top of the VM. I did this and mouse came back. But the output after disabling Network to start on boot and switching from NAT to Routed (which I assume is same as bridged) gave the following:

So we definitely need something else fixed. Have to go to the dreaded dentist now, but will work on it today.

Thanks,
Sheila

1 Like

Yes, I was meaning to ask this questions as well.

The way you describe it, Neville, is the standard procedure, I guess.

2 Likes

Let it use NAT. It works fine for me, and that is the default.
It is quite safe… actually safer than a plain bridge.

No, I dont think NAT could interfere with your install.

1 Like

You are using uefi boot for the VM.
I have never been able to get that to work.
I use legacy (MBR) boot.

1 Like

Hi Rosika,
I dont think there is any standard.
I just know from experience that it is touchy about where
you put the .iso file…
and
Do you know how to make the VM do a uefi boot?
I have never succeeded with that… akways used MBR

Regards
Neville

2 Likes

VirtualBox “nat” is for private secured networks, use “bridge” if you want to connect across the network, especially if one has “shared folders” on other drives, I always use “bridge”

1 Like

Hi Neville, :wave:

You´re certainly right. I just named it “standard” procedure as it has always been standard to me to put the .iso file on the HDD and work with it from there.

Hmm, I never put much thought (if any) into that.

I just looked it up on my Debian VM:

rosika2@debian ~> [ -d /sys/firmware/efi ] ; and  echo UEFI ; or  echo BIOS
BIOS

So it´s BIOS with me as well.
I´d have to do some research on the topic.

As far as permissions are concerned:

the only time I ran into permission-related problems with my VM was after installing Linux Lite 6.2 as my new daily driver at the beginning of last year.

We discussed it back then here: Big mistake (?): sudo virt-manager .

After my fresh install of Linux Lite 6.2. I wanted to get my virtual machines running again. The images are still present on my third partition and yesterday I installed qemu-system and virt-manager.

After that:
sudo usermod -aG libvirt rosika
(to add myself to the user group libvirt). After that I rebooted the system.

Now I wanted to create a new vm by importing the respective img-file, e.g. virtualdebian.img for my Debian vm.

For this I employed virt-manager. Yet I couldn´t import the img-file as virt-manager complained about not being allowed to do so.

In order to rectify the situation virt-manager offered me to do just that. Yet it still wouldn´t work. It didn´t have the respective rights. :slightly_frowning_face:

So I looked around on the web and found here: kvm - Permission error in virtual machine manager - Ask Ubuntu (kvm virtualization - Permission error in virtual machine manager - Ask Ubuntu) :

change the user and group of your image file (to libvirt-qemu:libvirt-qemu if that’s your virt-manager user). You could also sudo chown libvirt-qemu:libvirt-qemu if you want to do it manually.

Sorry, I seem to be not of much help at the moment. :slightly_frowning_face:

Cheers from Rosika :slightly_smiling_face:

1 Like

Hi again, :wave:

I just submitted the question to ChatGPT to see what it might come up with.

This is what it had to say:

Enabling UEFI for a virtual machine in virt-manager with KVM/qemu involves a few steps. Here’s a general guide:

1. Check Host Capability:

Ensure that your host system supports virtualization and has the necessary modules loaded. You can use the following command to check if the required modules are loaded:

lsmod | grep kvm

You should see modules like kvm and kvm_intel or kvm_amd loaded.

2. Install Required Packages:

Make sure you have the necessary packages installed on your Linux system. These might include qemu, libvirt, and virt-manager. You can install them using your distribution’s package manager.For example, on Debian-based systems:

sudo apt-get install qemu libvirt-clients libvirt-daemon-system virt-manager

3. Configure Virtual Machine:

When creating or editing the virtual machine in virt-manager, make sure to select the UEFI firmware option. Here are the steps:

  • Open virt-manager.
  • Create a new virtual machine or edit an existing one.
  • In the “Overview” tab, under the “Firmware” section, select “UEFI x86_64” for the firmware.

4. Install Windows:

During the Windows installation process, you might need to specify that you want to install in UEFI mode. Ensure your Windows installation media supports UEFI boot.

Additionally, you might need to adjust the boot order in the virtual machine settings to prioritize UEFI over legacy boot.

5. Check UEFI Settings:

Ensure that UEFI is enabled in the virtual machine settings. You can do this by opening the virt-manager, selecting your virtual machine, and navigating to the “Overview” tab. Check that “UEFI x86_64” is selected under the “Firmware” section.

6. Check QEMU/KVM Version:

Ensure that you are using a recent version of QEMU/KVM, as older versions may have limitations or bugs related to UEFI support.

You can check your QEMU version with:

qemu-system-x86_64 --version

If your version is outdated, consider upgrading to the latest version available for your distribution.

By following these steps, you should be able to configure your virtual machine to boot using UEFI rather than legacy (MBR) mode

Please bear in mind that I haven´t tested the procedure and haven´t verified all of the steps.
I just wanted to provide some quick help (if possible :wink:).

Cheers from Rosika :slightly_smiling_face:

P.S.:

greetings from ChatGPT :wink: :

If you or your friend have any more questions in the future, feel free to reach out. Have a wonderful day and pass my greetings to your discussion group.

1 Like

Hi Rosika,
That may be the issue with iso files too.
We should experiment … put an iso file in some location that
virt-manager does not like… then change its owner and group to libvirt and see if that fixes it.
I will try it tomorrow
Regards
Neville

1 Like

Hi Rosika,
Thank you.
We need to check that out too.
I should have an uptodate version of virt-manager in Void.
Regards
Neville

Another thought… if one were going to use a uefi boot, would
the VM need to contain an EFI system partition as well as a root partition?

This says you need a package called ovmf

Chatgpt did not mention that?

1 Like

This gave me the necessary permissions missing from the group file.

I allowed this as it was the default.

Not sure if it matters, but I did not yet install virt-viewer or spice-vdagent and more than one instructable said:

Mount the VirtIO Drivers ISO

We’ll use the VirtIO storage and network windows drivers later. We need them while installing windows, thus we need to mount them via a ISO file. First of all get the VirtIO drivers ISO direct_link_stable Fedora Documentation, other versions. After downloading the ISO click on Add Hardware -> Storage -> Select or create custom storage -> Manage.

I did download them, but forgot you are supposed to add them before Windows install. Not sure if that has anything to do with our issues, but wanted to mention it. The source of this iso is here.

There is further discussion of settings in creation of the VM that I did not follow listed in this article.

Additionally, while some talked about settings in BIOS for virtualization, my BIOS had no such setting on this Acer laptop.

I am going to try this again and see what happens.

Thanks all,
Sheila Flanagan

2 Likes

I checked after reading the article, and mine is the newest version.

1 Like

Re
https://dennisnotes.com/note/20180614-ubuntu-18.04-qemu-setup/
I seem to remember something about virtio drivers iso
Will look it up in my notes.

1 Like

@Sheila_Flanagan
I checked my notes when I installed tiny11b1.iso
I used uefi… i think win11 might require uefi?
And something about TPM module
I needed libswtpm and edk2-ovmf
That was all before the install
The win11 virtio driver was added after the install

I no longer have this vm… ditched it and installed win7
from an install dvd.

Running sudo apt install both libswtpm & edk2-ovmf found nothing. But the instructions for edk2-ovmf were for ‘dnf’ (Fedora, et al). The same instructions I followed for apt was listed above and I have the latest version.

Libswtpm in Ubuntu:

    The swtpm-tools package contains the following types of tools:

    swtpm_bios: Tool for initializing the TPM
    swtpm_ioctl: Tool for controlling the CUSE TPM
    swtpm_setup: Tool for creating the initial state of the TPM; this tool basically simulates TPM manufacturing where certificates are written into the NVRAM of the TPM
    swtpm_cert: Creation of certificates for the TPM (x509)

Trying to install that was told I already have the latest version.

The instructions for adding the virtio ISO included not only changes during creation but adding that ISO file so that it loads during Windows install:

When the configure screen pops up, here are the changes you should make:

Disk 1
Disk bus: VirtIO
NIC
Device model: virtio
Add Hardware
Device Type: CDROM device
Select custom storage: ./virtio-win-0.1.217.iso

I have tried making most of these changes from the current VM details console. But have not been able to change the Disk bus from SATA to Virtio there. Article showed this being done prior to creating the VM with checking ‘customize configuration before install’

Should I just scrap this one and start over with these details or do you know of some way to change the remaining Disk bus item?

Thanks,
Sheila

UPDATE: I found under the XML tab where bus=“sata”
This is currently disabled in Prefs;
If I enable editing, I can change this here? to virtio?

Well changing to VirtIO caused an error. Probably due to not creating the VM with the virtio-win iso.