Announcement

Collapse
No announcement yet.

Is it copy or is it Kubuntu?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [RESOLVED] Is it copy or is it Kubuntu?

    Issue: Trying to install KVM/QEMU guest on Kubuntu 21.04
    Following guide : https://linuxhint.com/install_virtio...mu_windows_vm/
    Downloaded : virtio-win-0.1.208
    Error : 0 bytes in some files

    After doing all the suggested steps, and was about to install drivers for Win7, when : " No signed device drivers were found. "
    (!)
    Checked the ISO file, and the W7 subfolder listed 0 bytes for all files.
    (Ex: amd64/w7/ viostor.sys 0 b)
    I checked the remote server's folder, and W7 subfolder showed data.
    (Ex: amd64/w7/ viostor.sys 50 kb)
    I copied it again, and checked ISO. No bytes in W7. Other folders did have data.
    I tried a direct download from https://github.com/virtio-win/ to Kubuntu download folder.
    Again, missing data in W7 subfolder.
    (Other w7 folders have data. ex: qxl/w7/amd64/ is fine)
    : : : : :
    File size is 530 MB in each instance.
    But files are empty in certain folders.
    Is it Dolphin? Ark ? Kubuntu?
    What would wipe out some folders - but not in Windows 7?
    Last edited by Snowhog; Jan 15, 2022, 08:19 AM.

    #2
    Here is the normal way to set up kvm in Kubuntu 20.04+
    You have the virtual drivers for Windows already.
    Here is a link showing how to download the 5.1GB Win11 ISO file.
    https://getlabsdone.com/how-to-downl...rom-microsoft/

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


    $ sudo adduser acctname libvirt Adding user '<username>' to group 'libvirt'
    $ sudo adduser acctname kvm Adding user '<username>' to group 'kvm'


    $ sudo adduser acctname kvm Adding user '<username>' to group 'kvm'
    $ sudo adduser acctname libvirt Adding user '<username>' to group 'libvirt'

    Test it
    $ virsh list --all

    The sock file should have permissions similar to:
    $ sudo ls -la /var/run/libvirt/libvirt-sock
    srwxrwx--- 1 root libvirt 0 2010-08-24 14:54 /var/run/libvirt/libvirt-sock

    Also, /dev/kvm needs to be in the right group. If you see:
    $ ls -l /dev/kvm
    crw-rw----+ 1 root root 10, 232 Jul 8 22:04 /dev/kvm

    You might experience problems when creating a virtual machine. Change the device's group to kvm/libvirt instead:
    sudo chown root:libvirt /dev/kvm

    The libvert-manager gui should be in your Applications menu.
    IF you are using BTRFS as your filesystem, before you create any virtual drives be sure to use
    sudo chattr +C /var/libvirt/images
    to prevent dynamic file size changes, which BTRFS cannot handle.
    Last edited by GreyGeek; Jan 11, 2022, 11:11 AM.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Originally posted by GreyGeek View Post
      Here is the normal way to set up kvm in Kubuntu 20.04+
      You have the virtual drivers for Windows already.
      No, I do not. THAT is the problem.
      I downloaded the ISO file. But it shows ZERO BYTES in various folders.
      " No signed device drivers were found. "
      . . .

      I can't figure out why it downloads correctly in my Windoze machine, but doesn't when downloaded or copied to my new Kubuntu.

      Comment


        #4
        Originally posted by jetgraphics View Post
        I copied it again, and checked ISO. No bytes in W7. Other folders did have data.
        I've just downloaded virtio-win-0.1.215.iso, and with ark if I try and extract the files I get failures "Hard-link target 'viorng/2k16/amd64/viorng.cat' does not exist". I suspect that what shows as zero byte files are links to the same file for another Windows version.

        If I repeatedly use ark to extract all the files, it gradually gets past all the target not existing errors. Then there are no zero byte files, for any windows version.


        Regards, John Little

        Comment


          #5
          Originally posted by jlittle View Post
          I've just downloaded virtio-win-0.1.215.iso, and with ark if I try and extract the files I get failures "Hard-link target 'viorng/2k16/amd64/viorng.cat' does not exist". I suspect that what shows as zero byte files are links to the same file for another Windows version.

          If I repeatedly use ark to extract all the files, it gradually gets past all the target not existing errors. Then there are no zero byte files, for any windows version.

          Thank you.
          But now I have a folder, virtio, with extracted files. How do I pass them to the Virtual Machine Manager? Create a new .ISO file?
          I cannot find the option in Virtual Machine Manager to share a folder during installation.
          Last edited by jetgraphics; Jan 11, 2022, 06:01 PM.

          Comment


            #6
            From your own link ...

            "If you want to use the virtio devices on your KVM/QEMU Windows VM, then you need 2 CDROM devices. One with the ISO image of Windows for installing Windows on the VM. The other one for installing virtio drivers from the virtio Windows driver ISO file that you’ve just downloaded."

            You have to download the Windows installation ISO from the Microsoft website. You will assign it to the first CDROM.

            Both CDROM's have their Disk Bus set to virtIO. To create the 2nd CDROM:

            "... add a new CDROM device and add the Windows virtio driver ISO image to it.

            First, click on Add Hardware on the VM config panel. From the Storage section, set Device type to CDROM device. Then, click on Manage. Now, with the new CDROM hardware selected, select the virtio-win-0.1.171.iso file that you’ve just downloaded and click on Choose Volume."

            So, the installation ISO goes in the first CDROM and the windows virtio driver ISO is assigned to the 2nd CDROM.

            I don't see the need for the authors "/kvm/iso pool", which you would have to create, but the rest is normal stuff. I generally use the Downloads directory for my "pool". Putting a user pool off of root is a bad practice unless you make it chown root:libvirt.

            A better and more detailed description of the process is on this web page:
            https://getlabsdone.com/install-wind...on-ubuntu-kvm/

            PS - I forgot to mention that 1) if you don't have a license key your Win10 installation will reduce its capabilities after 30 days, or stop altogether and 2) the WIn10.iso is a 5.1 GB download.
            I haven't run WinXX in years, so I don't remember exactly how M$ handles license non-compliance.
            Last edited by GreyGeek; Jan 11, 2022, 11:57 PM.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              Thank you for the reply, but I have no interest in Windows 10. As my previous post mentions, I was installing Win7. And, yes, I did make a second CDROM and selected the ISO file.
              But the installation failed because the files were zero bytes.
              " No signed device drivers were found. "
              As per your later suggestion, I used ark repeatedly to decompress into a folder of files (not ISO). which there appears to be NO WAY to add to the install procedure.

              Comment


                #8
                Sorry I missed that you were installing Win7
                Check out the "Best Answer" on this website:
                https://itectec.com/superuser/window...kvm-with-qemu/

                Here's the easy way

                Unless you have some specific why you'd install a GuestOS using virt-install, here's the 'easy' way to do it without virt-install.

                I have a working VM with Windows 7 installed. Here's how I created it.

                Step 1: Create the virtual disk image

                qemu-img create -f qcow2 vdisk.img 100g
                This creates a virtual disk in the qcow2 format. Setting the partition size to 100g (gigabytes) will not allocate 100gb of physical hard disk space. The virtual partition will only take as much space as the data it contains. The 100g just makes it so you'll (hopefully) never need to increase the size. Increasing a qcow2 image's default size is still a pain in the a** to do.

                Step 2: Install the OS

                If you're using an actual physical cd-rom to load the OS, use the following command.

                sudo kvm -m 750 -cdrom /dev/sr0 -boot d vdisk.img
                If you're using a disk image to load the OS, use this command.

                sudo kvm -m 750 -cd-rom /path/to/image/image.iso -boot d vdisk.img
                Here's the breakdown of the commands:
                • kvm - calls the kernel virtual machine (obvious)
                • -m 750 - allocates 750mb of memory for the virtual machine
                • -cd-rom sets up the cd-rom. For a physical disk use same disk as your HostOS. For a image, provide a path to the image file.
                • -boot d boots the virtual machine from the cd-rom

                I set the memory footprint for the initial load to 750 to be conservative so I can be sure that the install finishes without running out of memory. For subsequent loads I usually set it to 512.

                Note: AFIAK, the kvm command only works in more recent versions of Debian/Ubuntu or their derivatives. If it doesn't work the equivalent (and more common) command is qemu-system-x86_64 or qemu-kvm for 32 bit.

                After you've gone through the whole install process the VM should reboot into a working OS. To load the VM again just launch this command:

                kvm -m 512 vdisk.img
                With whatever command line switches you need to mount additional physical disks, hardware, etc. To find info on command line switches check kvm --help.

                If you don't understand the difference between 'paravirtualization' and 'native virtualization' Matthias' has already made a great explanation of the differences.
                Another way is here:
                https://wiki.gentoo.org/wiki/QEMU/Windows_guest

                This website may give you useful tips if your Win7 install has problems:
                https://superuser.com/questions/7215.../160665#160665

                Last edited by GreyGeek; Jan 12, 2022, 02:17 PM.
                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                – John F. Kennedy, February 26, 1962.

                Comment


                  #9
                  Restating the situation....using Virtual Machine Manager
                  1. I can install Win7 from its ISO file (on CDROM 1).
                  2. I cannot install the drivers it needs to access the network, etc.
                  3. When I followed the directions to install the 2nd CDROM and selected the virtio.iso, then started the guest, the Windows installer could not read any driver files. "No signed device drivers were found".
                  4. When I checked the .ISO file, it did show zero bytes on various Win7 driver files.
                  . . .
                  5. I followed your suggestion and used ark to repeatedly unzip the .ISO and eventually, it did restore all files... but they are no longer in .ISO format.
                  6. The unzipped files cannot be linked to the CDROM, so I am still unable to load drivers.
                  7. I tried mkisofs -o virtio.iso, however, not all files transferred - there were still some zero byte files.
                  . . .
                  The links do not seem to address the situation, since they assume that the virtio.iso is not corrupt (or whatever is the problem).
                  Last edited by jetgraphics; Jan 13, 2022, 01:12 PM.

                  Comment


                    #10
                    RESOLVED.
                    Use older version: virtio-win-0.1.173.iso

                    https://fedorapeople.org/groups/virt...in-0.1.173.iso

                    Comment


                      #11
                      Tell us how it is going!
                      How many GB did you make your vdh and how many CPUs and how much RAM did you give it? Did it give you any problems when you entered your Win10 license number? Do you plan to upgraded it to Win11? Are you going to play with wsl2?
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment


                        #12
                        Originally posted by GreyGeek View Post
                        Tell us how it is going!
                        How many GB did you make your vdh and how many CPUs and how much RAM did you give it? Did it give you any problems when you entered your Win10 license number? Do you plan to upgraded it to Win11? Are you going to play with wsl2?
                        Just used default values.
                        Didn't install Win10.
                        Don't like Win10 nor Win11.
                        What is wsl2?

                        Comment

                        Working...
                        X