Age | Commit message (Collapse) | Author | Files | Lines |
|
In the code we like to have the return type of function on one
line, followed by function name among with the first argument on
the second line, followed by the rest of function arguments, each
one on a separate line.
|
|
|
|
|
|
|
|
|
|
|
|
Currently, since we were using check_PROGRAMS in the Makefile
template, the test program build was postponed until 'make check'
was run. That's not optimal. Lets build (not run!) test program
in the 'make all' phase.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
One GVirConfigCapabilitiesGuestArch instance was created for each loop
iteration, but it was never unref'ed, causing a memory leak.
|
|
When the list of devices is empty (osinfo_list_get_length(devices) ==
0), the 'devices' object would be leaked.
|
|
This test is meant for adding CDROM, floppy and disk to a domain.
For now, each method has _file and _device variant, which are
tested for now.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
A GVirConfigDomainDiskDriver is created in
gvir_designer_domain_add_disk_full but it's never unref'ed. This commit
fixes that, including when an error occurs.
|
|
These cover 2 additional types of libvirt interfaces: usermode/SLIRP
networking and bridge.
|
|
|
|
When an unknown NIC type is passed to
gvir_designer_domain_add_interface_full(), 'ret' would be returned
uninitialized to the caller.
|
|
The caller of gvir_designer_domain_add_interface_network() owns a reference
on the returned GVirConfigDomainInterface instance, so it needs to be
released when no longer needed.
|
|
This fixes gcc warning about -Wmudflap on fedora 21
|
|
The latter is deprecated in favour of the former.
|
|
Our example utility is called virtxml. However with Cole's latest work,
where he introduced virt-xml binary for editing libvirt XML on CLI [1].
It would be better if our example is called virt-designer so we don't
confuse users.
1: https://www.redhat.com/archives/libvir-list/2014-January/msg01226.html
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
With libvirt-glib update, I've noticed a deprecation warning:
libvirt-designer-domain.c: In function 'gvir_designer_domain_add_disk_full':
libvirt-designer-domain.c:1610:9: error: 'gvir_config_domain_disk_set_driver_type' is deprecated (declared at /usr/include/libvirt-gconfig-1.0/libvirt-gconfig/libvirt-gconfig-domain-disk.h:145): Use 'gvir_config_domain_disk_set_driver_format' instead [-Werror=deprecated-declarations]
gvir_config_domain_disk_set_driver_type(disk, format);
^
cc1: all warnings being treated as errors
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
The one we were using does not work properly with clang, causing
the build process to try to use -f/-W options that are not
supported by clang.
|
|
|
|
This takes into account the devices specified by the deployment, if
this fails, consider the intersection of devices supported by
the OS and by the platform, and if this still fails, falls back
to a hardcoded hypervisor type -> video model mapping.
|
|
This setups smartcard redirection to the guest.
I'm not yet fully sure what users could want to tweak there
(there are various ways of setting up the smartcard redirection),
so this code may need to be made more flexible.
The current code is also not checking whether the hypervisor
supports this kind of redirection or not.
|
|
This will add an USB redirection channel to the VM. This can
be called multiple times to redirect several USB devices at once.
This will also add the needed controllers if they are not already
present in the VM.
The current code has 2 shortcomings:
- USB redirection is only supported with SPICE, but this is not
checked for
- the USB controller added to the VM are hardcoded, no check if they
are supported by the OS, hypervisor, ...
|
|
This makes use of the new gvir_designer_domain_get_supported_devices()
method.
|
|
When the user sets up the graphical framebuffer to use SPICE,
we now add automatically the SPICE agent channel if it's not present
already.
|
|
This allows to choose between SPICE, VNC or a local display, which
will go through SDL or 'desktop' depending on the hypervisor.
|
|
|
|
|
|
Add various devices/configuration to libvirt XML config when
creating the VM. This configuration is generic enough that it
should be useful on all created VMs, that's why no public API is
added to set them up. However, they are split in several helpers
that can easily be exported if needed.
What this commit adds is:
- clock
- input device (a tablet which will act as a mouse)
- a console (Boxes is adding one, not sure if it's required...)
For maximum flexibility, we may want to let applications decide whether
they want a console or not.
In addition to these devices, gvir_designer_domain_setup_guest()
now disables power management, and sets the domain to stop on
power off/crash, and to restart on reboots.
|
|
This fixes make distcheck
|
|
The current handling of bus types has some issues:
- it assumes that if the design uses a disk controller hanging off
a PCI bus, then it can use virtio, which is not true for
Windows for example unless an additional driver is installed
- it checks for "ide", "sata", "virtio" bus names, but they are not
used in libosinfo, and "sata is not mentioned in libosinfo.rng
- if the bus type could not determined, falling back to an IDE
bus should be a safe guess
This commit changes the code to guessing the best disk controller
to use, and then derives the bus type from it when needed.
One limitation of this approach is that we are currently limited to
virtio or IDE as libosinfo is not expressive enough for us to tell
if a given disk controller is IDE/SATA/SCSI/...
One way of making this distinction possible would be to attach the
PCI subclass to libosinfo device descriptions as this contains the
information we need.
|
|
This method gathers the list of devices supported by the hypervisor,
and intersects this list with the list of devices supported
by the OS, natively or using a driver (added with
gvir_designer_domain_add_driver()). The lists can be filtered if
needed.
This commit changes gvir_designer_domain_get_supported_disk_bus_types()
to make use of that new helper. This will slightly change its behaviour
as before this commit, it will consider any block devices from
GVirDesignerDomain::os, while after this commit, it will only
consider block devices from GVirDesignerDomain::os that are supported
by GVirDesignerDomain::platform.
This will cause a change for example for OSes that only list
virtio-block as a supported block device, such as Fedora as
described in libosinfo v0.2.6-9-g7a8deb4
|
|
They are useful to tell libvirt-designer about which drivers
are install/will be installed in the OS associated with the domain.
This in turns allows libvirt-designer code to use these devices
when it's making some guesses about what to enable/not enable
in the VM being created.
|
|
Minimum libvirt-gobject, libvirt-gconfig and libosinfo versions
are set in configure.ac, it's better not to duplicate them in
libvirt-designer.spec.in, it's too easy to get them out of sync.
|
|
Minimum libvirt-gconfig and libosinfo versions appear in both
README and configure.ac, which means they easily get out of sync.
This commit renames README to README.in so that we can substitute
the configure.ac version in the README file. This way they are always
in sync.
|
|
|
|
|
|
The bindtextdomain syntax-check macro is doing some dumb
checking: each file containing '\<main *(' must call
bindtextdomain. Even if it's mentioned inside a comment block,
which we do as of e71ad8e13e7.
|
|
The ABI of some methods was explicitly broken, so the soname
and symbol versions must all be incremented to reflect the
ABI incompatibility
|
|
The current way libtool versioning is calculated has a timebomb
when the package version number changes to 1.0.0, which will
cause the library soname to change. Adapt to the latest libvirt
macros for libtool versioning, which use an explicit variable
LIBVIRT_DESIGNER_SONUM setting for changing soname.
|
|
This mirrors disk_file/disk_device API so that it's possible to
add CDROMs and floppies to a GVirDesignerDomain.
This also adds the corresponding -C/-F options to virtxml
|
|
This is mostly (modified) copy&paste from libvirt-glib.
|
|
Add transfer annotation to argv parameter of library init functions.
|
|
|
|
|
|
|
|
After 46be1aed the signature of gvir_designer_domain_new has changed.
The OsinfoDb parameter appeared there. However, the test suite hasn't
been adapted.
|
|
If the _FORTIFY_SOURCE has been already defined, we unconditionally
redefine it, leaving us with warning/error thrown at compilation time.
|
|
Rather than trying to manually keep track of authors,
just auto-generate the list from GIT logs
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|