jeffreywildman / homebrew-virt-manager

A set of homebrew formulae to install virt-manager and virt-viewer on MAC OSX
1.01k stars 265 forks source link

Create new virtual machine OS types missing #64

Closed karlfehd closed 5 years ago

karlfehd commented 7 years ago

After a brew update a few weeks ago myself and several co-workers can no longer create new virtual machines because the OS type drop down box no longer populates with any choices. It seems like it's pointing to an out of date library or something.

screen shot 2016-12-02 at 2 16 30 pm
cmsimike commented 7 years ago

It has magically fixed itself for me. Not sure why

karlfehd commented 7 years ago

My guess is it might have something to do with the dependancies in brew. When I run brew info virt-manager I get the following: jeffreywildman/virt-manager/virt-manager: stable 1.4.0 App for managing virtual machines https://virt-manager.org/ /usr/local/Cellar/virt-manager/1.4.0 (534 files, 12.8M) * Built from source on 2016-11-18 at 08:55:24 From: https://github.com/jeffreywildman/homebrew-virt-manager/blob/master/virt-manager.rb ==> Dependencies Build: intltool ✔, pkg-config ✔ Required: dbus ✔, gnome-icon-theme ✔, gtk+3 ✘, gtk-vnc ✔, hicolor-icon-theme ✔, libosinfo ✔, libvirt ✔, libvirt-glib ✔, libxml2 --with-python ✔, pygobject3 ✔, spice-gtk ✔, vte3 ✔ ==> Requirements Required: x11 ✔

While my co-worker who can still get OS types but has not updated brew in a while gets: jeffreywildman/virt-manager/virt-manager: stable 1.4.0 App for managing virtual machines https://virt-manager.org/ /usr/local/Cellar/virt-manager/1.4.0 (533 files, 12.8M) * Built from source on 2016-09-08 at 13:33:26 From: https://github.com/jeffreywildman/homebrew-virt-manager/blob/master/virt-manager.rb ==> Dependencies Build: intltool ✔, pkg-config ✘ Required: dbus ✘, gnome-icon-theme ✘, gtk+3 ✘, gtk-vnc ✘, hicolor-icon-theme ✔, libosinfo ✘, libvirt ✘, libvirt-glib ✘, libxml2 --with-python ✘, pygobject3 ✘, spice-gtk ✔, vte3 ✘ ==> Requirements Required: x11 ✔

jessiebryan commented 7 years ago

I'm having the same issue - except I don't have any magic like @cmsimike had. I completely uninstalled virt-manager and the all dependencies - then installed again.

jeffreywildman/virt-manager/virt-manager: stable 1.4.0 App for managing virtual machines https://virt-manager.org/ /usr/local/Cellar/virt-manager/1.4.0 (450 files, 11.8M) * Built from source on 2017-02-08 at 09:13:39 From: https://github.com/jeffreywildman/homebrew-virt-manager/blob/master/virt-manager.rb ==> Dependencies Build: intltool ✔, pkg-config ✔ Required: dbus ✔, gnome-icon-theme ✔, gtk+3 ✔, gtk-vnc ✔, hicolor-icon-theme ✔, libosinfo ✔, libvirt ✔, libvirt-glib ✔, libxml2 --with-python ✔, pygobject3 ✔, spice-gtk ✔, vte3 ✔ ==> Requirements Required: x11 ✔

vchampion commented 7 years ago

I have the same problem, OS X Capitan

bendinwire commented 7 years ago

@jessiebryan did the reinstall work?

bendinwire commented 7 years ago

I should also say that I'm having this issue as well...

jessiebryan commented 7 years ago

@flexgames - Nope - still stuck.

roolebo commented 6 years ago

OS types come from osinfo database (https://libosinfo.org/download/). As of now, homebrew doesn't ship osinfo-db-tools and a DB, and the field is empty.

roolebo commented 6 years ago

The issue can be workarounded with local formulae.

First create local formula: brew create https://releases.pagure.org/libosinfo/osinfo-db-tools-1.1.0.tar.gz

And replace generated boilerplate with:

class OsinfoDbTools < Formula
  desc "Tools for managing the libosinfo database files"
  homepage "https://libosinfo.org"
  url "https://releases.pagure.org/libosinfo/osinfo-db-tools-1.1.0.tar.gz"
  sha256 "a141cd2fc07c30d84801b5dbf6b11f2c2e708b0e81216277d052ac0b57fe546b"
  depends_on "intltool" => :build
  depends_on "pkg-config" => :build
  depends_on "glib"
  depends_on "libarchive"

  def install
    args = %W[
      --prefix=#{prefix}
      --localstatedir=#{var}
      --mandir=#{man}
      --sysconfdir=#{etc}
      --disable-silent-rules
    ]
    system "./configure", *args
    system "make"
    system "make", "install"
  end

  test do
    # `test do` will create, run in and delete a temporary directory.
    #
    # This test will fail and we won't accept that! For Homebrew/homebrew-core
    # this will need to be a test that verifies the functionality of the
    # software. Run the test with `brew test osinfo-db-tools`. Options passed
    # to `brew install` such as `--HEAD` also need to be provided to `brew test`.
    #
    # The installed folder is not in the path, so use the entire path to any
    # executables being tested: `system "#{bin}/program", "do", "something"`.
    system "false"
  end
end

Save it, quit from editor and install it: brew install osinfo-db-tools

Then you need to download a database: curl -O https://releases.pagure.org/libosinfo/osinfo-db-20180514.tar.xz

And import it: osinfo-db-import osinfo-db-20180514.tar.xz

Then os types and variants will be available in virt-install and virt-manager. FWIW, windows 10 is win10 os variant and can be installed as:

virt-install \
    --name=windows10 \
    --ram=8192 \
    --cpu=host \
    --vcpus=2 \
    --os-type=windows \
    --os-variant=win10 \
    --disk /var/lib/libvirt/images/win10,bus=virtio \
    --disk /path/to/Win10_1803_English_x64.iso,device=cdrom,bus=ide \
    --disk /path/to/virtio-win-0.1.141.iso,device=cdrom,bus=ide \
    --network network=default
karlfehd commented 6 years ago

Thanks roolebo, that work around fixed it!

sandalle commented 6 years ago

Your solution fixed the OS list for me @roolebo , thanks!

pztrn commented 5 years ago

sudo cast @jeffreywildman

Maybe you'll add this formulae to your tap? Please :)

jeffreywildman commented 5 years ago

@roolebo Thanks for most of the legwork! I've added osinfo-db-tools and osinfo-db as separate recipes and added osinfo-db as a dependency to virt-manager.

I now observe a drop down of OS types on my machine. Someone let me know if this fixes the original issue on a machine other than my own and I'll close, thanks!

roolebo commented 5 years ago

@jeffreywildman thank you for wrapping the work up. I think the issue can be closed as the latest virt-manager from the tap (1.5.1_2) has non-empty OS fields.

2018-08-20 20 01 25