Closed leonrinkel closed 4 years ago
Hello, @leonrinkel Actually seems good I can review it in more detail little bit later But main idea is realized, wow
Now it is very simple to create domain without a lot of XML things or hand-writed keys in console 😃
I will have a lot of time on weekend to test various scenaries of using this new things
Sorry for delay Returning to testing I've got some work tasks. Now they are done and can test anything.
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
Leon, what do you think about domain editiing ? Currently possible to re-define (using domainDefineXML) with another config (but need to uuid or id be the same)
Leon, what do you think about domain editiing ? Currently possible to re-define (using domainDefineXML) with another config (but need to uuid or id be the same)
Good point. In addition to domainDescToXml
we'll need something like xmlToDomainDesc
, as well as Builder.listDisks()
, Builder.removeDisk()
or even Builder.editDisk()
and so on. I'll look into parsing XML rn. That would also allow using existing domains as templates and I think that would be pretty awesome.
Hi @libvirtadept, I've created a PR for us to look at what I've came up with regarding your issue #2. I wanted to keep the description interfaces as close as possible to the Libvirt XML schemas, so that the official documentation on the schemas also applies to the interfaces. Also this makes it pretty easy and straightforward for people who are already familiar with the XML schemas. The interfaces etc. are not yet complete though.
The following snippet basically sums up what I intended. The resulting XML can then be used for
Hypervisor.domainCreate
/.domainDefine
. https://github.com/vmngr/libvirt/blob/5878a586785b43913f57318db1291f94a8bcd97d/examples/builder.ts#L43-L66