Open leonrinkel opened 4 years ago
In my case solved by switching to Ubuntu instead using 2nd PC with qemu software. I guess it is better to develop and test on one machine instead 2 of them.
Whoops, forgot to say
With ubuntu it is just installing
sudo apt-get install libvirt-dev
Nah, ubuntu working is kinda shitty actually.
Trying to get it working on windows....
Each time showing that virt.lib
not found (if specified in link_settings
.libraries
).
If not, it is showing LNK 2019 error (unresolved external symbol)
Hm. It's little bit confusing.
In windows without libraries settings it is returning a lot of
hypervisor-domain.obj : error LNK2001: unresolved external symbol virDomainGetID [C:\Users\admin\Desktop\libvirt-dev-xml\build\virt.vcxproj]
errors
Ok I've had a look into it and I didn't even got close to getting it to work... How did you install the Windows-equivalent of libvirt-dev
? Did you build it from source?
As I saw in Linux case it is adding header files in /usr/include (kind of) I’ve downloaded source files from libvirt’s github and added “include” folder to included_dirs (binding.gyp). Note: libvirt-common.h here is named as libvirt-common.h.in. I can create example repo if it will help
vcpkg and chocolatey doesn’t have libvirt-dev package As I remember Cygwin have only old package named as libvirt-devel
That’s not gonna work, the .h.in files are header files that need some preprocessing. Building libvirt will produce the actual header and library files. There is a guide on how to compile it from source on Windows, but that requires even more other dependencies and ugh ... I’ll have a look into it tomorrow.
Oh Didn’t knew about pre processing. Libvirt usage on windows is so problematic 😞
Ok I got it working with WSL. It's not 100% native Windows but it's way easier than anything else. Another easy workaround would be to use Docker.
Yeah, thought about building in wsl. Other case if user developing under windows and downloading package from npm/github that's not gonna build. In case of docker, yes there is will no troubles
I've make domiftune --current
work
But virsh-way realisation needed a g_malloc0_n
func from glib
(idk what is actually). Replaced it with malloc and it is seems work, but not sure is it good approach
How you looking on requiring linking of glib-2.0 for build ?
@leonrinkel Tested to develop inside WSL. Looks terrible. No autcomplete, no "go to definition", included paths are ignored
After some random clicks make it work. Oh that's feel. UI not laggin, switch between windows are so easy :) Time to develop some features....
Guys I have installed QEMU on windows and now planning to try this package via WSL on the same system. can you guide me on how to do that? Is it even possible or not?
I have tried installing libvirt on WSL but not able to run its service (/var/run/libvirtd.pid: No such file or directory
). Though libvirt-dev is installed.
Please suggest how to proceed further.
Hi, Tested xml thing. I guess it is works as expected. I think i can create domain autostart method. Also added setVcpu method to domain builder, i'm collecting PR request
By the way i'm looking for building and running package on windows but can't get how to link libvirt package to node-gyp :(
Tested VNC configuration. Fuck wow, it is actually simpliest and most usefull solution to manage VMs with typescript. vmngr/libvirt already better than any of existing bindings lmao
Originally posted by @libvirtadept in https://github.com/vmngr/libvirt/pull/3#issuecomment-558607434