The virtiofs project started off using "virtio-fs" but later switched to
the "virtiofs" spelling because it matches the spelling of the mount -t
virtiofs command-line. Update the kbase article with the new spelling so
it matches the virtiofs website.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
A number of legacy issues make the virtiofs kbase article hard to
understand. Most users don't need to configure NUMA or a memory backend
other than memfd. Move that information to the bottom of the article so
the recommended syntax is most prominent.
Suggested-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Since we no longer use '-device sga' we can stop probing for this device
in our capabilities code.
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
SeaBIOS >= 1.11 has built-in support for outputting to the serial
console when QEMU sets -M graphics=off. Our minimum QEMU version
is 2.11.0, which bundled SeaBIOS 1.11. Thus we have no need to
use '-device sga' anymore.
This change results in a slight layout difference for option ROMs
in memory, however, it does not affect the migration data stream
format on the wire and once migration is complete the target QEMU
memory layout for ROMs matches the source QEMU once again.
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The BIOS serial console output is currently implemented using the QEMU
'sga' device, but this is going to change in future patches, so the
error message ought to be more generically phrased.
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The <bios useserial='yes'> config results in use of the '-device sga'
QEMU options. This in turn causes QEMU go load the sgabios.bin option
ROM, which contains x86 machine code. This cannot work on non-x86
arches, thus we should block the bad config.
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Currently translated at 49.4% (5118 of 10353 strings)
Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ko/
Co-authored-by: jason lee <ppark5237@gmail.com>
Signed-off-by: jason lee <ppark5237@gmail.com>
When validation like deviceValidateCallback fails, the vm will not be
set and so the call to virDomainObjListRemove will be passed a NULL
pointer causing a segfault. To prevent this add a check that the vm is
defined before calling out to virDomainObjListRemove.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: William Douglas <william.douglas@intel.com>
Enable the handler function to find and open the console character
device that will be used by the console API.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: William Douglas <william.douglas@intel.com>
With the console and serial device handling fully functional, allow
the required device types to be specified in the domain
configuration.
The configuration only supports a single serial or console device.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: William Douglas <william.douglas@intel.com>
Add functionality to allow libvirt console to connect to the
cloud-hypervisor created PTY associated with a VM by updating the
domain with console path information. This has to be run after the VM
is created by cloud-hypervisor.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: William Douglas <william.douglas@intel.com>
Add function to build the the json structure to configure a PTY in
cloud-hypervisor.
The devices themselves still aren't allowed in configurations yet
though.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: William Douglas <william.douglas@intel.com>
The virCHMonitorGet function isn't going to be used outside of the
monitor, so remove the initial declaration and define the function
to be static.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: William Douglas <william.douglas@intel.com>
Now that virCHMonitorGet is capable of handling data returned by the
cloud-hypervisor API, make use of this via virCHMonitorGetInfo to call
into the vm.info endpoint.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: William Douglas <william.douglas@intel.com>
The virCHMonitorGet function needed to be able to return data from the
hypervisor. This functionality is needed in order for the driver to
support PTY enablement and getting details about the VM state.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: William Douglas <william.douglas@intel.com>
Add and initialize a virChrdevs to the _virCHDomainObjPrivate
structure in order to eventually track the consoles in use by a domain.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: William Douglas <william.douglas@intel.com>
There are important security implications when we'd misprobe those
images. This commit reinstates the tests removed by commit 979d1ba3ae
since 'qemu-img' refused to format them.
With the new testing approach with stored images we won't run into that
problem.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Improve the error message and abort the test. Continuing here is not
desired as without chdiring into the appropriate directory the test
would fail anyways and worse could attempt stat-ing random files on the
host.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
We have plenty of other work to do in this test. Skip only the real
image testing case when we can't find qemu-img or it failed to format
the image.
This allows us to also remove the last global variable in the test and
move the creation and cleanup of the images closer to the actual test.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Prepare the test runner for skipping individual tests if images can't be
formatted rather than the whole virstoragetest.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
All supported qemu versions have the parameter, so we don't need to
check. This allows us to simplify the code used for formating real
images for virstoragetest.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Create it with the appropriate backing file path rather than using
another instance of 'qemu-img rebase'.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
For testing of real images formatted by 'qemu-img' it's now sufficient
to format them once without the need to rewrtie them since we use the
real images only for testing of one scenario.
This allows us to also remove most of the global variables holding the
path to the images which was necessary when they were being rewritten.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
We have 3 test cases for this currently:
1) "qcow2->raw"
1.1) VIR_STORAGE_FILE_QCOW2 as top level format
1.2) VIR_STORAGE_FILE_AUTO as top level format
2) "wrap->qcow2->raw" whith just VIR_STORAGE_FILE_QCOW2
This patch adds also testing of VIR_STORAGE_FILE_AUTO for case 2) and
removes both 1) subcases as they are being actually tested as part of
2).
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Use prepared test images instead to simplify and clarify the code
instead of rewriting existing images multiple times.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
We've already added a 'raw' file to the example image directory so we
can use that instead of formatting one.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Similarly to previous ones, this one doesn't need to be created by
qemu-img in order for the test to make sense.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
The QED format isn't really being developed any more. Use a
pre-formatted image to test the existing code. In this instance we
switch to using a relative backing path for simplicity.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
We don't need a special directory for the tests. Reuse the directory
holding the data for the virstoragetest.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Provide the images for the self and mutual backing image loop cases in
the repository rather than formatting them with qemu-img.
This makes the code more readable and also decouples the backing chain
tests from each other.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Rather than using 'qemu-img' and rewriting the chain we can use fake
data and few empty files to ensure the same level of coverage. This is
possible since we've already tested that the metadata parsing from files
works properly and the only thing we are testing here is that the
symlink resolution works properly.
Additionally after the refactor of 'virstoragetest' is complete
additional tests on real data will be added.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Passing in both "chain*" and "chain*->path" is pointless. Use only the
full struct which we can use to infer the rest.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>