Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Delete iso - kvm Machine

  1. #1
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,577
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Delete iso - kvm Machine

    After one has installed a kvm machine can you delete the install iso? I read a lot about how to delete the machine but not specially how it boots long term. It doesn’t seem right to boot off the iso long term.

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    22,105
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Delete iso - kvm Machine

    Sure. However, I keep the ISO around sorta like a boot-flash-usb device to have the "Try Ubuntu" environment so I don't need to download it again should gparted or a chroot environment be needed to correct boot problems later.

    A 20.04 install into KVM-VM needed this about 2 months after it was first installed. After patching, the system refused to boot. I never figured out how to fix that specific problem and ended up following my backup-restore process ... which begins by doing a fresh, minimal, install of the OS. That uses the ISO.

  3. #3
    Join Date
    May 2013
    Location
    Galiza
    Beans
    3,168
    Distro
    Ubuntu

    Re: Delete iso - kvm Machine

    Typically you boot from the installation media only once to install it.
    The ISO can then be removed.

  4. #4
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,577
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Delete iso - kvm Machine

    Running 20.04 mate host - installing win10 guest vm. VM boot ok using settings as per 1 and 2. 1png shows my only boot option is sata1 disk1 and 2png shows this sata disk has a source path of /media/dad/...... i.e. kvm image on my hd. I then rename my win10 install iso and the vm will not boot - 3png shows the message; which makes sense as the iso is renamed. If I rename the iso back to its original name the vm boots. At this point despite the settings in 1png the vm is looking at the iso not the kvm image on my hd.
    Attached Images Attached Images
    • File Type: jpg 1.jpg (41.5 KB, 7 views)
    • File Type: png 2.png (127.6 KB, 6 views)
    • File Type: png 3.png (21.7 KB, 6 views)

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    22,105
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Delete iso - kvm Machine

    Did you already install Windows onto the SATA vHDD?
    After the install, libvirt should prompt to remove the ISO media ... which means remove it from the VM settings completely.

    If that isn't working, I'd use virsh edit {name of VM} and fix the XML so it doesn't point to the iso file anywhere and only refers to the vHDD stuff.
    Would also be interesting to know if you used BIOS or UEFI for booting, if that's a choice in Windows? I've never touched Win10.

  6. #6
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,577
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Delete iso - kvm Machine

    Not sure what you mean in first sentence. Windows is installed on another physical hd that I use when dual booting (if this kvm works I'm hoping to do away with dual booting as I hardly use win10) but is not installed on the ext4 hd that use for my kvm storage. libvirt did not prompt to remove the iso media. I used the command to edit the xml file but there does not appear (to me) to be an entry that points to the boot source (my only source, as shown in the gui is the vm image).

    Code:
    <domain type='kvm'>
      <name>win10test2</name>
      <uuid>94c1e91a-4dbb-4b4e-b0ba-211208b81689</uuid>
      <metadata>
        <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
          <libosinfo:os id="http://microsoft.com/win/10"/>
        </libosinfo:libosinfo>
      </metadata>
      <memory unit='KiB'>4194304</memory>
      <currentMemory unit='KiB'>4194304</currentMemory>
      <vcpu placement='static'>1</vcpu>
      <os>
        <type arch='x86_64' machine='pc-q35-4.2'>hvm</type>
        <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
        <nvram>/var/lib/libvirt/qemu/nvram/win10test2_VARS.fd</nvram>
        <bootmenu enable='no'/>
      </os>
      <features>
        <acpi/>
        <apic/>

  7. #7
    Join Date
    Oct 2008
    Location
    UK
    Beans
    1,577
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Delete iso - kvm Machine

    Sorry - forgot. I used UEFI when configuring the vm install.

  8. #8
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Delete iso - kvm Machine

    I can see no reason for that iso file being necessary in order to run the VM, but is it still showing as present in the IDE cd-rom in the console information?

  9. #9
    Join Date
    May 2013
    Location
    Galiza
    Beans
    3,168
    Distro
    Ubuntu

    Re: Delete iso - kvm Machine

    And if it is and then the file is renamed then it should be no surprise having the error message saying exactly that it can't find the file.

  10. #10
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    22,105
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Delete iso - kvm Machine

    Quote Originally Posted by Quarkrad View Post
    Not sure what you mean in first sentence. Windows is installed on another physical hd that I use when dual booting (if this kvm works I'm hoping to do away with dual booting as I hardly use win10) but is not installed on the ext4 hd that use for my kvm storage. libvirt did not prompt to remove the iso media. I used the command to edit the xml file but there does not appear (to me) to be an entry that points to the boot source (my only source, as shown in the gui is the vm image).

    Code:
    <domain type='kvm'>
      <name>win10test2</name>
      <uuid>94c1e91a-4dbb-4b4e-b0ba-211208b81689</uuid>
      <metadata>
        <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
          <libosinfo:os id="http://microsoft.com/win/10"/>
        </libosinfo:libosinfo>
      </metadata>
      <memory unit='KiB'>4194304</memory>
      <currentMemory unit='KiB'>4194304</currentMemory>
      <vcpu placement='static'>1</vcpu>
      <os>
        <type arch='x86_64' machine='pc-q35-4.2'>hvm</type>
        <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
        <nvram>/var/lib/libvirt/qemu/nvram/win10test2_VARS.fd</nvram>
        <bootmenu enable='no'/>
      </os>
      <features>
        <acpi/>
        <apic/>
    I've never seen a libvirt XML file that short. Where are all the devices? There should be HDDs, audio, optical, Spice + spice control channels and USB ports. Where is all that stuff? Must be something to do with UEFI. I've never used UEFI to boot any VM before. For a long time, the UEFI code in libvirt wasn't so good. Look there (in the UEFI stuff, somewhere?) for the ISO information.

    As others have said, you can't just rename the ISO and not remove it completely from the libvirt XML/setup data. In fact, you shouldn't need to rename it at all, just remove it from the libvirt XML. That should be enough.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •