Compare commits

..

1 Commits

Author SHA1 Message Date
antonios-f
9ecbd4c326 Merge branch 'spice-vnc-default-audio-backend' into 'master'
src/qemu/qemu_domain.c: Fix overriding audioBackend in qemuDomainDefSuggestDefaultAudioBackend

See merge request libvirt/libvirt!271
2024-03-28 21:27:21 +00:00
162 changed files with 6297 additions and 6457 deletions

View File

@ -8,23 +8,13 @@ the changes introduced by each of them.
For a more fine-grained view, use the `git log`_.
v10.3.0 (unreleased)
v10.2.0 (unreleased)
====================
* **Security**
* **Removed features**
* **New features**
* **Improvements**
* **Bug fixes**
v10.2.0 (2024-04-02)
====================
* **New features**
* ch: Basic save and restore support for ch driver
@ -53,6 +43,8 @@ v10.2.0 (2024-04-02)
restarting the guest. Available via the ``virDomainGraphicsReload`` API
and the ``domdisplay-reload`` virsh command.
* **Improvements**
* **Bug fixes**
* qemu: Fix migration from libvirt older than 9.10.0 when vmx is enabled

View File

@ -1386,7 +1386,7 @@ exclude_file_name_regexp--sc_prohibit_close = \
(\.p[yl]$$|\.spec\.in$$|^docs/|^(src/util/vir(file|event)\.c|src/libvirt-stream\.c|tests/(vir.+mock\.c|commandhelper\.c|qemusecuritymock\.c)|tools/nss/libvirt_nss_(leases|macs)\.c)|tools/virt-qemu-qmp-proxy$$)
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
((^tests/(nodedevmdevctl|viracpi|virhostcpu|virpcitest|virstoragetest|qemunbdkit|virshtest)data/|docs/js/.*\.js|docs/fonts/.*\.woff|\.diff|tests/virconfdata/no-newline\.conf$$)|\.bin)
((^tests/(nodedevmdevctl|viracpi|virhostcpu|virpcitest|virstoragetest|qemunbdkit)data/|docs/js/.*\.js|docs/fonts/.*\.woff|\.diff|tests/virconfdata/no-newline\.conf$$)|\.bin)
exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
(^(src/(util/(vircommand|virdaemon)|lxc/lxc_controller)|tests/testutils)\.c$$)
@ -1437,7 +1437,7 @@ exclude_file_name_regexp--sc_require_config_h_first = \
^(examples/|tools/virsh-edit\.c$$|tests/virmockstathelpers\.c$$|scripts/rpcgen/tests/test_demo\.c$$)
exclude_file_name_regexp--sc_trailing_blank = \
/sysinfodata/.*\.data|/virhostcpudata/.*\.cpuinfo|tests/virshtestdata/.*$$
/sysinfodata/.*\.data|/virhostcpudata/.*\.cpuinfo$$
exclude_file_name_regexp--sc_unmarked_diagnostics = \
^(scripts/apibuild.py|tests/virt-aa-helper-test|docs/js/.*\.js)$$
@ -1466,7 +1466,7 @@ exclude_file_name_regexp--sc_prohibit_mixed_case_abbreviations = \
^src/(vbox/vbox_CAPI.*.h|esx/esx_vi.(c|h)|esx/esx_storage_backend_iscsi.c)$$
exclude_file_name_regexp--sc_prohibit_empty_first_line = \
^tests/vmwareverdata/fusion-5.0.3.txt|scripts/rpcgen/tests/demo\.c|^tests/virshtestdata/.*$$
^tests/vmwareverdata/fusion-5.0.3.txt|scripts/rpcgen/tests/demo\.c$$
exclude_file_name_regexp--sc_prohibit_useless_translation = \
^tests/virpolkittest.c

View File

@ -4390,14 +4390,6 @@ or:
starting the guest or hot-plugging the device and
``virNodeDeviceReAttach`` (or ``virsh nodedev-reattach``) after hot-unplug
or stopping the guest.
:since:`Since 10.3.0` an optional ``display`` attribute may be used to
enable using a vgpu device as a display device for the guest. Supported
values are either ``on`` or ``off`` (default). There is also an optional
``ramfb`` attribute with values of either ``on`` or ``off`` (default).
When enabled, the ``ramfb`` attribute provides a memory framebuffer device
to the guest. This framebuffer allows the vgpu to be used as a boot display
before the gpu driver is loaded within the guest. ``ramfb`` requires the
``display`` attribute to be set to ``on``.
``scsi``
For SCSI devices, user is responsible to make sure the device is not used
by host. If supported by the hypervisor and OS, the optional ``sgio`` (
@ -5608,7 +5600,6 @@ ne2k_pci pcnet rtl8139 e1000 virtio. :since:`Since 5.2.0`,
``virtio-transitional`` and ``virtio-non-transitional`` values are supported.
See `Virtio transitional devices`_ for more details.
:since:`Since 9.3.0` igb is also supported.
:since:`Since 10.3.0` usb-net is supported.
Setting NIC driver-specific options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -113,28 +113,6 @@ The following variables are supported:
this requires guest agent with support for time synchronization
running in the guest. By default, this functionality is turned off.
- PERSISTENT_ONLY=default
Defines what type of guest virtual machine ON_SHUTDOWN action is applied to
* default
This implements the already existing default behavior.
If ON_SHUTDOWN action is shutdown, transient and persistent guest virtual
machines are asked to shutdown.
If ON_SHUTDOWN action is suspend, only persistent guest virtual machines
are asked to suspend.
* true
ON_SHUTDOWN action is executed only on persistent guest virtual machines.
Transient guest virtual machines are not affected.
* false
ON_SHUTDOWN action is executed on persistent and transient guest virtual
machines.
BUGS
====

View File

@ -326,6 +326,8 @@ Will change current directory to *directory*. The default directory
for the ``cd`` command is the home directory or, if there is no *HOME*
variable in the environment, the root directory.
This command is only available in interactive mode.
pwd
---
@ -7671,11 +7673,9 @@ If *--parent* is specified, add a column to the output table giving
the name of the parent of each snapshot. If *--roots* is specified,
the list will be filtered to just snapshots that have no parents.
If *--tree* is specified, the output will be in a tree format, listing
just snapshot names. These three options are mutually exclusive.
If *--name* is specified only the snapshot name is printed optionally
followed by a tab-separated name of the parent snapshot if *--parent* is used
as well. This option is mutually exclusive with *--tree*.
just snapshot names. These three options are mutually exclusive. If
*--name* is specified only the snapshot name is printed. This option is
mutually exclusive with *--tree*.
If *--from* is provided, filter the list to snapshots which are
children of the given ``snapshot``; or if *--current* is provided,
@ -7989,11 +7989,8 @@ the name of the parent of each checkpoint. If *--roots* is
specified, the list will be filtered to just checkpoints that have no
parents. If *--tree* is specified, the output will be in a tree
format, listing just checkpoint names. These three options are
mutually exclusive.
If *--name* is specified only the checkpoint name is printed optionally
followed by a tab-separated name of the parent checkpoint if *--parent* is used
as well. This option is mutually exclusive with *--tree*.
mutually exclusive. If *--name* is specified only the checkpoint name
is printed. This option is mutually exclusive with *--tree*.
If *--from* is provided, filter the list to checkpoints which are
children of the given ``checkpoint``. When used in isolation or with

View File

@ -1,6 +1,6 @@
project(
'libvirt', 'c',
version: '10.3.0',
version: '10.2.0',
license: 'LGPLv2+',
meson_version: '>= 0.56.0',
default_options: [

View File

@ -18,7 +18,7 @@ msgstr ""
"Project-Id-Version: libvirt 6.0.0\n"
"Report-Msgid-Bugs-To: https://libvirt.org/bugs.html\n"
"POT-Creation-Date: 2024-03-22 09:54+0000\n"
"PO-Revision-Date: 2024-03-29 14:36+0000\n"
"PO-Revision-Date: 2024-03-27 17:36+0000\n"
"Last-Translator: 김인수 <simmon@nplob.com>\n"
"Language-Team: Korean <https://translate.fedoraproject.org/projects/libvirt/"
"libvirt/ko/>\n"
@ -5758,9 +5758,6 @@ msgid ""
"virtualization is enabled in the host BIOS, and host configuration is setup "
"to load the mshv modules."
msgstr ""
"도메인은 MSHV 장치가 필요하지만, 사용 할 수 없습니다. 가상화가 호스트 "
"바이오스에서 활성화 되어 있는지 점검하고, 호스트 구성이 mshv 모듈을 "
"적재하도록 설정(setup)되었습니다."
msgid "Domain requires at least 1 vCPU"
msgstr "도메인에는 최소 1개의 vCPU가 필요합니다"
@ -7706,7 +7703,7 @@ msgstr "도메인 이미지 파일 '%1$s'을(를) 열지 못했습니다"
#, c-format
msgid "Failed to open domain save file '%1$s'"
msgstr "도메인 저장 파일 '%1$s'를 여는 데 실패했습니다"
msgstr ""
#, c-format
msgid "Failed to open file '%1$s'"
@ -8054,7 +8051,7 @@ msgstr "도메인 '%1$s'에 대한 관리되는 저장 이미지를 제거하지
#, c-format
msgid "Failed to remove managed save path '%1$s'"
msgstr "관리된 저장 경로 '%1$s'룰 제거하는 데 실패했습니다"
msgstr ""
#, c-format
msgid "Failed to remove storage volume '%1$s'(%2$s)"
@ -8198,7 +8195,7 @@ msgid "Failed to save VM settings"
msgstr "VM 설정을 저장하는데 실패함"
msgid "Failed to save domain"
msgstr "도메인 저장에 실패했습니다"
msgstr ""
#, c-format
msgid "Failed to save domain '%1$d' with libxenlight"
@ -8392,7 +8389,7 @@ msgid "Failed to shutdown domain '%1$s'"
msgstr "도메인 '%1$s'를 종료하지 못했습니다"
msgid "Failed to shutoff after domain save"
msgstr "도메인 저장 후 종료하는 데 실패했습니다"
msgstr ""
#, c-format
msgid "Failed to soft reset VM '%1$s'. Destroying VM"
@ -8616,7 +8613,7 @@ msgid "Failed to write '%1$s'"
msgstr "'%1$s' 쓰기에 실패"
msgid "Failed to write file header"
msgstr "파일 헤더를 쓰는 데 실패했습니다"
msgstr ""
msgid "Failed to write pixel data"
msgstr "픽셀 데이터 쓰기 실패했습니다"
@ -8637,7 +8634,7 @@ msgid "Failed to write vmx file '%1$s'"
msgstr "vmx 파일 '%1$s' 쓰기에 실패"
msgid "Failed to write xml definition"
msgstr "xml 정의를 작성하는 데 실패했습니다"
msgstr ""
msgid "Failed to write xml description"
msgstr "xml 설명을 쓰지 못했습니다"
@ -8951,16 +8948,16 @@ msgid "Get or set perf event"
msgstr "perf 이벤트 가져오기 또는 설정"
msgid "Get or set the current blkio parameters for a guest domain."
msgstr "게스트 도메인을 위한 현재 blkio 매개변수를 가져오거나 설정합니다."
msgstr ""
msgid "Get or set the current memory parameters for a guest domain."
msgstr "게스트 도메인을 위한 현재 메모리 매개변수를 가져오거나 설정합니다."
msgstr ""
msgid "Get or set the current numa parameters for a guest domain."
msgstr "게스트 도메인을 위한 현재 numa 매개변수를 가져오거나 설정합니다."
msgstr ""
msgid "Get or set the current perf events for a guest domain."
msgstr "게스트 도메인을 위한 현재 perf 사건을 가져오거나 설정합니다."
msgstr ""
msgid "Get or set the current snapshot"
msgstr "현재 순간찍기를 가져오거나 설정합니다"
@ -11793,8 +11790,6 @@ msgid ""
"NUMA mode, one of strict, preferred and interleave or a number from the "
"virDomainNumatuneMemMode enum"
msgstr ""
"NUMA 모드는 엄격, 선호 및 인터리브 중 하나 또는 virDomainNumatuneMemMode "
"열거형의 숫자로 구성되어 있습니다"
#, c-format
msgid "NUMA node %1$d is not available"
@ -13625,7 +13620,7 @@ msgid "Relative backing during copy not supported yet"
msgstr "복사 중에 상대적인 백업은 아직 지원하지 않습니다"
msgid "Reload domain's graphics display certificates"
msgstr "도메인의 그래픽 표시 인증서를 재적재합니다"
msgstr ""
#, c-format
msgid "Remote command terminated with non-zero code: %1$d"
@ -13809,10 +13804,10 @@ msgid "Retrieve identity details about <client> from <server>"
msgstr "<server>에서 <client>에 대한 ID 세부 정보 검색"
msgid "Retrieve server's client-related configuration limits"
msgstr "서버의 클라이언트-관련 구성 제한 검색"
msgstr ""
msgid "Retrieve threadpool attributes from a server."
msgstr "서버에서 쓰레드 풀 속성을 검색합니다."
msgstr ""
msgid "Return pool info in bytes"
msgstr "바이트 단위로 풀 정보 반환"
@ -14284,7 +14279,7 @@ msgstr ""
"머신 유형과 호환되지 않습니다"
msgid "Serial only works in UNIX/PTY modes"
msgstr "시리얼은 UNIX/PTY 방식에서 동작합니다"
msgstr ""
#, c-format
msgid "Serial port index %1$d out of [0..3] range"
@ -18845,7 +18840,7 @@ msgid "Unexpectedly got a network port without a plug"
msgstr "예기치 않게 플러그가 없는 네트워크 포트가 있음"
msgid "Unix Socket backend is not supported by this version of ch."
msgstr "유닉스 소켓 백엔드는 이 채널의 버전에서 지원되지 않습니다."
msgstr ""
msgid "Unix file descriptors not supported on this platform"
msgstr "이 기술환경에서 지원되지 않는 유닉스 파일 설명자"
@ -22312,10 +22307,10 @@ msgid "cannot revert snapshot of running domain"
msgstr "동작 중인 도메인의 순간찍기를 되돌릴 수 없습니다"
msgid "cannot save domain with host devices"
msgstr "호스트 장치에 도메인을 저장 할 수 없습니다"
msgstr ""
msgid "cannot save domain with network interfaces"
msgstr "네트워크 연결장치에 도메인을 저장 할 수 없습니다"
msgstr ""
#, c-format
msgid "cannot save file '%1$s'"
@ -22866,10 +22861,10 @@ msgid "command '%1$s' requires <%2$s> option"
msgstr "'%1$s' 명령은 <%2$s> 옵션이 필요함"
msgid "command groups is NULL run vshInit before reloading"
msgstr "명령 그룹은 NULL이고 다시 적재하기 전에 vshInit를 실행하세요"
msgstr ""
msgid "command groups must be non-NULL"
msgstr "명령 그룹은 비-NULL이어야 합니다"
msgstr ""
#, c-format
msgid "command is already running as pid %1$lld"
@ -26323,7 +26318,7 @@ msgid "failed to read AppArmor template"
msgstr "AppArmor 템플릿을 읽는데 실패"
msgid "failed to read CHSaveXMLHeader header"
msgstr "CHSaveXMLHeader 헤더를 읽는 데 실패했습니다"
msgstr ""
msgid "failed to read XML"
msgstr "XML을 읽는 것을 실패"
@ -26446,19 +26441,19 @@ msgid "failed to resolve symlink %1$s: %2$s"
msgstr "심볼릭 링크 %1$s을(를) 확인하지 못했습니다: %2$s"
msgid "failed to restore domain"
msgstr "도메인을 복구하는 데 실패했습니다"
msgstr ""
msgid "failed to restore domain from managed save"
msgstr "관리된 저장에서 도메인을 복구하는 데 실패했습니다"
msgstr ""
msgid "failed to resume domain"
msgstr "도메인을 재개하는 것에 실패"
msgid "failed to resume domain after restore"
msgstr "복구 후 도메인을 재개하는 데 실패했습니다"
msgstr ""
msgid "failed to resume domain after restore from managed save"
msgstr "관리된 저장에서 복구 후 도메인을 재개하는 데 실패했습니다"
msgstr ""
msgid "failed to retrieve XML"
msgstr "XML을 검색하지 못했습니다"
@ -26577,7 +26572,7 @@ msgid "failed to suspend domain"
msgstr "도메인을 일시 중단하지 못했습니다"
msgid "failed to suspend domain before saving"
msgstr "저장하기 전에 도메인을 중지하는 데 실패했습니다"
msgstr ""
msgid "failed to take screenshot"
msgstr "스크린샷을 찍지 못했습니다"
@ -27264,7 +27259,7 @@ msgid "graphics device is needed for attribute value 'display=on' in <hostdev>"
msgstr "<hostdev>의 속성 값 'display=on'에 그래픽 장치가 필요합니다"
msgid "graphics display type"
msgstr "그래픽 표시 유형"
msgstr ""
msgid ""
"graphics type 'egl-headless' is only supported with one of: 'vnc', 'spice' "
@ -27494,7 +27489,7 @@ msgid "hostdev does not have an alias"
msgstr "hostdev에는 단축명령어(alias)가 없습니다"
msgid "hostdev interface missing hostdev data"
msgstr "hostdev 연결장치에 hostdev 자료가 없습니다"
msgstr "hostdev 인터페이스에 hostdev 데이터가 없습니다"
#, c-format
msgid "hostdev invalid secret type '%1$s'"
@ -27610,8 +27605,7 @@ msgstr "하이퍼바이저 기능 자동 감지 재정의"
msgid ""
"hypervisor provided conflicting CPU data: feature '%1$s' is both enabled and "
"disabled at the same time"
msgstr "하이퍼바이저는 충돌하는 CPU 자료를 제공합니다: 특성 '%1$s'가 동시에 활성화 "
"및 비활성화 되었습니다"
msgstr ""
msgid "i - turn off validation and try to redefine again"
msgstr "i - 유효성 검사를 끄고 다시 재정의하십시오"
@ -29616,7 +29610,7 @@ msgid "manipulate authorized SSH keys file for given user (via agent)"
msgstr "지정된 사용자에 대한 승인된 SSH 키 파일 조작(에이전트를 통해)"
msgid "maplen must be non-negative"
msgstr "maplen는 비-음수이어야 합니다"
msgstr ""
msgid "mark inactive domains with managed save state"
msgstr "관리되는 저장 상태로 비활성 도메인 표시"
@ -29654,7 +29648,7 @@ msgid "maxcells > REMOTE_NODE_MAX_CELLS"
msgstr "maxcells > REMOTE_NODE_MAX_CELLS"
msgid "maxcells must be non-negative"
msgstr "maxcells은 비-음수이어야 합니다"
msgstr ""
msgid "maxerrors too large"
msgstr "maxerrors가 너무 큽니다"
@ -29663,7 +29657,7 @@ msgid "maxids > REMOTE_DOMAIN_LIST_MAX"
msgstr "최대 ID > REMOTE_DOMAIN_LIST_MAX"
msgid "maxids must be non-negative"
msgstr "maxids는 비-음수이어야 합니다"
msgstr ""
msgid "maximum"
msgstr "최대"
@ -29704,7 +29698,7 @@ msgid "maxinfo > REMOTE_VCPUINFO_MAX"
msgstr "maxinfo > REMOTE_VCPUINFO_MAX"
msgid "maxinfo must be non-negative"
msgstr "maxinfo는 비-음수이어야 합니다"
msgstr ""
msgid "maxnames > REMOTE_DOMAIN_LIST_MAX"
msgstr "최대 이름 > REMOTE_DOMAIN_LIST_MAX"
@ -29734,13 +29728,13 @@ msgid "maxnames > REMOTE_STORAGE_VOL_LIST_MAX"
msgstr "최대 이름 > REMOTE_STORAGE_VOL_LIST_MAX"
msgid "maxnames must be non-negative"
msgstr "maxnames는 비-음수이어야 합니다"
msgstr ""
msgid "maxuuids > REMOTE_SECRET_LIST_MAX"
msgstr "최대 ID > REMOTE_SECRET_LIST_MAX"
msgid "maxuuids must be non-negative"
msgstr "maxuuids는 비-음수이어야 합니다"
msgstr ""
msgid "mdev attribute missing name or value"
msgstr "mdev 속성에 이름 또는 값이 없습니다"
@ -31019,10 +31013,10 @@ msgid "msi option is only supported with a server"
msgstr "msi 옵션은 서버에서만 지원됩니다"
msgid "mtp is not supported with this QEMU binary"
msgstr "mtp는 이 QEMU 바이너리를 지원하지 않습니다"
msgstr ""
msgid "mtp only supports passthrough accessmode"
msgstr "mtp는 통과 접근방식(passthrough accessmode)만 지원합니다"
msgstr ""
#, c-format
msgid ""
@ -31156,7 +31150,7 @@ msgid "ncpumaps > REMOTE_VCPUINFO_MAX"
msgstr "ncpumaps > REMOTE_VCPUINFO_MAX"
msgid "ncpumaps must be non-negative"
msgstr "ncpumaps는 비-음수이어야 합니다"
msgstr ""
#, c-format
msgid "ncpus count exceeds maximum: %1$u > %2$u"
@ -32149,7 +32143,7 @@ msgid "nparams in %1$s must be equal to %2$d"
msgstr "%1$s의 nparams는 %2$d와 같아야 합니다"
msgid "nparams must be non-negative"
msgstr "nparams는 비-음수이어야 합니다"
msgstr ""
msgid "nparams too large"
msgstr "nparams가 너무 큽니다"
@ -32370,7 +32364,7 @@ msgid "only can resume paused domain"
msgstr "일시중지된 도메인만 재개할 수 있습니다"
msgid "only can save running/paused domain"
msgstr "동작하는/중지된 도메인만 저장 할 수 있습니다"
msgstr ""
msgid "only can shutdown running/paused domain"
msgstr "실행/일시 중지된 도메인만 종료할 수 있습니다"
@ -32608,7 +32602,7 @@ msgid "output an XML string for the hypervisor sysinfo, if available"
msgstr "사용 가능한 경우 하이퍼바이저 sysinfo에 대한 XML 문자열을 출력합니다"
msgid "output help for each command"
msgstr "개별 명령을 위한 도움말 출력"
msgstr ""
msgid "output the list of options which are missing completers"
msgstr "완성자가 누락된 옵션(선택)의 목록을 출력합니다"
@ -34128,7 +34122,7 @@ msgid "save image is incomplete"
msgstr "이미지 저장이 불완전합니다"
msgid "save image magic is incorrect"
msgstr "저장 이미지 마법이 올바르지 않습니다"
msgstr ""
msgid "saved"
msgstr "저장됨"
@ -36033,7 +36027,7 @@ msgstr "이벤트의 유형 불일치(실제 0x%1$x, 예상 0x%2$x)"
#, c-format
msgid "type must be less than %1$d"
msgstr "유형은 %1$d 보다 작아야만 합니다"
msgstr ""
msgid "type of source (block|file|network)"
msgstr "원천 유형(블록|파일|네트워크)"
@ -38393,7 +38387,7 @@ msgstr "virVMXContext에 parseFileName 함수 세트가 없습니다"
#, c-format
msgid "virt type '%1$s' is not supported"
msgstr "가상 유형 '%1$s' 이 지원되지 않습니다"
msgstr ""
#, c-format
msgid ""

View File

@ -6306,16 +6306,6 @@ virDomainHostdevDefParseXMLSubsys(xmlNodePtr node,
VIR_XML_PROP_NONE,
&mdevsrc->ramfb) < 0)
return -1;
} else if (def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) {
if (virXMLPropTristateSwitch(node, "display",
VIR_XML_PROP_NONE,
&pcisrc->display) < 0)
return -1;
if (virXMLPropTristateSwitch(node, "ramfb",
VIR_XML_PROP_NONE,
&pcisrc->ramfb) < 0)
return -1;
}
switch (def->source.subsys.type) {
@ -26261,7 +26251,6 @@ virDomainHostdevDefFormat(virBuffer *buf,
const char *mode = virDomainHostdevModeTypeToString(def->mode);
virDomainHostdevSubsysSCSI *scsisrc = &def->source.subsys.u.scsi;
virDomainHostdevSubsysMediatedDev *mdevsrc = &def->source.subsys.u.mdev;
virDomainHostdevSubsysPCI *pcisrc = &def->source.subsys.u.pci;
virDomainHostdevSubsysSCSIVHost *scsihostsrc = &def->source.subsys.u.scsi_host;
const char *type;
@ -26330,14 +26319,7 @@ virDomainHostdevDefFormat(virBuffer *buf,
virBufferAsprintf(buf, " ramfb='%s'",
virTristateSwitchTypeToString(mdevsrc->ramfb));
}
if (def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) {
if (pcisrc->display != VIR_TRISTATE_SWITCH_ABSENT)
virBufferAsprintf(buf, " display='%s'",
virTristateSwitchTypeToString(pcisrc->display));
if (pcisrc->ramfb != VIR_TRISTATE_SWITCH_ABSENT)
virBufferAsprintf(buf, " ramfb='%s'",
virTristateSwitchTypeToString(pcisrc->ramfb));
}
}
virBufferAddLit(buf, ">\n");
virBufferAdjustIndent(buf, 2);
@ -28695,14 +28677,7 @@ virDomainUSBDeviceDefForeach(virDomainDef *def,
}
}
/* usb-net */
for (i = 0; i < def->nnets; i++) {
virDomainNetDef *net = def->nets[i];
if (net->model == VIR_DOMAIN_NET_MODEL_USB_NET) {
if (iter(&net->info, opaque) < 0)
return -1;
}
}
/* TODO: add def->nets here when libvirt starts supporting usb-net */
/* usb-ccid */
for (i = 0; i < def->ncontrollers; i++) {

View File

@ -236,8 +236,6 @@ struct _virDomainHostdevSubsysUSB {
struct _virDomainHostdevSubsysPCI {
virPCIDeviceAddress addr; /* host address */
virDeviceHostdevPCIDriverInfo driver;
virTristateSwitch display;
virTristateSwitch ramfb;
virBitmap *origstates;
};

View File

@ -1291,20 +1291,15 @@ virDomainDefHostdevValidate(const virDomainDef *def)
}
}
if (dev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS) {
virTristateSwitch *ramfbsetting = NULL;
if (dev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV)
ramfbsetting = &dev->source.subsys.u.mdev.ramfb;
else if (dev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI)
ramfbsetting = &dev->source.subsys.u.pci.ramfb;
if (ramfbsetting && *ramfbsetting == VIR_TRISTATE_SWITCH_ON) {
if (ramfbEnabled) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Only one vgpu device can have 'ramfb' enabled"));
return -1;
}
ramfbEnabled = true;
if (dev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
dev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV &&
dev->source.subsys.u.mdev.ramfb == VIR_TRISTATE_SWITCH_ON) {
if (ramfbEnabled) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Only one vgpu device can have 'ramfb' enabled"));
return -1;
}
ramfbEnabled = true;
}
}

View File

@ -2894,9 +2894,9 @@ int
virNodeDeviceGetSCSITargetCaps(const char *sysfsPath,
virNodeDevCapSCSITarget *scsi_target)
{
int ret = -1;
g_autofree char *dir = NULL;
g_autofree char *rport = NULL;
g_autofree char *wwpn = NULL;
VIR_DEBUG("Checking if '%s' is an FC remote port", scsi_target->name);
@ -2906,21 +2906,28 @@ virNodeDeviceGetSCSITargetCaps(const char *sysfsPath,
rport = g_path_get_basename(dir);
if (!virFCIsCapableRport(rport))
return -1;
if (virFCReadRportValue(rport, "port_name",
&wwpn) < 0) {
VIR_WARN("Failed to read port_name for '%s'", rport);
return -1;
}
goto cleanup;
VIR_FREE(scsi_target->rport);
scsi_target->rport = g_steal_pointer(&rport);
VIR_FREE(scsi_target->wwpn);
scsi_target->wwpn = g_steal_pointer(&wwpn);
if (virFCReadRportValue(scsi_target->rport, "port_name",
&scsi_target->wwpn) < 0) {
VIR_WARN("Failed to read port_name for '%s'", scsi_target->rport);
goto cleanup;
}
scsi_target->flags |= VIR_NODE_DEV_CAP_FLAG_FC_RPORT;
return 0;
ret = 0;
cleanup:
if (ret < 0) {
VIR_FREE(scsi_target->rport);
VIR_FREE(scsi_target->wwpn);
scsi_target->flags &= ~VIR_NODE_DEV_CAP_FLAG_FC_RPORT;
}
return ret;
}

View File

@ -6267,7 +6267,6 @@
<ref name="pciaddress"/>
</element>
</element>
<ref name="hostdevsubsysvfiodisplay"/>
</interleave>
</define>
@ -6387,19 +6386,6 @@
</element>
</define>
<define name="hostdevsubsysvfiodisplay">
<optional>
<attribute name="ramfb">
<ref name="virOnOff"/>
</attribute>
</optional>
<optional>
<attribute name="display">
<ref name="virOnOff"/>
</attribute>
</optional>
</define>
<define name="hostdevsubsysmdev">
<attribute name="type">
<value>mdev</value>
@ -6411,7 +6397,16 @@
<value>vfio-ap</value>
</choice>
</attribute>
<ref name="hostdevsubsysvfiodisplay"/>
<optional>
<attribute name="ramfb">
<ref name="virOnOff"/>
</attribute>
</optional>
<optional>
<attribute name="display">
<ref name="virOnOff"/>
</attribute>
</optional>
<element name="source">
<ref name="mdevaddress"/>
</element>

View File

@ -654,11 +654,6 @@ foreach daemon : virt_daemons
install_dir: sbindir,
install_rpath: libvirt_rpath,
)
# libvirtd_prog is needed by the test suite
if daemon['name'] == 'libvirtd'
libvirtd_prog = bin
endif
endforeach

View File

@ -4735,16 +4735,10 @@ qemuBuildPCIHostdevDevProps(const virDomainDef *def,
virDomainNetTeamingInfo *teaming;
g_autofree char *host = virPCIDeviceAddressAsString(&pcisrc->addr);
const char *failover_pair_id = NULL;
const char *driver = NULL;
/* caller has to assign proper passthrough driver name */
switch (pcisrc->driver.name) {
case VIR_DEVICE_HOSTDEV_PCI_DRIVER_NAME_VFIO:
/* ramfb support requires the nohotplug variant */
if (pcisrc->ramfb == VIR_TRISTATE_SWITCH_ON)
driver = "vfio-pci-nohotplug";
else
driver = "vfio-pci";
break;
case VIR_DEVICE_HOSTDEV_PCI_DRIVER_NAME_KVM:
@ -4768,13 +4762,11 @@ qemuBuildPCIHostdevDevProps(const virDomainDef *def,
failover_pair_id = teaming->persistent;
if (virJSONValueObjectAdd(&props,
"s:driver", driver,
"s:driver", "vfio-pci",
"s:host", host,
"s:id", dev->info->alias,
"p:bootindex", dev->info->effectiveBootIndex,
"S:failover_pair_id", failover_pair_id,
"S:display", qemuOnOffAuto(pcisrc->display),
"B:ramfb", pcisrc->ramfb,
NULL) < 0)
return NULL;

View File

@ -2087,10 +2087,6 @@ qemuDomainAssignDevicePCISlots(virDomainDef *def,
for (i = 0; i < def->nnets; i++) {
virDomainNetDef *net = def->nets[i];
if (net->model == VIR_DOMAIN_NET_MODEL_USB_NET) {
continue;
}
/* type='hostdev' network devices might be USB, and are also
* in hostdevs list anyway, so handle them with other hostdevs
* instead of here.

View File

@ -2639,8 +2639,6 @@ typedef struct _qemuSnapshotDeleteExternalData {
virDomainSnapshotDiskDef *snapDisk; /* snapshot disk definition */
virDomainDiskDef *domDisk; /* VM disk definition */
virStorageSource *diskSrc; /* source of disk we are deleting */
virStorageSource *diskSrcMetadata; /* copy of diskSrc to be used when updating
metadata because diskSrc is freed */
virDomainMomentObj *parentSnap;
virDomainDiskDef *parentDomDisk; /* disk definition from snapshot metadata */
virStorageSource *parentDiskSrc; /* backing disk source of the @diskSrc */
@ -2659,7 +2657,6 @@ qemuSnapshotDeleteExternalDataFree(qemuSnapshotDeleteExternalData *data)
if (!data)
return;
virObjectUnref(data->diskSrcMetadata);
virObjectUnref(data->job);
g_slist_free_full(data->disksWithBacking, g_free);
@ -2896,8 +2893,6 @@ qemuSnapshotDeleteExternalPrepareData(virDomainObj *vm,
if (!data->diskSrc)
return -1;
data->diskSrcMetadata = virStorageSourceCopy(data->diskSrc, false);
if (!virStorageSourceIsSameLocation(data->diskSrc, snapDiskSrc)) {
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("VM disk source and snapshot disk source are not the same"));
@ -3054,7 +3049,6 @@ typedef struct _qemuSnapshotUpdateDisksData qemuSnapshotUpdateDisksData;
struct _qemuSnapshotUpdateDisksData {
virDomainMomentObj *snap;
virDomainObj *vm;
GSList *externalData;
int error;
};
@ -3084,8 +3078,7 @@ static int
qemuSnapshotUpdateDisksSingle(virDomainMomentObj *snap,
virDomainDef *def,
virDomainDef *parentDef,
virDomainSnapshotDiskDef *snapDisk,
virStorageSource *diskSrc)
virDomainSnapshotDiskDef *snapDisk)
{
virDomainDiskDef *disk = NULL;
@ -3098,7 +3091,7 @@ qemuSnapshotUpdateDisksSingle(virDomainMomentObj *snap,
if (!(parentDisk = qemuDomainDiskByName(parentDef, snapDisk->name)))
return -1;
if (virStorageSourceIsSameLocation(diskSrc, disk->src)) {
if (virStorageSourceIsSameLocation(snapDisk->src, disk->src)) {
virObjectUnref(disk->src);
disk->src = virStorageSourceCopy(parentDisk->src, false);
}
@ -3109,7 +3102,7 @@ qemuSnapshotUpdateDisksSingle(virDomainMomentObj *snap,
virStorageSource *next = disk->src->backingStore;
while (next) {
if (virStorageSourceIsSameLocation(diskSrc, next)) {
if (virStorageSourceIsSameLocation(snapDisk->src, next)) {
cur->backingStore = next->backingStore;
next->backingStore = NULL;
virObjectUnref(next);
@ -3135,15 +3128,17 @@ qemuSnapshotDeleteUpdateDisks(void *payload,
qemuDomainObjPrivate *priv = data->vm->privateData;
virQEMUDriver *driver = priv->driver;
g_autoptr(virQEMUDriverConfig) cfg = virQEMUDriverGetConfig(driver);
GSList *cur = NULL;
virDomainSnapshotDef *snapdef = virDomainSnapshotObjGetDef(data->snap);
ssize_t i;
for (cur = data->externalData; cur; cur = g_slist_next(cur)) {
qemuSnapshotDeleteExternalData *curdata = cur->data;
for (i = 0; i < snapdef->ndisks; i++) {
virDomainSnapshotDiskDef *snapDisk = &(snapdef->disks[i]);
if (snapDisk->snapshot == VIR_DOMAIN_SNAPSHOT_LOCATION_NO)
continue;
if (qemuSnapshotUpdateDisksSingle(snap, snap->def->dom,
data->snap->def->dom,
curdata->snapDisk,
curdata->diskSrcMetadata) < 0) {
data->snap->def->dom, snapDisk) < 0) {
data->error = -1;
}
@ -3154,8 +3149,7 @@ qemuSnapshotDeleteUpdateDisks(void *payload,
dom = data->snap->def->dom;
if (qemuSnapshotUpdateDisksSingle(snap, snap->def->inactiveDom,
dom, curdata->snapDisk,
curdata->diskSrcMetadata) < 0) {
dom, snapDisk) < 0) {
data->error = -1;
}
}
@ -3519,7 +3513,6 @@ qemuSnapshotDeleteUpdateParent(virDomainObj *vm,
static int
qemuSnapshotDiscardMetadata(virDomainObj *vm,
virDomainMomentObj *snap,
GSList *externalData,
bool update_parent)
{
qemuDomainObjPrivate *priv = vm->privateData;
@ -3544,17 +3537,14 @@ qemuSnapshotDiscardMetadata(virDomainObj *vm,
if (rep.err < 0)
ret = -1;
if (virDomainSnapshotIsExternal(snap)) {
data.snap = snap;
data.vm = vm;
data.externalData = externalData;
data.error = 0;
virDomainMomentForEachDescendant(snap,
qemuSnapshotDeleteUpdateDisks,
&data);
if (data.error < 0)
ret = -1;
}
data.snap = snap;
data.vm = vm;
data.error = 0;
virDomainMomentForEachDescendant(snap,
qemuSnapshotDeleteUpdateDisks,
&data);
if (data.error < 0)
ret = -1;
virDomainMomentMoveChildren(snap, snap->parent);
}
@ -3651,7 +3641,7 @@ qemuSnapshotDiscardImpl(virQEMUDriver *driver,
}
}
if (qemuSnapshotDiscardMetadata(vm, snap, externalData, update_parent) < 0)
if (qemuSnapshotDiscardMetadata(vm, snap, update_parent) < 0)
return -1;
return 0;

View File

@ -2478,14 +2478,6 @@ qemuValidateDomainDeviceDefHostdev(const virDomainHostdevDef *hostdev,
_("Write filtering of PCI device configuration space is not supported by qemu"));
return -1;
}
if (hostdev->source.subsys.u.pci.display == VIR_TRISTATE_SWITCH_ON) {
if (def->ngraphics == 0) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("graphics device is needed for attribute value 'display=on' in <hostdev>"));
return -1;
}
}
break;
case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST:

View File

@ -180,21 +180,21 @@ static bool
remoteRelayNetworkEventCheckACL(virNetServerClient *client,
virConnectPtr conn, virNetworkPtr net)
{
g_autofree virNetworkDef *def = g_new0(virNetworkDef, 1);
virNetworkDef def;
g_autoptr(virIdentity) identity = NULL;
bool ret = false;
/* For now, we just create a virNetworkDef with enough contents to
* satisfy what viraccessdriverpolkit.c references. This is a bit
* fragile, but I don't know of anything better. */
def->name = net->name;
memcpy(def->uuid, net->uuid, VIR_UUID_BUFLEN);
def.name = net->name;
memcpy(def.uuid, net->uuid, VIR_UUID_BUFLEN);
if (!(identity = virNetServerClientGetIdentity(client)))
goto cleanup;
if (virIdentitySetCurrent(identity) < 0)
goto cleanup;
ret = virConnectNetworkEventRegisterAnyCheckACL(conn, def);
ret = virConnectNetworkEventRegisterAnyCheckACL(conn, &def);
cleanup:
ignore_value(virIdentitySetCurrent(NULL));
@ -206,21 +206,21 @@ remoteRelayStoragePoolEventCheckACL(virNetServerClient *client,
virConnectPtr conn,
virStoragePoolPtr pool)
{
g_autofree virStoragePoolDef *def = g_new0(virStoragePoolDef, 1);
virStoragePoolDef def;
g_autoptr(virIdentity) identity = NULL;
bool ret = false;
/* For now, we just create a virStoragePoolDef with enough contents to
* satisfy what viraccessdriverpolkit.c references. This is a bit
* fragile, but I don't know of anything better. */
def->name = pool->name;
memcpy(def->uuid, pool->uuid, VIR_UUID_BUFLEN);
def.name = pool->name;
memcpy(def.uuid, pool->uuid, VIR_UUID_BUFLEN);
if (!(identity = virNetServerClientGetIdentity(client)))
goto cleanup;
if (virIdentitySetCurrent(identity) < 0)
goto cleanup;
ret = virConnectStoragePoolEventRegisterAnyCheckACL(conn, def);
ret = virConnectStoragePoolEventRegisterAnyCheckACL(conn, &def);
cleanup:
ignore_value(virIdentitySetCurrent(NULL));
@ -232,20 +232,20 @@ remoteRelayNodeDeviceEventCheckACL(virNetServerClient *client,
virConnectPtr conn,
virNodeDevicePtr dev)
{
g_autofree virNodeDeviceDef *def = g_new0(virNodeDeviceDef, 1);
virNodeDeviceDef def;
g_autoptr(virIdentity) identity = NULL;
bool ret = false;
/* For now, we just create a virNodeDeviceDef with enough contents to
* satisfy what viraccessdriverpolkit.c references. This is a bit
* fragile, but I don't know of anything better. */
def->name = dev->name;
def.name = dev->name;
if (!(identity = virNetServerClientGetIdentity(client)))
goto cleanup;
if (virIdentitySetCurrent(identity) < 0)
goto cleanup;
ret = virConnectNodeDeviceEventRegisterAnyCheckACL(conn, def);
ret = virConnectNodeDeviceEventRegisterAnyCheckACL(conn, &def);
cleanup:
ignore_value(virIdentitySetCurrent(NULL));
@ -257,22 +257,22 @@ remoteRelaySecretEventCheckACL(virNetServerClient *client,
virConnectPtr conn,
virSecretPtr secret)
{
g_autofree virSecretDef *def = g_new0(virSecretDef, 1);
virSecretDef def;
g_autoptr(virIdentity) identity = NULL;
bool ret = false;
/* For now, we just create a virSecretDef with enough contents to
* satisfy what viraccessdriverpolkit.c references. This is a bit
* fragile, but I don't know of anything better. */
memcpy(def->uuid, secret->uuid, VIR_UUID_BUFLEN);
def->usage_type = secret->usageType;
def->usage_id = secret->usageID;
memcpy(def.uuid, secret->uuid, VIR_UUID_BUFLEN);
def.usage_type = secret->usageType;
def.usage_id = secret->usageID;
if (!(identity = virNetServerClientGetIdentity(client)))
goto cleanup;
if (virIdentitySetCurrent(identity) < 0)
goto cleanup;
ret = virConnectSecretEventRegisterAnyCheckACL(conn, def);
ret = virConnectSecretEventRegisterAnyCheckACL(conn, &def);
cleanup:
ignore_value(virIdentitySetCurrent(NULL));

View File

@ -1249,8 +1249,6 @@ virSysinfoRead(void)
(defined(__x86_64__) || \
defined(__i386__) || \
defined(__amd64__) || \
defined(__riscv__) || \
defined(__mips__) || \
defined(__loongarch__))
return virSysinfoReadDMI();
#else /* WIN32 || not supported arch */

View File

@ -3,7 +3,7 @@
<domain>kvm</domain>
<machine>pc-q35-9.0</machine>
<arch>x86_64</arch>
<vcpu max='4096'/>
<vcpu max='1024'/>
<iothreads supported='yes'/>
<os supported='yes'>
<enum name='firmware'>

View File

@ -38,7 +38,6 @@
<model fallback='forbid'>EPYC</model>
<vendor>AMD</vendor>
<feature policy='require' name='monitor'/>
<feature policy='require' name='x2apic'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='acpi'/>
<feature policy='require' name='ss'/>

16
tests/libvirtd-fail Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
# Ensure that libvirt fails when given nonexistent --config=FILE
. "$(dirname $0)/test-lib.sh"
if test "$VERBOSE" = yes; then
set -x
$abs_top_builddir/src/libvirtd --version
fi
fail=0
$abs_top_builddir/src/libvirtd --config=no-such-conf --timeout=5 2> log
RET=$?
test "$RET" != "0" && exit 0 || exit 1

38
tests/libvirtd-pool Executable file
View File

@ -0,0 +1,38 @@
#!/bin/sh
# Get coverage of virsh pool-define-as XML formatting
. "$(dirname $0)/test-lib.sh"
if test "$VERBOSE" = yes; then
set -x
$abs_top_builddir/tools/virsh --version
fi
fail=0
pwd=$(pwd) || fail=1
$abs_top_builddir/tools/virsh --connect test:///default \
pool-define-as --print-xml \
P dir src-host /src/path /src/dev S /target-path \
1>out 2>&1
cat <<EOF > pool-list-exp
<pool type='dir'>
<name>P</name>
<source>
<host name='src-host'/>
<dir path='/src/path'/>
<device path='/src/dev'/>
<name>S</name>
</source>
<target>
<path>/target-path</path>
</target>
</pool>
EOF
compare pool-list-exp out || fail=1
exit $fail

View File

@ -619,20 +619,6 @@ test(
suite: 'script',
)
# vsh based client self-test, which can be run directly from meson
test('virsh self-test',
virsh_prog,
args: [ '-q', '-c', 'test:///default', 'self-test' ],
suite: 'bin',
)
if conf.has('WITH_REMOTE')
test('virt-admin self-test',
virt_admin_prog,
args: [ '-q', 'self-test' ],
suite: 'bin',
)
endif
# helpers:
# each entry is a dictionary with following items:
@ -701,15 +687,26 @@ endforeach
test_scripts = []
if conf.has('WITH_LIBVIRTD')
test('libvirtd fail with missing config',
libvirtd_prog,
args: [ '--config=no-such-conf', '--timeout=5' ],
should_fail: true,
suite: 'bin',
)
test_scripts += [
'libvirtd-fail',
'libvirtd-pool',
'virsh-auth',
'virsh-checkpoint',
'virsh-cpuset',
'virsh-define-dev-segfault',
'virsh-int-overflow',
'virsh-optparse',
'virsh-output',
'virsh-read-bufsiz',
'virsh-read-non-seekable',
'virsh-schedinfo',
'virsh-self-test',
'virsh-snapshot',
'virsh-start',
'virsh-undefine',
'virsh-uriprecedence',
'virsh-vcpupin',
'virt-admin-self-test',
]
if conf.has('WITH_SECDRIVER_APPARMOR')

File diff suppressed because it is too large Load Diff

View File

@ -204,9 +204,9 @@
<flag name='blockjob.backing-mask-protocol'/>
<flag name='display-reload'/>
<flag name='usb-mtp'/>
<version>8002091</version>
<version>8002050</version>
<microcodeVersion>43100245</microcodeVersion>
<package>v9.0.0-rc1-55-g7fcf7575f3</package>
<package>v8.2.0-952-g14639717bf</package>
<arch>x86_64</arch>
<hostCPU type='kvm' model='base' migratability='yes'>
<property name='avx-ne-convert' type='boolean' value='false'/>
@ -367,7 +367,6 @@
<property name='pcommit' type='boolean' value='false'/>
<property name='vmx-vpid' type='boolean' value='false'/>
<property name='syscall' type='boolean' value='true' migratable='yes'/>
<property name='kvm-asyncpf-vmexit' type='boolean' value='true' migratable='yes'/>
<property name='avx512dq' type='boolean' value='false'/>
<property name='svm' type='boolean' value='true' migratable='yes'/>
<property name='invtsc' type='boolean' value='true' migratable='no'/>
@ -1917,7 +1916,7 @@
<machine type='kvm' name='isapc' hotplugCpus='yes' maxCpus='1' defaultCPU='486-x86_64-cpu' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='kvm' name='pc-q35-2.6' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='kvm' name='pc-i440fx-3.1' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='kvm' name='pc-q35-9.0' alias='q35' hotplugCpus='yes' maxCpus='4096' defaultCPU='qemu64-x86_64-cpu' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='kvm' name='pc-q35-9.0' alias='q35' hotplugCpus='yes' maxCpus='1024' defaultCPU='qemu64-x86_64-cpu' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='kvm' name='pc-q35-2.12' hotplugCpus='yes' maxCpus='288' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='kvm' name='pc-q35-7.0' hotplugCpus='yes' maxCpus='288' defaultCPU='qemu64-x86_64-cpu' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='kvm' name='pc-i440fx-2.1' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' deprecated='yes' acpi='yes'/>
@ -1942,8 +1941,8 @@
<machine type='kvm' name='pc-i440fx-5.0' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='kvm' name='pc-i440fx-2.8' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='kvm' name='pc-q35-6.2' hotplugCpus='yes' maxCpus='288' defaultCPU='qemu64-x86_64-cpu' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='kvm' name='pc-i440fx-3.0' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='kvm' name='pc-q35-2.5' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='kvm' name='pc-i440fx-3.0' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='kvm' name='pc-i440fx-7.2' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='kvm' name='pc-q35-2.11' hotplugCpus='yes' maxCpus='288' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<hostCPU type='tcg' model='base' migratability='yes'>
@ -2075,7 +2074,7 @@
<property name='pfthreshold' type='boolean' value='false'/>
<property name='vmx-invpcid-exit' type='boolean' value='false'/>
<property name='amx-int8' type='boolean' value='false'/>
<property name='x2apic' type='boolean' value='true' migratable='yes'/>
<property name='x2apic' type='boolean' value='false'/>
<property name='avx512vbmi' type='boolean' value='false'/>
<property name='avx512vnni' type='boolean' value='false'/>
<property name='sgx-edeccssa' type='boolean' value='false'/>
@ -2105,7 +2104,6 @@
<property name='pcommit' type='boolean' value='true' migratable='yes'/>
<property name='vmx-vpid' type='boolean' value='false'/>
<property name='syscall' type='boolean' value='true' migratable='yes'/>
<property name='kvm-asyncpf-vmexit' type='boolean' value='false'/>
<property name='avx512dq' type='boolean' value='false'/>
<property name='svm' type='boolean' value='true' migratable='yes'/>
<property name='invtsc' type='boolean' value='false'/>
@ -2347,6 +2345,7 @@
</cpu>
<cpu type='tcg' name='Westmere' typename='Westmere-x86_64-cpu' usable='yes'/>
<cpu type='tcg' name='Snowridge-v4' typename='Snowridge-v4-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='gfni'/>
<blocker name='cldemote'/>
@ -2359,6 +2358,7 @@
<blocker name='xsaves'/>
</cpu>
<cpu type='tcg' name='Snowridge-v3' typename='Snowridge-v3-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='gfni'/>
<blocker name='cldemote'/>
@ -2373,6 +2373,7 @@
<blocker name='split-lock-detect'/>
</cpu>
<cpu type='tcg' name='Snowridge-v2' typename='Snowridge-v2-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='gfni'/>
<blocker name='cldemote'/>
@ -2386,6 +2387,7 @@
<blocker name='split-lock-detect'/>
</cpu>
<cpu type='tcg' name='Snowridge-v1' typename='Snowridge-v1-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='gfni'/>
<blocker name='cldemote'/>
@ -2399,6 +2401,7 @@
<blocker name='split-lock-detect'/>
</cpu>
<cpu type='tcg' name='Snowridge' typename='Snowridge-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='gfni'/>
<blocker name='cldemote'/>
@ -2413,6 +2416,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Server-v5' typename='Skylake-Server-v5-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='avx512f'/>
@ -2426,6 +2430,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Server-v4' typename='Skylake-Server-v4-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='avx512f'/>
@ -2438,6 +2443,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Server-v3' typename='Skylake-Server-v3-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='avx512f'/>
@ -2450,6 +2456,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Server-v2' typename='Skylake-Server-v2-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2464,6 +2471,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Server-v1' typename='Skylake-Server-v1-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2477,6 +2485,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Server-noTSX-IBRS' typename='Skylake-Server-noTSX-IBRS-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='avx512f'/>
@ -2489,6 +2498,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Server-IBRS' typename='Skylake-Server-IBRS-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2503,6 +2513,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Server' typename='Skylake-Server-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2516,6 +2527,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Client-v4' typename='Skylake-Client-v4-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='spec-ctrl'/>
@ -2524,6 +2536,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Client-v3' typename='Skylake-Client-v3-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='spec-ctrl'/>
@ -2531,6 +2544,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Client-v2' typename='Skylake-Client-v2-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2540,6 +2554,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Client-v1' typename='Skylake-Client-v1-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2548,6 +2563,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Client-noTSX-IBRS' typename='Skylake-Client-noTSX-IBRS-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='spec-ctrl'/>
@ -2555,6 +2571,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Client-IBRS' typename='Skylake-Client-IBRS-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2564,6 +2581,7 @@
</cpu>
<cpu type='tcg' name='Skylake-Client' typename='Skylake-Client-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2572,6 +2590,7 @@
</cpu>
<cpu type='tcg' name='SapphireRapids-v2' typename='SapphireRapids-v2-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2607,6 +2626,7 @@
</cpu>
<cpu type='tcg' name='SapphireRapids-v1' typename='SapphireRapids-v1-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2642,6 +2662,7 @@
</cpu>
<cpu type='tcg' name='SapphireRapids' typename='SapphireRapids-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2676,17 +2697,21 @@
<blocker name='xfd'/>
</cpu>
<cpu type='tcg' name='SandyBridge-v2' typename='SandyBridge-v2-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='spec-ctrl'/>
</cpu>
<cpu type='tcg' name='SandyBridge-v1' typename='SandyBridge-v1-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
</cpu>
<cpu type='tcg' name='SandyBridge-IBRS' typename='SandyBridge-IBRS-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='spec-ctrl'/>
</cpu>
<cpu type='tcg' name='SandyBridge' typename='SandyBridge-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
</cpu>
<cpu type='tcg' name='Penryn-v1' typename='Penryn-v1-x86_64-cpu' usable='yes'/>
@ -2736,6 +2761,7 @@
</cpu>
<cpu type='tcg' name='Nehalem' typename='Nehalem-x86_64-cpu' usable='yes'/>
<cpu type='tcg' name='KnightsMill-v1' typename='KnightsMill-v1-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='avx512f'/>
<blocker name='avx512pf'/>
@ -2746,6 +2772,7 @@
<blocker name='avx512-4fmaps'/>
</cpu>
<cpu type='tcg' name='KnightsMill' typename='KnightsMill-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='avx512f'/>
<blocker name='avx512pf'/>
@ -2756,21 +2783,26 @@
<blocker name='avx512-4fmaps'/>
</cpu>
<cpu type='tcg' name='IvyBridge-v2' typename='IvyBridge-v2-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='spec-ctrl'/>
</cpu>
<cpu type='tcg' name='IvyBridge-v1' typename='IvyBridge-v1-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
</cpu>
<cpu type='tcg' name='IvyBridge-IBRS' typename='IvyBridge-IBRS-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='spec-ctrl'/>
</cpu>
<cpu type='tcg' name='IvyBridge' typename='IvyBridge-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
</cpu>
<cpu type='tcg' name='Icelake-Server-v6' typename='Icelake-Server-v6-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='avx512f'/>
@ -2794,6 +2826,7 @@
</cpu>
<cpu type='tcg' name='Icelake-Server-v5' typename='Icelake-Server-v5-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='avx512f'/>
@ -2817,6 +2850,7 @@
</cpu>
<cpu type='tcg' name='Icelake-Server-v4' typename='Icelake-Server-v4-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='avx512f'/>
@ -2839,6 +2873,7 @@
</cpu>
<cpu type='tcg' name='Icelake-Server-v3' typename='Icelake-Server-v3-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='avx512f'/>
@ -2860,6 +2895,7 @@
</cpu>
<cpu type='tcg' name='Icelake-Server-v2' typename='Icelake-Server-v2-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='avx512f'/>
@ -2880,6 +2916,7 @@
</cpu>
<cpu type='tcg' name='Icelake-Server-v1' typename='Icelake-Server-v1-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2902,6 +2939,7 @@
</cpu>
<cpu type='tcg' name='Icelake-Server-noTSX' typename='Icelake-Server-noTSX-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='avx512f'/>
@ -2922,6 +2960,7 @@
</cpu>
<cpu type='tcg' name='Icelake-Server' typename='Icelake-Server-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2944,12 +2983,14 @@
</cpu>
<cpu type='tcg' name='Haswell-v4' typename='Haswell-v4-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='spec-ctrl'/>
</cpu>
<cpu type='tcg' name='Haswell-v3' typename='Haswell-v3-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2958,11 +2999,13 @@
</cpu>
<cpu type='tcg' name='Haswell-v2' typename='Haswell-v2-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
</cpu>
<cpu type='tcg' name='Haswell-v1' typename='Haswell-v1-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2970,17 +3013,20 @@
</cpu>
<cpu type='tcg' name='Haswell-noTSX-IBRS' typename='Haswell-noTSX-IBRS-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='spec-ctrl'/>
</cpu>
<cpu type='tcg' name='Haswell-noTSX' typename='Haswell-noTSX-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
</cpu>
<cpu type='tcg' name='Haswell-IBRS' typename='Haswell-IBRS-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2989,6 +3035,7 @@
</cpu>
<cpu type='tcg' name='Haswell' typename='Haswell-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -2996,6 +3043,7 @@
</cpu>
<cpu type='tcg' name='GraniteRapids-v1' typename='GraniteRapids-v1-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -3034,6 +3082,7 @@
</cpu>
<cpu type='tcg' name='GraniteRapids' typename='GraniteRapids-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -3360,6 +3409,7 @@
<blocker name='xsavec'/>
</cpu>
<cpu type='tcg' name='Denverton-v3' typename='Denverton-v3-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='spec-ctrl'/>
<blocker name='arch-capabilities'/>
@ -3368,6 +3418,7 @@
<blocker name='xsaves'/>
</cpu>
<cpu type='tcg' name='Denverton-v2' typename='Denverton-v2-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='spec-ctrl'/>
<blocker name='arch-capabilities'/>
@ -3375,6 +3426,7 @@
<blocker name='xsavec'/>
</cpu>
<cpu type='tcg' name='Denverton-v1' typename='Denverton-v1-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='spec-ctrl'/>
<blocker name='arch-capabilities'/>
@ -3382,6 +3434,7 @@
<blocker name='xsavec'/>
</cpu>
<cpu type='tcg' name='Denverton' typename='Denverton-x86_64-cpu' usable='no'>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='spec-ctrl'/>
<blocker name='arch-capabilities'/>
@ -3390,6 +3443,7 @@
</cpu>
<cpu type='tcg' name='Cooperlake-v2' typename='Cooperlake-v2-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -3410,6 +3464,7 @@
</cpu>
<cpu type='tcg' name='Cooperlake-v1' typename='Cooperlake-v1-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -3429,6 +3484,7 @@
</cpu>
<cpu type='tcg' name='Cooperlake' typename='Cooperlake-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -3450,6 +3506,7 @@
<cpu type='tcg' name='Conroe' typename='Conroe-x86_64-cpu' usable='yes'/>
<cpu type='tcg' name='Cascadelake-Server-v5' typename='Cascadelake-Server-v5-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='avx512f'/>
@ -3466,6 +3523,7 @@
</cpu>
<cpu type='tcg' name='Cascadelake-Server-v4' typename='Cascadelake-Server-v4-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='avx512f'/>
@ -3481,6 +3539,7 @@
</cpu>
<cpu type='tcg' name='Cascadelake-Server-v3' typename='Cascadelake-Server-v3-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='avx512f'/>
@ -3496,6 +3555,7 @@
</cpu>
<cpu type='tcg' name='Cascadelake-Server-v2' typename='Cascadelake-Server-v2-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -3513,6 +3573,7 @@
</cpu>
<cpu type='tcg' name='Cascadelake-Server-v1' typename='Cascadelake-Server-v1-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -3529,6 +3590,7 @@
</cpu>
<cpu type='tcg' name='Cascadelake-Server-noTSX' typename='Cascadelake-Server-noTSX-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='avx512f'/>
@ -3544,6 +3606,7 @@
</cpu>
<cpu type='tcg' name='Cascadelake-Server' typename='Cascadelake-Server-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -3560,12 +3623,14 @@
</cpu>
<cpu type='tcg' name='Broadwell-v4' typename='Broadwell-v4-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='spec-ctrl'/>
</cpu>
<cpu type='tcg' name='Broadwell-v3' typename='Broadwell-v3-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -3574,11 +3639,13 @@
</cpu>
<cpu type='tcg' name='Broadwell-v2' typename='Broadwell-v2-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
</cpu>
<cpu type='tcg' name='Broadwell-v1' typename='Broadwell-v1-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -3586,17 +3653,20 @@
</cpu>
<cpu type='tcg' name='Broadwell-noTSX-IBRS' typename='Broadwell-noTSX-IBRS-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
<blocker name='spec-ctrl'/>
</cpu>
<cpu type='tcg' name='Broadwell-noTSX' typename='Broadwell-noTSX-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='invpcid'/>
</cpu>
<cpu type='tcg' name='Broadwell-IBRS' typename='Broadwell-IBRS-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -3605,6 +3675,7 @@
</cpu>
<cpu type='tcg' name='Broadwell' typename='Broadwell-x86_64-cpu' usable='no'>
<blocker name='pcid'/>
<blocker name='x2apic'/>
<blocker name='tsc-deadline'/>
<blocker name='hle'/>
<blocker name='invpcid'/>
@ -3645,7 +3716,7 @@
<machine type='tcg' name='isapc' hotplugCpus='yes' maxCpus='1' defaultCPU='486-x86_64-cpu' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='tcg' name='pc-q35-2.6' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='tcg' name='pc-i440fx-3.1' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='tcg' name='pc-q35-9.0' alias='q35' hotplugCpus='yes' maxCpus='4096' defaultCPU='qemu64-x86_64-cpu' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='tcg' name='pc-q35-9.0' alias='q35' hotplugCpus='yes' maxCpus='1024' defaultCPU='qemu64-x86_64-cpu' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='tcg' name='pc-q35-2.12' hotplugCpus='yes' maxCpus='288' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='tcg' name='pc-q35-7.0' hotplugCpus='yes' maxCpus='288' defaultCPU='qemu64-x86_64-cpu' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='tcg' name='pc-i440fx-2.1' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' deprecated='yes' acpi='yes'/>
@ -3670,8 +3741,8 @@
<machine type='tcg' name='pc-i440fx-5.0' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='tcg' name='pc-i440fx-2.8' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='tcg' name='pc-q35-6.2' hotplugCpus='yes' maxCpus='288' defaultCPU='qemu64-x86_64-cpu' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='tcg' name='pc-i440fx-3.0' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='tcg' name='pc-q35-2.5' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='tcg' name='pc-i440fx-3.0' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='tcg' name='pc-i440fx-7.2' hotplugCpus='yes' maxCpus='255' defaultCPU='qemu64-x86_64-cpu' defaultRAMid='pc.ram' acpi='yes'/>
<machine type='tcg' name='pc-q35-2.11' hotplugCpus='yes' maxCpus='288' defaultCPU='qemu64-x86_64-cpu' numaMemSupported='yes' defaultRAMid='pc.ram' acpi='yes'/>
<hypervCapabilities supported='yes'>

View File

@ -1,46 +0,0 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-D \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-D/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-D/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-D/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=D,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-D/master-key.aes"}' \
-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,pcspk-audiodev=audio1,acpi=on \
-accel kvm \
-cpu qemu64 \
-m size=262144k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":268435456}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82 \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
-chardev pty,id=charserial0 \
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
-chardev pty,id=charserial1 \
-device '{"driver":"isa-serial","chardev":"charserial1","id":"serial1","index":1}' \
-chardev pty,id=charserial2 \
-device '{"driver":"isa-serial","chardev":"charserial2","id":"serial2","index":2}' \
-chardev pty,id=charparallel0 \
-device '{"driver":"isa-parallel","chardev":"charparallel0","id":"parallel0"}' \
-chardev pty,id=charparallel1 \
-device '{"driver":"isa-parallel","chardev":"charparallel1","id":"parallel1"}' \
-chardev pty,id=charparallel2 \
-device '{"driver":"isa-parallel","chardev":"charparallel2","id":"parallel2"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"ES1370","id":"sound1","audiodev":"audio1","bus":"pci.0","addr":"0x2"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -1,65 +0,0 @@
<domain type='kvm'>
<name>D</name>
<uuid>aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82</uuid>
<memory unit='KiB'>262144</memory>
<currentMemory unit='KiB'>262144</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='cdrom'/>
</os>
<features>
<acpi/>
</features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
</serial>
<serial type='pty'>
<target type='isa-serial' port='1'>
<model name='isa-serial'/>
</target>
</serial>
<serial type='pty'>
<target type='isa-serial' port='2'>
<model name='isa-serial'/>
</target>
</serial>
<parallel type='pty'>
<target port='0'/>
</parallel>
<parallel type='pty'>
<target port='1'/>
</parallel>
<parallel type='pty'>
<target port='2'/>
</parallel>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<sound model='pcspk'/>
<sound model='es1370'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</sound>
<audio id='1' type='none'/>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</memballoon>
</devices>
</domain>

View File

@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
-accel tcg \
-cpu EPYC,monitor=on,x2apic=on,hypervisor=on,acpi=on,ss=on,erms=on,mpx=on,pcommit=on,clwb=on,umip=on,pku=on,vaes=on,la57=on,rdpid=on,pks=on,fsrm=on,cmpccxadd=on,fzrm=on,fsrs=on,fsrc=on,3dnowext=on,3dnow=on,xsaveerptr=on,wbnoinvd=on,npt=on,vgif=on,svme-addr-chk=on,vme=off,xsavec=off,misalignsse=off,osvw=off,topoext=off,fxsr-opt=off,nrip-save=off \
-cpu EPYC,monitor=on,hypervisor=on,acpi=on,ss=on,erms=on,mpx=on,pcommit=on,clwb=on,umip=on,pku=on,vaes=on,la57=on,rdpid=on,pks=on,fsrm=on,cmpccxadd=on,fzrm=on,fsrs=on,fsrc=on,3dnowext=on,3dnow=on,xsaveerptr=on,wbnoinvd=on,npt=on,vgif=on,svme-addr-chk=on,vme=off,xsavec=off,misalignsse=off,osvw=off,topoext=off,fxsr-opt=off,nrip-save=off \
-m size=219136k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
-overcommit mem-lock=off \

View File

@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
-accel tcg \
-cpu EPYC,monitor=on,x2apic=on,hypervisor=on,acpi=on,ss=on,erms=on,mpx=on,pcommit=on,clwb=on,umip=on,pku=on,vaes=on,la57=on,rdpid=on,pks=on,fsrm=on,cmpccxadd=on,fzrm=on,fsrs=on,fsrc=on,3dnowext=on,3dnow=on,xsaveerptr=on,wbnoinvd=on,npt=on,vgif=on,svme-addr-chk=on,vme=off,xsavec=off,misalignsse=off,osvw=off,topoext=off,fxsr-opt=off,nrip-save=off \
-cpu EPYC,monitor=on,hypervisor=on,acpi=on,ss=on,erms=on,mpx=on,pcommit=on,clwb=on,umip=on,pku=on,vaes=on,la57=on,rdpid=on,pks=on,fsrm=on,cmpccxadd=on,fzrm=on,fsrs=on,fsrc=on,3dnowext=on,3dnow=on,xsaveerptr=on,wbnoinvd=on,npt=on,vgif=on,svme-addr-chk=on,vme=off,xsavec=off,misalignsse=off,osvw=off,topoext=off,fxsr-opt=off,nrip-save=off \
-m size=219136k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
-overcommit mem-lock=off \

View File

@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
-machine q35,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
-accel tcg \
-cpu EPYC,monitor=on,x2apic=on,hypervisor=on,acpi=on,ss=on,erms=on,mpx=on,pcommit=on,clwb=on,umip=on,pku=on,vaes=on,la57=on,rdpid=on,pks=on,fsrm=on,cmpccxadd=on,fzrm=on,fsrs=on,fsrc=on,3dnowext=on,3dnow=on,xsaveerptr=on,wbnoinvd=on,npt=on,vgif=on,svme-addr-chk=on,vme=off,xsavec=off,misalignsse=off,osvw=off,topoext=off,fxsr-opt=off,nrip-save=off \
-cpu EPYC,monitor=on,hypervisor=on,acpi=on,ss=on,erms=on,mpx=on,pcommit=on,clwb=on,umip=on,pku=on,vaes=on,la57=on,rdpid=on,pks=on,fsrm=on,cmpccxadd=on,fzrm=on,fsrs=on,fsrc=on,3dnowext=on,3dnow=on,xsaveerptr=on,wbnoinvd=on,npt=on,vgif=on,svme-addr-chk=on,vme=off,xsavec=off,misalignsse=off,osvw=off,topoext=off,fxsr-opt=off,nrip-save=off \
-m size=219136k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
-overcommit mem-lock=off \

View File

@ -1 +0,0 @@
invalid argument: Failed to parse bitmap 'aaa'

View File

@ -1,12 +0,0 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory unit='KiB'>219136</memory>
<vcpu cpuset='aaa'>2</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
</os>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
</devices>
</domain>

View File

@ -1,33 +0,0 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2 \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest2/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=QEMUGuest2,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest2/master-key.aes"}' \
-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
-accel tcg \
-cpu qemu64 \
-m size=219136k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-vnc 127.0.0.1:0,audiodev=audio1 \
-device '{"driver":"vfio-pci-nohotplug","host":"0000:06:12.5","id":"hostdev0","display":"on","ramfb":true,"bus":"pci.0","addr":"0x2"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -1,44 +0,0 @@
<domain type='qemu'>
<name>QEMUGuest2</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory unit='KiB'>219136</memory>
<currentMemory unit='KiB'>219136</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' index='0' model='piix3-uhci'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'>
<listen type='address'/>
</graphics>
<audio id='1' type='none'/>
<video>
<model type='none'/>
</video>
<hostdev mode='subsystem' type='pci' managed='no' display='on' ramfb='on'>
<source>
<address domain='0x0000' bus='0x06' slot='0x12' function='0x5'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</hostdev>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -1,33 +0,0 @@
<domain type='qemu'>
<name>QEMUGuest2</name>
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
<memory unit='KiB'>219136</memory>
<currentMemory unit='KiB'>219136</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' index='0'>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='ide' index='0'>
</controller>
<graphics type='vnc'/>
<hostdev mode='subsystem' type='pci' display='on' ramfb='on'>
<source>
<address domain='0x0000' bus='0x06' slot='0x12' function='0x5'/>
</source>
</hostdev>
<video>
<model type='none'/>
</video>
<memballoon model='none'/>
</devices>
</domain>

View File

@ -1,35 +0,0 @@
LC_ALL=C \
PATH=/bin \
HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \
USER=test \
LOGNAME=test \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
/usr/bin/qemu-system-x86_64 \
-name guest=QEMUGuest1,debug-threads=on \
-S \
-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \
-machine pc,usb=off,dump-guest-core=off,memory-backend=pc.ram,acpi=off \
-accel tcg \
-cpu qemu64 \
-m size=4194304k \
-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":4294967296}' \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid 2d4d4b20-b19b-4713-af0a-bf1cab8b455b \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
-device '{"driver":"qemu-xhci","p2":1,"p3":1,"id":"usb","bus":"pci.0","addr":"0x2"}' \
-netdev '{"type":"user","id":"hostnet0"}' \
-device '{"driver":"usb-net","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"usb.0","port":"1"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on

View File

@ -1,35 +0,0 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>2d4d4b20-b19b-4713-af0a-bf1cab8b455b</uuid>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' index='0' model='qemu-xhci' ports='1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<interface type='user'>
<mac address='00:11:22:33:44:55'/>
<model type='usb-net'/>
</interface>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</memballoon>
</devices>
</domain>

View File

@ -1,20 +0,0 @@
<domain type='qemu'>
<name>QEMUGuest1</name>
<uuid>2d4d4b20-b19b-4713-af0a-bf1cab8b455b</uuid>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' index='0' model='qemu-xhci' ports='1'/>
<interface type="user">
<mac address="00:11:22:33:44:55"/>
<model type="usb-net"/>
</interface>
<memballoon model='virtio'/>
</devices>
</domain>

View File

@ -1799,7 +1799,6 @@ mymain(void)
DO_TEST_CAPS_LATEST("console-compat");
DO_TEST_CAPS_LATEST("console-compat-auto");
DO_TEST_CAPS_LATEST("console-compat-crash");
DO_TEST_CAPS_LATEST("serial-vc-chardev");
DO_TEST_CAPS_LATEST("serial-pty-chardev");
@ -2076,7 +2075,6 @@ mymain(void)
DO_TEST_CAPS_LATEST("hostdev-pci-address");
DO_TEST_CAPS_LATEST("hostdev-pci-address-device");
DO_TEST_CAPS_LATEST_PARSE_ERROR("hostdev-pci-duplicate");
DO_TEST_CAPS_LATEST("hostdev-pci-display-ramfb");
DO_TEST_CAPS_LATEST("hostdev-vfio");
DO_TEST_CAPS_LATEST("hostdev-vfio-multidomain");
DO_TEST_CAPS_LATEST("hostdev-mdev-precreated");
@ -2289,7 +2287,6 @@ mymain(void)
DO_TEST_CAPS_LATEST("cputune-numatune");
DO_TEST_CAPS_LATEST("vcpu-placement-static");
DO_TEST_CAPS_LATEST("cputune-cpuset-big-id");
DO_TEST_CAPS_LATEST_PARSE_ERROR("cpuset-invalid");
DO_TEST_CAPS_LATEST_PARSE_ERROR("numatune-memory-invalid-nodeset");
DO_TEST_CAPS_VER("numatune-memnode", "5.2.0");
@ -2979,7 +2976,6 @@ mymain(void)
DO_TEST_CAPS_LATEST("tap-vhost");
DO_TEST_CAPS_LATEST("mtp-usb-device")
DO_TEST_CAPS_LATEST("net-usb")
/* check that all input files were actually used here */
if (testConfXMLCheck(existingTestCases) < 0)

280
tests/test-lib.sh Normal file
View File

@ -0,0 +1,280 @@
# test-lib.sh: source this file; set up for tests
# Copyright (C) 2008-2013, 2016 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
#
# Based on an idea from GNU coreutils
_scriptdir="$(unset CDPATH; cd $(dirname $0) && pwd)"
test -z "$abs_srcdir" && abs_srcdir=$_scriptdir
test -z "$abs_builddir" && abs_builddir=$_scriptdir
test -z "$abs_top_srcdir" && abs_top_srcdir=$_scriptdir/..
test -z "$abs_top_builddir" && abs_top_builddir=$_scriptdir/..
test -z "$LC_ALL" && LC_ALL=C
# Skip this test if the shell lacks support for functions.
unset function_test
eval 'function_test() { return 11; }; function_test'
if test $? != 11; then
echo "$0: /bin/sh lacks support for functions; skipping this test." 1>&2
(exit 77); exit 77
fi
test_intro()
{
name=$1
if test "$verbose" = "0" ; then
echo "TEST: $name"
printf " "
fi
}
test_skip_case()
{
counter=$1
name=$2
reason=$3
if test "$verbose" = "0" ; then
mod=`expr \( $counter + 40 - 1 \) % 40`
if test "$counter" != 1 && test "$mod" = 0 ; then
printf " %-3d\n" `expr $counter - 1`
printf " "
fi
printf "_"
else
printf "%3d) %-60s ... SKIP\n" "$counter" "$name"
printf " case skipped: %s\n" "$reason"
fi
}
test_result()
{
counter=$1
name=$2
status=$3
if test "$verbose" = "0" ; then
mod=`expr \( $counter + 40 - 1 \) % 40`
if test "$counter" != 1 && test "$mod" = 0 ; then
printf " %-3d\n" `expr $counter - 1`
printf " "
fi
if test "$status" = "0" ; then
printf "."
else
printf "!"
fi
else
if test "$status" = "0" ; then
printf "%3d) %-60s ... OK\n" "$counter" "$name"
else
printf "%3d) %-60s ... FAILED\n" "$counter" "$name"
fi
fi
}
test_final()
{
counter=$1
status=$2
if test "$verbose" = "0" ; then
len=`expr 39 - \( \( $counter - 1 \) % 40 \)`
printf "%${len}s" ""
if test "$status" = "0" ; then
printf " %-3d OK\n" $counter
else
printf " %-3d FAILED\n" $counter
fi
fi
}
skip_test_()
{
echo "$0: skipping test: $@" 1>&2
(exit 77); exit 77
}
require_acl_()
{
getfacl --version < /dev/null > /dev/null 2>&1 \
&& setfacl --version < /dev/null > /dev/null 2>&1 \
|| skip_test_ "This test requires getfacl and setfacl."
id -u bin > /dev/null 2>&1 \
|| skip_test_ "This test requires a local user named bin."
}
require_ulimit_()
{
ulimit_works=yes
# Expect to be able to exec a program in 10MB of virtual memory,
# but not in 20KB. I chose "date". It must not be a shell built-in
# function, so you can't use echo, printf, true, etc.
# Of course, in coreutils, I could use $top_builddir/src/true,
# but this should be able to work for other projects, too.
( ulimit -v 10000; date ) > /dev/null 2>&1 || ulimit_works=no
( ulimit -v 20; date ) > /dev/null 2>&1 && ulimit_works=no
test $ulimit_works = no \
&& skip_test_ "this shell lacks ulimit support"
}
require_readable_root_()
{
test -r / || skip_test_ "/ is not readable"
}
# Skip the current test if strace is not available or doesn't work.
require_strace_()
{
strace -V < /dev/null > /dev/null 2>&1 ||
skip_test_ 'no strace program'
strace -qe unlink echo > /dev/null 2>&1 ||
skip_test_ 'strace does not work'
}
require_built_()
{
skip_=no
for i in "$@"; do
case " $built_programs " in
*" $i "*) ;;
*) echo "$i: not built" 1>&2; skip_=yes ;;
esac
done
test $skip_ = yes && skip_test_ "required program(s) not built"
}
uid_is_privileged_()
{
# Make sure id -u succeeds.
my_uid=$(id -u) \
|| { echo "$0: cannot run \`id -u'" 1>&2; return 1; }
# Make sure it gives valid output.
case $my_uid in
0) ;;
*[!0-9]*)
echo "$0: invalid output (\`$my_uid') from \`id -u'" 1>&2
return 1 ;;
*) return 1 ;;
esac
}
skip_if_()
{
case $1 in
root) skip_test_ must be run as root ;;
non-root) skip_test_ must be run as non-root ;;
*) ;; # FIXME?
esac
}
require_selinux_()
{
case `ls -Zd .` in
'? .'|'unlabeled .')
skip_test_ "this system (or maybe just" \
"the current file system) lacks SELinux support"
;;
esac
}
test_expensive()
{
if test "$VIR_TEST_EXPENSIVE" != 1; then
skip_test_ '
This test is very expensive, so it is disabled by default.
To change the default, configure with: meson -Dexpensive_tests=enabled
'
fi
}
require_root_() { uid_is_privileged_ || skip_test_ "must be run as root"; }
skip_if_root_() { uid_is_privileged_ && skip_test_ "must be run as non-root"; }
error_() { echo "$0: $@" 1>&2; (exit 1); exit 1; }
framework_failure() { error_ 'failure in testing framework'; }
mkfifo_or_skip_()
{
test $# = 1 || framework_failure
if ! mkfifo "$1"; then
# Make an exception of this case -- usually we interpret framework-creation
# failure as a test failure. However, in this case, when running on a SunOS
# system using a disk NFS mounted from OpenBSD, the above fails like this:
# mkfifo: cannot make fifo `fifo-10558': Not owner
skip_test_ 'NOTICE: unable to create test prerequisites'
fi
}
# Create mock XDG files/directories to avoid permission problems.
# As it points inside $test_dir_, it is automatically cleaned.
mock_xdg_()
{
export XDG_CONFIG_HOME="$t_/.config"
export XDG_CACHE_HOME="$t_/.cache"
export XDG_RUNTIME_HOME="$XDG_CACHE_HOME"
mkdir -p "$XDG_CONFIG_HOME/libvirt" "$XDG_CONFIG_HOME/virsh"
mkdir -p "$XDG_CACHE_HOME/libvirt" "$XDG_CACHE_HOME/virsh"
mkdir -p "$XDG_RUNTIME_HOME/libvirt" "$XDG_RUNTIME_HOME/virsh"
}
test_dir_=$(pwd)
this_test_() { echo "./$0" | sed 's,.*/,,'; }
this_test=$(this_test_)
verbose=0
if test -n "$VIR_TEST_DEBUG" || test -n "$VIR_TEST_VERBOSE" ; then
verbose=1
fi
debug() { :; }
if test "$VIR_TEST_DEBUG" = "2"; then
debug() { echo "$@"; }
fi
# This is a stub function that is run upon trap (upon regular exit and
# interrupt). Override it with a per-test function, e.g., to unmount
# a partition, or to undo any other global state changes.
cleanup_() { :; }
t_=$("mktemp" "-d" "$test_dir_/lv-$this_test.XXXXXXXXXX") \
|| error_ "failed to create temporary directory in $test_dir_"
# Run each test from within a temporary sub-directory named after the
# test itself, and arrange to remove it upon exception or normal exit.
trap 'st=$?; cleanup_; d='"$t_"';
cd '"$test_dir_"' && chmod -R u+rwx "$d" && rm -rf "$d" && exit $st' 0
trap '(exit $?); exit $?' 1 2 13 15
cd "$t_" || error_ "failed to cd to $t_"
if ( diff --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
compare() { diff -u "$@"; }
elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
compare() { cmp -s "$@"; }
else
compare() { cmp "$@"; }
fi
# Local Variables:
# indent-tabs-mode: nil
# End:

178
tests/virsh-checkpoint Executable file
View File

@ -0,0 +1,178 @@
#!/bin/sh
# simple testing of checkpoint APIs on test driver
# Copyright (C) 2019 Red Hat, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
. "$(dirname $0)/test-lib.sh"
test_expensive
if test "$VERBOSE" = yes; then
set -x
$abs_top_builddir/tools/virsh --version
fi
fail=0
mock_xdg_ || framework_failure
# The test driver loses states between restarts, so we perform a script
# with some convenient markers for later post-processing of output.
$abs_top_builddir/tools/virsh --connect test:///default >out 2>err '
# Create a series of checkpoints, with names that intentionally sort
# differently by topology than by name. For now, it is not possible
# to create fanout without hacking through redefines.
checkpoint-create-as test c1
checkpoint-create-as test c1
checkpoint-create-as test c3
checkpoint-create-as test c2
# snapshots cannot be created while checkpoints exist
echo --err marker
snapshot-create-as test s1
echo --err marker
# Checking tree view (siblings sorted alphabetically)
checkpoint-list test --tree
# Demonstrate list filtering
checkpoint-list test --roots
checkpoint-list test --leaves
checkpoint-list test --parent --no-leaves
checkpoint-list test --from c3
checkpoint-list test --from c1 --descendants --name
# Now the tree is linear, so we have an unambiguous topological order
checkpoint-list test --name
checkpoint-list test --name --topological
# Capture some XML for later redefine
checkpoint-delete test c1
echo "<!--MarkerA-->"
checkpoint-dumpxml test c3
echo "<!--MarkerB-->"
checkpoint-dumpxml test c2
echo "<!--MarkerC-->"
# Deleting current checkpoint moves current up to remaining parent
checkpoint-delete test --children-only c3
checkpoint-list test --leaves --name
checkpoint-delete test --children c3
checkpoint-list test --leaves --name
# All done
' || fail=1
# First part is expected output, --tree results in trailing spaces,
# and checkpoint-list produces timestamps
sed 's/ *$//; s/[0-9-]\{10\} [0-9:.]* .[0-9]\{4\}/TIMESTAMP/;
/MarkerA/,/MarkerC/d' < out > out.cooked || fail=1
# Second part holds domain checkpoint XMLs
sed -n '/MarkerA/,/MarkerB/p' < out > c3.xml || fail=1
sed -n '/MarkerB/,/MarkerC/p' < out > c2.xml || fail=1
cat <<\EOF > exp || fail=1
Domain checkpoint c1 created
Domain checkpoint c3 created
Domain checkpoint c2 created
c1
|
+- c3
|
+- c2
Name Creation Time
-----------------------------------
c1 TIMESTAMP
Name Creation Time
-----------------------------------
c2 TIMESTAMP
Name Creation Time Parent
--------------------------------------------
c1 TIMESTAMP
c3 TIMESTAMP c1
Name Creation Time
-----------------------------------
c2 TIMESTAMP
c2
c3
c1
c2
c3
c1
c3
c2
Domain checkpoint c1 deleted
Domain checkpoint c3 children deleted
c3
Domain checkpoint c3 deleted
EOF
compare exp out.cooked || fail=1
cat <<EOF > exp || fail=1
error: operation failed: domain moment c1 already exists
error: marker
error: Operation not supported: cannot create snapshot while checkpoint exists
error: marker
EOF
compare exp err || fail=1
# Restore state with redefine
$abs_top_builddir/tools/virsh -c test:///default >out 2>err '
# Redefine must be in topological order; this will fail
checkpoint-create test --redefine c2.xml
echo --err marker
# This is the right order
checkpoint-create test --redefine c3.xml
checkpoint-create test --redefine c2.xml
checkpoint-list test --leaves --name
checkpoint-info test c2
' || fail=1
cat <<\EOF > exp || fail=1
Domain checkpoint c3 created from 'c3.xml'
Domain checkpoint c2 created from 'c2.xml'
c2
Name: c2
Domain: test
Parent: c3
Children: 0
Descendants: 0
EOF
compare exp out || fail=1
cat <<EOF > exp || fail=1
error: invalid argument: parent c3 for moment c2 not found
error: marker
EOF
compare exp err || fail=1
(exit $fail); exit $fail

46
tests/virsh-cpuset Executable file
View File

@ -0,0 +1,46 @@
#!/bin/sh
# ensure that defining with an invalid vCPU cpuset elicits a diagnostic
# Copyright (C) 2008-2009 Red Hat, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
. "$(dirname $0)/test-lib.sh"
if test "$VERBOSE" = yes; then
set -x
$abs_top_builddir/tools/virsh --version
fi
fail=0
# generate input
$abs_top_builddir/tools/virsh --connect test:///default dumpxml 1 > xml || fail=1
# require the presence of the string we'll transform
grep '<vcpu placement' xml > /dev/null || fail=1
sed "s/vcpu placement='static'>/vcpu cpuset='aaa'>/" xml > xml-invalid || fail=1
# Require failure and a diagnostic.
$abs_top_builddir/tools/virsh --connect test:///default define xml-invalid > out 2>&1 && fail=1
cat <<\EOF > exp || fail=1
error: Failed to define domain from xml-invalid
error: invalid argument: Failed to parse bitmap 'aaa'
EOF
compare exp out || fail=1
(exit $fail); exit $fail

View File

@ -1,11 +1,26 @@
<domain type='kvm'>
#!/bin/sh
# Exercise a bug whereby defining a valid domain could kill libvirtd.
# The bug can also be exercised with a simple define/dumpxml pair to virsh.
. "$(dirname $0)/test-lib.sh"
if test "$VERBOSE" = yes; then
set -x
$abs_top_builddir/tools/virsh --version
fi
fail=0
# Domain definition from Cole Robinson.
cat <<\EOF > D.xml || fail=1
<domain type='test'>
<name>D</name>
<uuid>aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82</uuid>
<memory unit='KiB'>262144</memory>
<currentMemory unit='KiB'>262144</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='cdrom'/>
</os>
<features>
@ -16,7 +31,7 @@
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<emulator>/usr/bin/qemu-system-i386</emulator>
<controller type='usb' index='0'/>
<serial type='pty'>
<target port='0'/>
@ -44,3 +59,18 @@
<memballoon model='virtio'/>
</devices>
</domain>
EOF
url=test:///default
$abs_top_builddir/tools/virsh --connect "$url" 'define D.xml; dumpxml D' > out 2>&1 || fail=1
cat > exp <<EOF || fail=1
Domain 'D' defined from D.xml
$(cat D.xml)
EOF
compare exp out || fail=1
exit $fail

18
tests/virsh-int-overflow Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
# Ensure that an invalid domain ID isn't interpreted as a valid one.
# Before, an ID of 2^32+2 would be treated just like an ID of 2.
. "$(dirname $0)/test-lib.sh"
if test "$VERBOSE" = yes; then
set -x
$abs_top_builddir/tools/virsh --version
fi
echo "error: failed to get domain '4294967298'" > exp || fail=1
$abs_top_builddir/tools/virsh --quiet \
--connect test://$abs_top_srcdir/examples/xml/test/testnode.xml \
'domname 4294967298; quit' > /dev/null 2> err || fail=1
diff -u err exp || fail=1
exit $fail

292
tests/virsh-optparse Executable file
View File

@ -0,0 +1,292 @@
#!/bin/sh
# Ensure that virsh option parsing doesn't regress
# Copyright (C) 2011-2012, 2014 Red Hat, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
. "$(dirname $0)/test-lib.sh"
test_expensive
VIRSH=$abs_top_builddir/tools/virsh
if test "$VERBOSE" = yes; then
set -x
$VIRSH --version
fi
cat <<\EOF > exp-out || framework_failure
setvcpus: <domain> trying as domain NAME
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: found option <domain>: test
EOF
fail=0
test_url=test:///default
for args in \
'test 2' \
'--domain test 2' \
'--domain=test 2' \
'test --count 2' \
'test --count=2' \
'--domain test --count 2' \
'--domain=test --count 2' \
'--domain test --count=2' \
'--domain=test --count=2' \
'--count 2 --domain test' \
'--count 2 --domain=test' \
'--count=2 --domain test' \
'--count=2 --domain=test' \
'--count 2 test' \
'--count=2 test' \
; do
$VIRSH -k0 -d0 -c $test_url setvcpus $args >out 2>>err || fail=1
LC_ALL=C sort out | compare exp-out - || fail=1
done
# Another complex parsing example
cat <<\EOF > exp-out || framework_failure
<domainsnapshot>
<description>1&lt;2</description>
<memory file='d,e'/>
<disks>
<disk name='vda' snapshot='external'>
<source file='a&amp;b,c'/>
</disk>
<disk name='vdb'/>
</disks>
</domainsnapshot>
EOF
$VIRSH -q -c $test_url snapshot-create-as --print-xml test \
--diskspec 'vda,file=a&b,,c,snapshot=external' --description '1<2' \
--diskspec vdb --memspec file=d,,e >out 2>>err || fail=1
compare exp-out out || fail=1
cat <<\EOF > exp-out || framework_failure
<domainsnapshot>
<name>name</name>
<description>vda</description>
<disks>
<disk name='vdb'/>
</disks>
</domainsnapshot>
EOF
$VIRSH -q -c $test_url snapshot-create-as --print-xml test name vda vdb \
>out 2>>err || fail=1
compare exp-out out || fail=1
cat <<\EOF > exp-out || framework_failure
<domainsnapshot>
<name>name</name>
<description>desc</description>
<disks>
<disk name='vda'/>
<disk name='vdb'/>
</disks>
</domainsnapshot>
EOF
for args in \
'test name desc vda vdb' \
'test name desc --diskspec vda vdb' \
'test name desc --diskspec vda --diskspec vdb' \
'test name desc vda vdb' \
'test --diskspec vda name --diskspec vdb desc' \
'--description desc --name name --domain test vda vdb' \
'--description desc --diskspec vda --name name --domain test vdb' \
; do
$VIRSH -q -c $test_url snapshot-create-as --print-xml $args \
>out 2>>err || fail=1
compare exp-out out || fail=1
done
test -s err && fail=1
# Test a required argv
cat <<\EOF > exp-err || framework_failure
error: this function is not supported by the connection driver: virDomainQemuMonitorCommand
EOF
$VIRSH -q -c $test_url qemu-monitor-command test a >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
### Test a regular numeric option
# Non-numeric value
cat <<\EOF > exp-err || framework_failure
error: Numeric value 'abc' for <start> option is malformed or out of range
EOF
$VIRSH -q -c $test_url cpu-stats test --start abc >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
# Numeric value with invalid suffix
cat <<\EOF > exp-err || framework_failure
error: Numeric value '42WB' for <start> option is malformed or out of range
EOF
$VIRSH -q -c $test_url cpu-stats test --start 42WB >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
# Numeric value with valid suffix. Suffixes are not supported for
# regular numeric options, so this value is rejected
cat <<\EOF > exp-err || framework_failure
error: Numeric value '42MB' for <start> option is malformed or out of range
EOF
$VIRSH -q -c $test_url cpu-stats test --start 42MB >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
# Numeric value bigger than INT_MAX
cat <<\EOF > exp-err || framework_failure
error: Numeric value '2147483648' for <start> option is malformed or out of range
EOF
$VIRSH -q -c $test_url cpu-stats test --start 2147483648 >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
# Negative numeric value. The value is not valid for the command
# we're testing, but it has been parsed correctly
cat <<\EOF > exp-err || framework_failure
error: Invalid value for start CPU
EOF
$VIRSH -q -c $test_url cpu-stats test --start -1 >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
### Test a scaled numeric option
# Non-numeric value
cat <<\EOF > exp-err || framework_failure
error: Scaled numeric value 'abc' for <size> option is malformed or out of range
EOF
$VIRSH -q -c $test_url setmaxmem test abc >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
# Numeric value with invalid suffix
cat <<\EOF > exp-err || framework_failure
error: Scaled numeric value '42WB' for <size> option is malformed or out of range
error: invalid argument: unknown suffix 'WB'
EOF
$VIRSH -q -c $test_url setmaxmem test 42WB >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
# Numeric value with valid suffix
$VIRSH -q -c $test_url setmaxmem test 42MB --config >out 2>err || fail=1
test -s out && fail=1
test -s err && fail=1
# Numeric value bigger than INT_MAX. No failure here because
# scaled numeric values are unsigned long long
$VIRSH -q -c $test_url setmaxmem test 2147483648 --config >out 2>err || fail=1
test -s out && fail=1
test -s err && fail=1
# Negative numeric value
cat <<\EOF > exp-err || framework_failure
error: Scaled numeric value '-1' for <size> option is malformed or out of range
EOF
$VIRSH -q -c $test_url setmaxmem test -1 >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
# Zero. The value is not valid for the command we're testing, but
# it has been parsed correctly
cat <<\EOF > exp-err || framework_failure
error: Unable to change MaxMemorySize
error: memory in virDomainSetMemoryFlags must not be zero
EOF
$VIRSH -q -c $test_url setmaxmem test 0 >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
# Numeric value
$VIRSH -q -c $test_url setmaxmem test 42 --config >out 2>err || fail=1
test -s out && fail=1
test -s err && fail=1
### Test the <timeout> option (numeric option converted to ms)
# Non-numeric value
cat <<\EOF > exp-err || framework_failure
error: Numeric value 'abc' for <timeout> option is malformed or out of range
EOF
$VIRSH -q -c $test_url event --all --timeout abc >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
# Numeric value that's too big to be converted to ms and still
# fit inside an int
cat <<\EOF > exp-err || framework_failure
error: Numeric value '2147484' for <timeout> option is malformed or out of range
EOF
$VIRSH -q -c $test_url event --all --timeout 2147484 >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
# Numeric value with invalid suffix
cat <<\EOF > exp-err || framework_failure
error: Numeric value '42WB' for <timeout> option is malformed or out of range
EOF
$VIRSH -q -c $test_url event --all --timeout 42WB >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
# Numeric value with valid suffix. Suffixes are not supported for
# the <timeout> option, so this value is rejected
cat <<\EOF > exp-err || framework_failure
error: Numeric value '42MB' for <timeout> option is malformed or out of range
EOF
$VIRSH -q -c $test_url event --all --timeout 42MB >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
# Negative value
cat <<\EOF > exp-err || framework_failure
error: Numeric value '-1' for <timeout> option is malformed or out of range
EOF
$VIRSH -q -c $test_url event --all --timeout -1 >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
# Zero. This is not a valid timeout, but the value is parsed
# correctly
cat <<\EOF > exp-err || framework_failure
error: Numeric value '0' for <timeout> option is malformed or out of range
EOF
$VIRSH -q -c $test_url event --all --timeout 0 >out 2>err && fail=1
test -s out && fail=1
compare exp-err err || fail=1
# Numeric value. No events will be received and the command will
# fail after a second, but the value has been parsed correctly
cat <<\EOF > exp-out || framework_failure
event loop timed out
events received: 0
EOF
$VIRSH -q -c $test_url event --all --timeout 1 >out 2>err && fail=1
test -s err && fail=1
compare exp-out out || fail=1
(exit $fail); exit $fail

29
tests/virsh-output Executable file
View File

@ -0,0 +1,29 @@
#!/bin/sh
. "$(dirname $0)/test-lib.sh"
test_expensive
if [ ! -x /bin/bash ]; then
echo skipping test - no bash
exit 77
fi
mock_xdg_ || framework_failure
export LIBVIRT_DEFAULT_URI='test:///default'
ln -s $abs_top_builddir/tools/virsh virsh
$abs_top_srcdir/tests/virsh-output-commands > out 2>&1
echo end >> out
if compare $abs_top_srcdir/tests/virsh-output.out out; then
exit 0
else
if [ "x$VIR_TEST_REGENERATE_OUTPUT" = "x1" ]; then
cp out $abs_top_srcdir/tests/virsh-output.out
fi
exit 1
fi

94
tests/virsh-output-commands Executable file
View File

@ -0,0 +1,94 @@
#!/bin/bash
attach_disk()
{
./virsh attach-disk --print-xml --domain testdom $@ --source /nonexistent/file
}
set -x
./virsh attach-disk
./virsh attach-disk --print-xml --domain testdom $@ --source ""
./virsh attach-disk --print-xml --domain testdom $@ --source "" --sourcetype file
./virsh attach-disk --print-xml --domain testdom $@ --source "" --sourcetype blah
attach_disk --target hda
attach_disk --target hda --sourcetype file
attach_disk --target hda --sourcetype block
attach_disk --target hda --sourcetype nothing
attach_disk --target hda --sourcetype file --type disk
attach_disk --target hda --sourcetype block --type disk
attach_disk --target hda --sourcetype file --type cdrom
attach_disk --target hda --sourcetype block --type cdrom
attach_disk --target hda --sourcetype file --type blah
attach_disk --target hda --sourcetype block --type blah
attach_disk --target hda --sourcetype file --type disk --driver testdriver
attach_disk --target hda --sourcetype file --type disk --subdriver qcow2
attach_disk --target hda --sourcetype file --type disk --subdriver raw
attach_disk --target hda --sourcetype file --type disk --cache none
attach_disk --target hda --sourcetype file --type disk --subdriver qcow2 --cache none
attach_disk --target hda --sourcetype file --type disk --subdriver qcow2 --serial TEST_SERIAL
attach_disk --target hda --sourcetype file --type disk --mode readonly
attach_disk --target hda --sourcetype file --type disk --mode shareable
attach_disk --target hda --sourcetype file --type disk --mode whatever
attach_disk --target hda --sourcetype file --type disk --subdriver qcow2 --alias testalias
attach_disk --target hda --sourcetype file --type disk --rawio
attach_disk --target hda --sourcetype file --type disk --multifunction
attach_disk --target hda --sourcetype file --type disk --subdriver qcow2 --alias testalias --iothread 3 --mode readonly --cache none --driver qemu
attach_disk --target hda --sourcetype file --type disk --address ide:1.2.3
attach_disk --target hda --sourcetype file --type disk --address ide:1.2.4
attach_disk --target hda --sourcetype file --type disk --address ide:1:2:5
attach_disk --target sda --sourcetype file --type disk --address ide:1.2.3
attach_disk --target vda --sourcetype file --type disk --address ide:1.2.3
attach_disk --target sda --sourcetype file --type disk --address usb:12.34
attach_disk --target sda --sourcetype file --type disk --address usb:12.3
attach_disk --target sda --sourcetype file --type disk --address usb:12:34
attach_disk --target vda --sourcetype file --type disk --address usb:12.34
attach_disk --target hda --sourcetype file --type disk --address usb:12.34
attach_disk --target sda --sourcetype file --type disk --address scsi:1.2.3
attach_disk --target sda --sourcetype file --type disk --address scsi:1.2.4
attach_disk --target sda --sourcetype file --type disk --address scsi:1:2:5
attach_disk --target hda --sourcetype file --type disk --address scsi:1.2.3
attach_disk --target vda --sourcetype file --type disk --address scsi:1.2.3
attach_disk --target sda --sourcetype file --type disk --address sata:1.2.3
attach_disk --target sda --sourcetype file --type disk --address sata:1.2.4
attach_disk --target sda --sourcetype file --type disk --address sata:1:2:5
attach_disk --target hda --sourcetype file --type disk --address sata:1.2.3
attach_disk --target vda --sourcetype file --type disk --address sata:1.2.3
attach_disk --target vda --sourcetype file --type disk --address pci:12.34.56.78
attach_disk --target vda --sourcetype file --type disk --address pci:12:34:56:78
attach_disk --target vda --sourcetype file --type disk --address pci:12.34.56.aa
attach_disk --target hda --sourcetype file --type disk --address pci:12.34.56.aa
attach_disk --target sda --sourcetype file --type disk --address pci:12.34.56.aa
attach_disk --target vda --sourcetype file --type disk --address pci:12.34.56.78 --multifunction
attach_disk --target vda --sourcetype file --type disk --address pci:12:34:56:78 --multifunction
attach_disk --target vda --sourcetype file --type disk --address pci:12.34.56.aa --multifunction
attach_disk --target vda --sourcetype file --type disk --address ccw:12.34.56
attach_disk --target vda --sourcetype file --type disk --address ccw:12:34:56
attach_disk --target vda --sourcetype file --type disk --address ccw:12.34.56
attach_disk --target hda --sourcetype file --type disk --address ccw:12.34.56
attach_disk --target sda --sourcetype file --type disk --address ccw:12.34.56
attach_disk --target vda --sourcetype file --type disk --address test:12.34.56
attach_disk --target vda --sourcetype file --type disk --address test:12:34:56
attach_disk --target vda --sourcetype file --type disk --address test:12.34.56
./virsh attach-disk --print-xml --domain testdom $@ --source "" --source-protocol AAA
./virsh attach-disk --print-xml --domain testdom $@ --source "" --source-protocol AAA
attach_disk --target hda --source-protocol AAA --sourcetype file
attach_disk --target hda --sourcetype network
attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-name hostname
attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-name hostname:port
attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-name hostname:
attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-name :port
attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-name :
attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-name hostname:port --source-host-transport trnsp
attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-transport trnsp
attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-transport trnsp --source-host-socket /nonexistent/socket
attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-socket /nonexistent/socket

496
tests/virsh-output.out Normal file
View File

@ -0,0 +1,496 @@
+ ./virsh attach-disk
error: command 'attach-disk' requires <domain> option
error: command 'attach-disk' requires <source> option
error: command 'attach-disk' requires <target> option
+ ./virsh attach-disk --print-xml --domain testdom --source ''
error: command 'attach-disk' requires <target> option
+ ./virsh attach-disk --print-xml --domain testdom --source '' --sourcetype file
error: command 'attach-disk' requires <target> option
+ ./virsh attach-disk --print-xml --domain testdom --source '' --sourcetype blah
error: command 'attach-disk' requires <target> option
+ attach_disk --target hda
+ ./virsh attach-disk --print-xml --domain testdom --target hda --source /nonexistent/file
<disk type='file'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype file
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --source /nonexistent/file
<disk type='file'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype block
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype block --source /nonexistent/file
<disk type='block'>
<source dev='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype nothing
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype nothing --source /nonexistent/file
error: Unknown source type: 'nothing'
+ attach_disk --target hda --sourcetype file --type disk
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype block --type disk
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype block --type disk --source /nonexistent/file
<disk type='block' device='disk'>
<source dev='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype file --type cdrom
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type cdrom --source /nonexistent/file
<disk type='file' device='cdrom'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype block --type cdrom
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype block --type cdrom --source /nonexistent/file
<disk type='block' device='cdrom'>
<source dev='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype file --type blah
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type blah --source /nonexistent/file
<disk type='file' device='blah'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype block --type blah
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype block --type blah --source /nonexistent/file
<disk type='block' device='blah'>
<source dev='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --driver testdriver
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --driver testdriver --source /nonexistent/file
<disk type='file' device='disk'>
<driver name='testdriver'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --subdriver qcow2
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --subdriver qcow2 --source /nonexistent/file
<disk type='file' device='disk'>
<driver type='qcow2'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --subdriver raw
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --subdriver raw --source /nonexistent/file
<disk type='file' device='disk'>
<driver type='raw'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --cache none
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --cache none --source /nonexistent/file
<disk type='file' device='disk'>
<driver cache='none'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --subdriver qcow2 --cache none
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --subdriver qcow2 --cache none --source /nonexistent/file
<disk type='file' device='disk'>
<driver type='qcow2' cache='none'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --subdriver qcow2 --serial TEST_SERIAL
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --subdriver qcow2 --serial TEST_SERIAL --source /nonexistent/file
<disk type='file' device='disk'>
<driver type='qcow2'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<serial>TEST_SERIAL</serial>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --mode readonly
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --mode readonly --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<readonly/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --mode shareable
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --mode shareable --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<shareable/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --mode whatever
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --mode whatever --source /nonexistent/file
error: No support for whatever in command 'attach-disk'
+ attach_disk --target hda --sourcetype file --type disk --subdriver qcow2 --alias testalias
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --subdriver qcow2 --alias testalias --source /nonexistent/file
<disk type='file' device='disk'>
<driver type='qcow2'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<alias name='testalias'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --rawio
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --rawio --source /nonexistent/file
<disk type='file' device='disk' rawio='yes'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --multifunction
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --multifunction --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --subdriver qcow2 --alias testalias --iothread 3 --mode readonly --cache none --driver qemu
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --subdriver qcow2 --alias testalias --iothread 3 --mode readonly --cache none --driver qemu --source /nonexistent/file
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' iothread='3' cache='none'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<readonly/>
<alias name='testalias'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --address ide:1.2.3
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --address ide:1.2.3 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<address type='drive' controller='1' bus='2' unit='3'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --address ide:1.2.4
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --address ide:1.2.4 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<address type='drive' controller='1' bus='2' unit='4'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --address ide:1:2:5
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --address ide:1:2:5 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<address type='drive' controller='1' bus='2' unit='5'/>
</disk>
+ attach_disk --target sda --sourcetype file --type disk --address ide:1.2.3
+ ./virsh attach-disk --print-xml --domain testdom --target sda --sourcetype file --type disk --address ide:1.2.3 --source /nonexistent/file
error: expecting a scsi:00.00.00 or usb:00.00 or sata:00.00.00 address.
+ attach_disk --target vda --sourcetype file --type disk --address ide:1.2.3
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address ide:1.2.3 --source /nonexistent/file
error: expecting a pci:0000.00.00.00 or ccw:00.0.0000 address.
+ attach_disk --target sda --sourcetype file --type disk --address usb:12.34
+ ./virsh attach-disk --print-xml --domain testdom --target sda --sourcetype file --type disk --address usb:12.34 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='usb' bus='12' port='34'/>
</disk>
+ attach_disk --target sda --sourcetype file --type disk --address usb:12.3
+ ./virsh attach-disk --print-xml --domain testdom --target sda --sourcetype file --type disk --address usb:12.3 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='usb' bus='12' port='3'/>
</disk>
+ attach_disk --target sda --sourcetype file --type disk --address usb:12:34
+ ./virsh attach-disk --print-xml --domain testdom --target sda --sourcetype file --type disk --address usb:12:34 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='usb' bus='12' port='34'/>
</disk>
+ attach_disk --target vda --sourcetype file --type disk --address usb:12.34
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address usb:12.34 --source /nonexistent/file
error: expecting a pci:0000.00.00.00 or ccw:00.0.0000 address.
+ attach_disk --target hda --sourcetype file --type disk --address usb:12.34
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --address usb:12.34 --source /nonexistent/file
error: expecting an ide:00.00.00 address.
+ attach_disk --target sda --sourcetype file --type disk --address scsi:1.2.3
+ ./virsh attach-disk --print-xml --domain testdom --target sda --sourcetype file --type disk --address scsi:1.2.3 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='drive' controller='1' bus='2' unit='3'/>
</disk>
+ attach_disk --target sda --sourcetype file --type disk --address scsi:1.2.4
+ ./virsh attach-disk --print-xml --domain testdom --target sda --sourcetype file --type disk --address scsi:1.2.4 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='drive' controller='1' bus='2' unit='4'/>
</disk>
+ attach_disk --target sda --sourcetype file --type disk --address scsi:1:2:5
+ ./virsh attach-disk --print-xml --domain testdom --target sda --sourcetype file --type disk --address scsi:1:2:5 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='drive' controller='1' bus='2' unit='5'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --address scsi:1.2.3
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --address scsi:1.2.3 --source /nonexistent/file
error: expecting an ide:00.00.00 address.
+ attach_disk --target vda --sourcetype file --type disk --address scsi:1.2.3
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address scsi:1.2.3 --source /nonexistent/file
error: expecting a pci:0000.00.00.00 or ccw:00.0.0000 address.
+ attach_disk --target sda --sourcetype file --type disk --address sata:1.2.3
+ ./virsh attach-disk --print-xml --domain testdom --target sda --sourcetype file --type disk --address sata:1.2.3 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='drive' controller='1' bus='2' unit='3'/>
</disk>
+ attach_disk --target sda --sourcetype file --type disk --address sata:1.2.4
+ ./virsh attach-disk --print-xml --domain testdom --target sda --sourcetype file --type disk --address sata:1.2.4 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='drive' controller='1' bus='2' unit='4'/>
</disk>
+ attach_disk --target sda --sourcetype file --type disk --address sata:1:2:5
+ ./virsh attach-disk --print-xml --domain testdom --target sda --sourcetype file --type disk --address sata:1:2:5 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='drive' controller='1' bus='2' unit='5'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --address sata:1.2.3
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --address sata:1.2.3 --source /nonexistent/file
error: expecting an ide:00.00.00 address.
+ attach_disk --target vda --sourcetype file --type disk --address sata:1.2.3
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address sata:1.2.3 --source /nonexistent/file
error: expecting a pci:0000.00.00.00 or ccw:00.0.0000 address.
+ attach_disk --target vda --sourcetype file --type disk --address pci:12.34.56.78
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address pci:12.34.56.78 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='pci' domain='0x0012' bus='0x34' slot='0x56' function='0x78'/>
</disk>
+ attach_disk --target vda --sourcetype file --type disk --address pci:12:34:56:78
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address pci:12:34:56:78 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='pci' domain='0x0012' bus='0x34' slot='0x56' function='0x78'/>
</disk>
+ attach_disk --target vda --sourcetype file --type disk --address pci:12.34.56.aa
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address pci:12.34.56.aa --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='pci' domain='0x0012' bus='0x34' slot='0x56' function='0xaa'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --address pci:12.34.56.aa
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --address pci:12.34.56.aa --source /nonexistent/file
error: expecting an ide:00.00.00 address.
+ attach_disk --target sda --sourcetype file --type disk --address pci:12.34.56.aa
+ ./virsh attach-disk --print-xml --domain testdom --target sda --sourcetype file --type disk --address pci:12.34.56.aa --source /nonexistent/file
error: expecting a scsi:00.00.00 or usb:00.00 or sata:00.00.00 address.
+ attach_disk --target vda --sourcetype file --type disk --address pci:12.34.56.78 --multifunction
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address pci:12.34.56.78 --multifunction --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='pci' domain='0x0012' bus='0x34' slot='0x56' function='0x78' multifunction='on'/>
</disk>
+ attach_disk --target vda --sourcetype file --type disk --address pci:12:34:56:78 --multifunction
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address pci:12:34:56:78 --multifunction --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='pci' domain='0x0012' bus='0x34' slot='0x56' function='0x78' multifunction='on'/>
</disk>
+ attach_disk --target vda --sourcetype file --type disk --address pci:12.34.56.aa --multifunction
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address pci:12.34.56.aa --multifunction --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='pci' domain='0x0012' bus='0x34' slot='0x56' function='0xaa' multifunction='on'/>
</disk>
+ attach_disk --target vda --sourcetype file --type disk --address ccw:12.34.56
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address ccw:12.34.56 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='ccw' cssid='0x12' ssid='0x34' devno='0x0056'/>
</disk>
+ attach_disk --target vda --sourcetype file --type disk --address ccw:12:34:56
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address ccw:12:34:56 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='ccw' cssid='0x12' ssid='0x34' devno='0x0056'/>
</disk>
+ attach_disk --target vda --sourcetype file --type disk --address ccw:12.34.56
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address ccw:12.34.56 --source /nonexistent/file
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='ccw' cssid='0x12' ssid='0x34' devno='0x0056'/>
</disk>
+ attach_disk --target hda --sourcetype file --type disk --address ccw:12.34.56
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype file --type disk --address ccw:12.34.56 --source /nonexistent/file
error: expecting an ide:00.00.00 address.
+ attach_disk --target sda --sourcetype file --type disk --address ccw:12.34.56
+ ./virsh attach-disk --print-xml --domain testdom --target sda --sourcetype file --type disk --address ccw:12.34.56 --source /nonexistent/file
error: expecting a scsi:00.00.00 or usb:00.00 or sata:00.00.00 address.
+ attach_disk --target vda --sourcetype file --type disk --address test:12.34.56
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address test:12.34.56 --source /nonexistent/file
error: Invalid address.
+ attach_disk --target vda --sourcetype file --type disk --address test:12:34:56
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address test:12:34:56 --source /nonexistent/file
error: Invalid address.
+ attach_disk --target vda --sourcetype file --type disk --address test:12.34.56
+ ./virsh attach-disk --print-xml --domain testdom --target vda --sourcetype file --type disk --address test:12.34.56 --source /nonexistent/file
error: Invalid address.
+ ./virsh attach-disk --print-xml --domain testdom --source '' --source-protocol AAA
error: command 'attach-disk' requires <target> option
+ ./virsh attach-disk --print-xml --domain testdom --source '' --source-protocol AAA
error: command 'attach-disk' requires <target> option
+ attach_disk --target hda --source-protocol AAA --sourcetype file
+ ./virsh attach-disk --print-xml --domain testdom --target hda --source-protocol AAA --sourcetype file --source /nonexistent/file
error: --source-protocol option requires --sourcetype network
+ attach_disk --target hda --sourcetype network
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype network --source /nonexistent/file
error: --source-protocol option requires --sourcetype network
+ attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-name hostname
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype network --source-protocol TEST --source-host-name hostname --source /nonexistent/file
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host name='hostname'/>
</source>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-name hostname:port
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype network --source-protocol TEST --source-host-name hostname:port --source /nonexistent/file
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host name='hostname' port='port'/>
</source>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-name hostname:
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype network --source-protocol TEST --source-host-name hostname: --source /nonexistent/file
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host name='hostname' port=''/>
</source>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-name :port
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype network --source-protocol TEST --source-host-name :port --source /nonexistent/file
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host name='' port='port'/>
</source>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-name :
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype network --source-protocol TEST --source-host-name : --source /nonexistent/file
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host name='' port=''/>
</source>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-name hostname:port --source-host-transport trnsp
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype network --source-protocol TEST --source-host-name hostname:port --source-host-transport trnsp --source /nonexistent/file
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host transport='trnsp' name='hostname' port='port'/>
</source>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-transport trnsp
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype network --source-protocol TEST --source-host-transport trnsp --source /nonexistent/file
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host transport='trnsp'/>
</source>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-transport trnsp --source-host-socket /nonexistent/socket
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype network --source-protocol TEST --source-host-transport trnsp --source-host-socket /nonexistent/socket --source /nonexistent/file
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host transport='trnsp' socket='/nonexistent/socket'/>
</source>
<target dev='hda'/>
</disk>
+ attach_disk --target hda --sourcetype network --source-protocol TEST --source-host-socket /nonexistent/socket
+ ./virsh attach-disk --print-xml --domain testdom --target hda --sourcetype network --source-protocol TEST --source-host-socket /nonexistent/socket --source /nonexistent/file
error: Option --source-host-transport is required by option --source-host-socket
end

49
tests/virsh-read-bufsiz Executable file
View File

@ -0,0 +1,49 @@
#!/bin/sh
# ensure that reading a file larger than BUFSIZ works
# Copyright (C) 2008, 2010 Red Hat, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
. "$(dirname $0)/test-lib.sh"
if test "$VERBOSE" = yes; then
set -x
$abs_top_builddir/tools/virsh --version
fi
fail=0
# Output a valid definition, to be used as input.
$abs_top_builddir/tools/virsh -c test:///default dumpxml 1 > xml.t || fail=1
# Change the VM name and UUID
sed -e "s|<name>test</name>|<name>newtest</name>|g" \
-e "\|<uuid>.*</uuid>|d" \
xml.t > xml
for i in before after; do
# The largest BUFSIZ I've seen is 128K. This is slightly larger.
printf %132000s ' ' > sp || fail=1
in=in-$i
# Append or prepend enough spaces to push the size over the limit:
( test $i = before && cat sp xml || cat xml sp ) > $in || fail=1
$abs_top_builddir/tools/virsh --connect test:///default define $in > out || fail=1
printf "Domain 'newtest' defined from $in\n\n" > exp || fail=1
compare exp out || fail=1
done
(exit $fail); exit $fail

51
tests/virsh-read-non-seekable Executable file
View File

@ -0,0 +1,51 @@
#!/bin/sh
# ensure that certain file-reading commands can handle non-seekable files
# Copyright (C) 2008 Red Hat, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
. "$(dirname $0)/test-lib.sh"
if test "$VERBOSE" = yes; then
set -x
$abs_top_builddir/tools/virsh --version
fi
fail=0
cat <<\EOF > dom
<domain type='test' id='2'>
<name>t2</name>
<uuid>004b96e1-2d78-c30f-5aa5-000000000000</uuid>
<memory>8388608</memory>
<vcpu>2</vcpu>
<os>
<type>xen</type>
</os>
<on_reboot>restart</on_reboot>
<on_poweroff>destroy</on_poweroff>
<on_crash>restart</on_crash>
</domain>
EOF
$abs_top_builddir/tools/virsh -c test:///default define dom > /dev/null || fail=1
mkfifo_or_skip_ fifo
cat dom > fifo &
$abs_top_builddir/tools/virsh -c test:///default define fifo > /dev/null || fail=1
(exit $fail); exit $fail

40
tests/virsh-schedinfo Executable file
View File

@ -0,0 +1,40 @@
#!/bin/sh
# Ensure that virsh schedinfo --set invalid=val fails
# Copyright (C) 2010-2011, 2013 Red Hat, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
. "$(dirname $0)/test-lib.sh"
VIRSH=$abs_top_builddir/tools/virsh
if test "$VERBOSE" = yes; then
set -x
$VIRSH --version
fi
printf 'Scheduler : fair\n\n' > exp-out || framework_failure
printf 'error: invalid scheduler option: j\n' > exp-err || framework_failure
fail=0
test_url=test:///default
$VIRSH -c $test_url schedinfo 1 --set j=k >out 2>err && fail=1
compare exp-out out || fail=1
compare exp-err err || fail=1
(exit $fail); exit $fail

48
tests/virsh-self-test Executable file
View File

@ -0,0 +1,48 @@
#!/bin/sh
# run virsh self-test to make sure command option structures are valid
# Copyright (C) 2016 Red Hat, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
. "$(dirname $0)/test-lib.sh"
fail=0
basename=$(basename $0)
if test "x$basename" = "xvirsh-self-test" ; then
binary=virsh
extra_args="-c test:///default"
elif test "x$basename" = "xvirt-admin-self-test" ; then
binary=virt-admin
extra_args=""
else
echo "Unknown binary: $basename";
exit 1
fi
test_intro "$0"
$abs_top_builddir/tools/${binary} ${extra_args} self-test > /dev/null
status=$?
test_result 1 "$0" ${status}
if test "${status}" != "0" ; then
fail=1
fi
test_final $counter $fail
(exit $fail); exit $fail

233
tests/virsh-snapshot Executable file
View File

@ -0,0 +1,233 @@
#!/bin/sh
# simple testing of snapshot APIs on test driver
# Copyright (C) 2019 Red Hat, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
. "$(dirname $0)/test-lib.sh"
test_expensive
if test "$VERBOSE" = yes; then
set -x
$abs_top_builddir/tools/virsh --version
fi
fail=0
mock_xdg_ || framework_failure
# The test driver loses states between restarts, so we perform a script
# with some convenient markers for later post-processing of output.
$abs_top_builddir/tools/virsh --connect test:///default >out 2>err '
# Create a series of snapshots, with names that intentionally sort
# differently by topology than by name. Use revert to create fanout.
snapshot-create-as test s1
snapshot-create-as test s1
snapshot-create-as test s3
snapshot-create-as test s2
snapshot-revert test s3
snapshot-create-as test s6
snapshot-create-as test s5
snapshot-revert test s6
snapshot-create-as test s4
snapshot-revert test s1
snapshot-create-as test s7
snapshot-create-as test s8
# checkpoints cannot be created while snapshots exist
echo --err marker
checkpoint-create-as test c1
echo --err marker
# Checking tree view (siblings sorted alphabetically)
snapshot-list test --tree
# Current was last one created, but we can change that
snapshot-current test --name
snapshot-current test s1
snapshot-current test --name
# Deleting current root leads to multiple roots, demonstrate list filtering
snapshot-delete test --current
echo --err marker
snapshot-current test --name
echo --err marker
snapshot-list test --roots
snapshot-list test --leaves
snapshot-list test --parent --no-leaves
snapshot-list test --from s3
snapshot-list test --from s3 --descendants --name
# More fun with delete flags, current node moves up to remaining parent
snapshot-current test s4
snapshot-delete test --children-only s6
snapshot-current test --name
snapshot-delete test --children s7
snapshot-current test --name
snapshot-delete test s6
snapshot-current test --name
# Now the tree is linear, so we have an unambiguous topological order
snapshot-list test --name
snapshot-list test --name --topological
# Capture some XML for later redefine
echo "<!--MarkerA-->"
snapshot-dumpxml test s3
echo "<!--MarkerB-->"
snapshot-dumpxml test s2
echo "<!--MarkerC-->"
# All done
' || fail=1
# First part is expected output, --tree results in trailing spaces,
# and snapshot-list produces timestamps
sed 's/ *$//; s/[0-9-]\{10\} [0-9:.]* .[0-9]\{4\}/TIMESTAMP/;
/MarkerA/,/MarkerC/d' < out > out.cooked || fail=1
# Second part holds domain snapshot XMLs
sed -n '/MarkerA/,/MarkerB/p' < out > s3.xml || fail=1
sed -n '/MarkerB/,/MarkerC/p' < out > s2.xml || fail=1
cat <<\EOF > exp || fail=1
Domain snapshot s1 created
Domain snapshot s3 created
Domain snapshot s2 created
Domain snapshot s3 reverted
Domain snapshot s6 created
Domain snapshot s5 created
Domain snapshot s6 reverted
Domain snapshot s4 created
Domain snapshot s1 reverted
Domain snapshot s7 created
Domain snapshot s8 created
s1
|
+- s3
| |
| +- s2
| +- s6
| |
| +- s4
| +- s5
|
+- s7
|
+- s8
s8
Snapshot s1 set as current
s1
Domain snapshot s1 deleted
Name Creation Time State
---------------------------------------------
s3 TIMESTAMP running
s7 TIMESTAMP running
Name Creation Time State
---------------------------------------------
s2 TIMESTAMP running
s4 TIMESTAMP running
s5 TIMESTAMP running
s8 TIMESTAMP running
Name Creation Time State Parent
------------------------------------------------------
s3 TIMESTAMP running
s6 TIMESTAMP running s3
s7 TIMESTAMP running
Name Creation Time State
---------------------------------------------
s2 TIMESTAMP running
s6 TIMESTAMP running
s2
s4
s5
s6
Snapshot s4 set as current
Domain snapshot s6 children deleted
s6
Domain snapshot s7 deleted
s6
Domain snapshot s6 deleted
s3
s2
s3
s3
s2
EOF
compare exp out.cooked || fail=1
cat <<EOF > exp || fail=1
error: operation failed: domain moment s1 already exists
error: marker
error: Operation not supported: cannot create checkpoint while snapshot exists
error: marker
error: marker
error: domain 'test' has no current snapshot
error: marker
EOF
compare exp err || fail=1
# Restore state with redefine
$abs_top_builddir/tools/virsh -c test:///default >out 2>err '
# Redefine must be in topological order; this will fail
snapshot-create test --redefine s2.xml --validate
echo --err marker
# This is the right order
snapshot-create test --redefine s3.xml --validate
snapshot-create test --redefine s2.xml --current --validate
snapshot-info test --current
' || fail=1
cat <<\EOF > exp || fail=1
Domain snapshot s3 created from 's3.xml'
Domain snapshot s2 created from 's2.xml'
Name: s2
Domain: test
Current: yes
State: running
Location: internal
Parent: s3
Children: 0
Descendants: 0
Metadata: yes
EOF
compare exp out || fail=1
cat <<EOF > exp || fail=1
error: invalid argument: parent s3 for moment s2 not found
error: marker
EOF
compare exp err || fail=1
(exit $fail); exit $fail

41
tests/virsh-start Executable file
View File

@ -0,0 +1,41 @@
#!/bin/sh
# ensure that virsh start works properly
# Copyright (C) 2008 Red Hat, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
. "$(dirname $0)/test-lib.sh"
if test "$VERBOSE" = yes; then
set -x
$abs_top_builddir/tools/virsh --version
fi
fail=0
test_url=test:///default
# expect this to fail
$abs_top_builddir/tools/virsh -c $test_url start test > out 2> err && fail=1
# stdout gets a newline
echo > exp || fail=1
compare exp out || fail=1
echo 'error: Domain is already active' > exp || fail=1
compare exp err || fail=1
(exit $fail); exit $fail

76
tests/virsh-undefine Executable file
View File

@ -0,0 +1,76 @@
#!/bin/sh
# exercise virsh's "undefine" command
# Copyright (C) 2008-2009, 2011 Red Hat, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
. "$(dirname $0)/test-lib.sh"
if test "$VERBOSE" = yes; then
set -x
$abs_top_builddir/tools/virsh --version
fi
fail=0
# Attempt to undefine a running domain, by domain name. Every time a new
# connection is opened to the test driver, it starts life with a new
# persistent running domain named 'test' with a different uuid, so
# testing this command requires batch mode use of virsh.
$abs_top_builddir/tools/virsh -c test:///default \
'dominfo test; undefine test; dominfo test' > out1 2>&1
test $? = 0 || fail=1
sed '/^Persistent/n; /:/d' < out1 > out
cat <<\EOF > exp || fail=1
Persistent: yes
Domain 'test' has been undefined
Persistent: no
EOF
compare exp out || fail=1
# A similar diagnostic when specifying a domain ID
$abs_top_builddir/tools/virsh -c test:///default \
'dominfo 1; undefine 1; dominfo 1' > out1 2>&1
test $? = 0 || fail=1
sed '/^Persistent/n; /:/d' < out1 > out
cat <<\EOF > exp || fail=1
Persistent: yes
Domain '1' has been undefined
Persistent: no
EOF
compare exp out || fail=1
# Succeed, now: first shut down, then undefine, both via name.
$abs_top_builddir/tools/virsh -c test:///default \
'shutdown test; undefine test; dominfo test' > out 2>&1
test $? = 1 || fail=1
cat <<\EOF > expout || fail=1
Domain 'test' is being shutdown
Domain 'test' has been undefined
error: failed to get domain 'test'
EOF
compare expout out || fail=1
(exit $fail); exit $fail

97
tests/virsh-uriprecedence Executable file
View File

@ -0,0 +1,97 @@
#!/bin/sh
. "$(dirname $0)/test-lib.sh"
# This test checks if virsh obeys the proper precedence of different
# URI settings
test_intro "virsh-uriprecedence"
virsh_bin="$abs_top_builddir/tools/virsh"
virsh_cmd="$virsh_bin"
counter=0
ret=0
mock_xdg_ || framework_failure
is_uri_good()
{
echo "$1" | grep -F "$good_uri" >/dev/null
}
test_uri_internal()
{
test_name=$1
test_cmd="$virsh_cmd \"$2\""
result=0
debug "Running '$test_cmd'"
out="$($virsh_cmd "$2")"
if ! is_uri_good "$out"; then
debug "Invalid output: '$out'"
result=1
ret=1
fi
counter="$((counter+1))"
test_result "$counter" "$1" "$result"
}
test_uri_connect()
{
test_uri_internal "$1" "connect; uri"
}
test_uri_noconnect()
{
test_uri_internal "$1" "uri"
}
test_uri()
{
test_uri_connect "$1"
test_uri_noconnect "$1"
}
# Precedence is the following (lowest priority first):
#
# 1) if run as root, 'uri_default' from /etc/libvirtd/libvirt.conf,
# otherwise qemu:///session. There is no way to mock this file for
# virsh/libvirt.so and the user may have set anything in there that
# would spoil the test, so we don't test this
#
# 2) 'uri_default' from $XDG_CONFIG_HOME/libvirt/libvirt.conf
#
# 3) LIBVIRT_DEFAULT_URI
#
# 4) VIRSH_DEFAULT_CONNECT_URI
#
# 5) parameter -c (--connect)
unset LIBVIRT_DEFAULT_URI
unset VIRSH_DEFAULT_CONNECT_URI
bad_uri="test:///default?bad_uri"
good_uri="test:///default?good_uri"
printf "uri_default=\"%s\"\n" "$good_uri" >"$XDG_CONFIG_HOME/libvirt/libvirt.conf"
if uid_is_privileged_; then
counter="$((counter+1))"
test_skip_case "$counter" "User config file" "must not be run as root"
else
test_uri "User config file"
fi
printf "uri_default=\"%s\"\n" "$bad_uri" >"$XDG_CONFIG_HOME/libvirt/libvirt.conf"
export LIBVIRT_DEFAULT_URI="$good_uri"
test_uri "LIBVIRT_DEFAULT_URI"
export LIBVIRT_DEFAULT_URI="$bad_uri"
export VIRSH_DEFAULT_CONNECT_URI="$good_uri"
test_uri "VIRSH_DEFAULT_CONNECT_URI"
export VIRSH_DEFAULT_CONNECT_URI="$bad_uri"
virsh_cmd="$virsh_bin --connect $good_uri"
test_uri "Parameter"
test_final "$counter" "$ret"
(exit "$ret"); exit "$ret"

100
tests/virsh-vcpupin Executable file
View File

@ -0,0 +1,100 @@
#!/bin/sh
# ensure that an invalid CPU spec elicits a diagnostic
# Copyright (C) 2008 Red Hat, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
. "$(dirname $0)/test-lib.sh"
if test "$VERBOSE" = yes; then
set -x
$abs_top_builddir/tools/virsh --version
fi
fail=0
# Invalid syntax.
$abs_top_builddir/tools/virsh --connect test:///default vcpupin test a 0,1 > out 2>&1
test $? = 1 || fail=1
cat <<\EOF > exp || fail=1
error: Numeric value 'a' for <vcpu> option is malformed or out of range
EOF
compare exp out || fail=1
# An out-of-range vCPU number deserves a diagnostic, too.
$abs_top_builddir/tools/virsh --connect test:///default vcpupin test 100 0,1 > out 2>&1
test $? = 1 || fail=1
cat <<\EOF > exp || fail=1
error: invalid argument: requested vcpu '100' is not present in the domain
EOF
compare exp out || fail=1
# Negative number
$abs_top_builddir/tools/virsh --connect test:///default vcpupin test -100 0,1 > out 2>&1
test $? = 1 || fail=1
cat <<\EOF > exp || fail=1
error: Numeric value '-100' for <vcpu> option is malformed or out of range
EOF
compare exp out || fail=1
# missing argument
$abs_top_builddir/tools/virsh --connect test:///default vcpupin test --cpulist 0,1 > out 2>&1
test $? = 1 || fail=1
cat <<\EOF > exp || fail=1
error: vcpupin: Missing vCPU number in pin mode.
EOF
compare exp out || fail=1
# An out-of-range vCPU number when get information with live flag
$abs_top_builddir/tools/virsh --connect test:///default vcpupin test 100 --live > out 2>&1
test $? = 1 || fail=1
cat <<\EOF > exp || fail=1
error: vcpu 100 is out of range of live cpu count 2
EOF
compare exp out || fail=1
# An out-of-range vCPU number when get information without flag
$abs_top_builddir/tools/virsh --connect test:///default vcpupin test 100 > out 2>&1
test $? = 1 || fail=1
cat <<\EOF > exp || fail=1
error: vcpu 100 is out of range of live cpu count 2
EOF
compare exp out || fail=1
# An out-of-range vCPU number when get information with config flag
$abs_top_builddir/tools/virsh --connect test:///default vcpupin test 100 --config > out 2>&1
test $? = 1 || fail=1
cat <<\EOF > exp || fail=1
error: vcpu 100 is out of range of persistent cpu count 2
EOF
compare exp out || fail=1
# An out-of-range vCPU number when get information with current flag
$abs_top_builddir/tools/virsh --connect test:///default vcpupin test 100 --current > out 2>&1
test $? = 1 || fail=1
cat <<\EOF > exp || fail=1
error: vcpu 100 is out of range of live cpu count 2
EOF
compare exp out || fail=1
(exit $fail); exit $fail

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +0,0 @@
setvcpus test 2
setvcpus --domain test 2
setvcpus --domain=test 2
setvcpus test --count 2
setvcpus test --count=2
setvcpus --domain test --count 2
setvcpus --domain=test --count 2
setvcpus --domain test --count=2
setvcpus --domain=test --count=2
setvcpus --count 2 --domain test
setvcpus --count 2 --domain=test
setvcpus --count=2 --domain test
setvcpus --count=2 --domain=test
setvcpus --count 2 test
setvcpus --count=2 test

View File

@ -1,91 +0,0 @@
commands: "setvcpus test 2
setvcpus --domain test 2
setvcpus --domain=test 2
setvcpus test --count 2
setvcpus test --count=2
setvcpus --domain test --count 2
setvcpus --domain=test --count 2
setvcpus --domain test --count=2
setvcpus --domain=test --count=2
setvcpus --count 2 --domain test
setvcpus --count 2 --domain=test
setvcpus --count=2 --domain test
setvcpus --count=2 --domain=test
setvcpus --count 2 test
setvcpus --count=2 test
"
setvcpus: domain(optdata): test
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: count(optdata): 2
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: count(optdata): 2
setvcpus: domain(optdata): test
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME
setvcpus: found option <domain>: test
setvcpus: <domain> trying as domain NAME

View File

@ -1,79 +0,0 @@
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype block
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype nothing
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype block --type disk
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type cdrom
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype block --type cdrom
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type blah
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype block --type blah
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --driver testdriver
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --subdriver qcow2
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --subdriver raw
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --cache none
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --subdriver qcow2 --cache none
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --subdriver qcow2 --serial TEST_SERIAL
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --mode readonly
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --mode shareable
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --mode whatever
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --subdriver qcow2 --alias testalias
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --rawio
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --multifunction
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --subdriver qcow2 --alias testalias --iothread 3 --mode readonly --cache none --driver qemu
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --address ide:1.2.3
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --address ide:1.2.4
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --address ide:1:2:5
attach-disk --print-xml --domain testdom --source /nonexistent/file --target sda --sourcetype file --type disk --address ide:1.2.3
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address ide:1.2.3
attach-disk --print-xml --domain testdom --source /nonexistent/file --target sda --sourcetype file --type disk --address usb:12.34
attach-disk --print-xml --domain testdom --source /nonexistent/file --target sda --sourcetype file --type disk --address usb:12.3
attach-disk --print-xml --domain testdom --source /nonexistent/file --target sda --sourcetype file --type disk --address usb:12:34
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address usb:12.34
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --address usb:12.34
attach-disk --print-xml --domain testdom --source /nonexistent/file --target sda --sourcetype file --type disk --address scsi:1.2.3
attach-disk --print-xml --domain testdom --source /nonexistent/file --target sda --sourcetype file --type disk --address scsi:1.2.4
attach-disk --print-xml --domain testdom --source /nonexistent/file --target sda --sourcetype file --type disk --address scsi:1:2:5
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --address scsi:1.2.3
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address scsi:1.2.3
attach-disk --print-xml --domain testdom --source /nonexistent/file --target sda --sourcetype file --type disk --address sata:1.2.3
attach-disk --print-xml --domain testdom --source /nonexistent/file --target sda --sourcetype file --type disk --address sata:1.2.4
attach-disk --print-xml --domain testdom --source /nonexistent/file --target sda --sourcetype file --type disk --address sata:1:2:5
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --address sata:1.2.3
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address sata:1.2.3
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address pci:12.34.56.78
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address pci:12:34:56:78
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address pci:12.34.56.aa
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --address pci:12.34.56.aa
attach-disk --print-xml --domain testdom --source /nonexistent/file --target sda --sourcetype file --type disk --address pci:12.34.56.aa
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address pci:12.34.56.78 --multifunction
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address pci:12:34:56:78 --multifunction
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address pci:12.34.56.aa --multifunction
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address ccw:12.34.56
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address ccw:12:34:56
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address ccw:12.34.56
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype file --type disk --address ccw:12.34.56
attach-disk --print-xml --domain testdom --source /nonexistent/file --target sda --sourcetype file --type disk --address ccw:12.34.56
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address test:12.34.56
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address test:12:34:56
attach-disk --print-xml --domain testdom --source /nonexistent/file --target vda --sourcetype file --type disk --address test:12.34.56
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --source-protocol AAA --sourcetype file
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype network
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype network --source-protocol TEST --source-host-name hostname
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype network --source-protocol TEST --source-host-name hostname:port
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype network --source-protocol TEST --source-host-name hostname:
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype network --source-protocol TEST --source-host-name :port
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype network --source-protocol TEST --source-host-name :
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype network --source-protocol TEST --source-host-name hostname:port --source-host-transport trnsp
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype network --source-protocol TEST --source-host-transport trnsp
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype network --source-protocol TEST --source-host-transport trnsp --source-host-socket /nonexistent/socket
attach-disk --print-xml --domain testdom --source /nonexistent/file --target hda --sourcetype network --source-protocol TEST --source-host-socket /nonexistent/socket

View File

@ -1,343 +0,0 @@
<disk type='file'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='file'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='block'>
<source dev='/nonexistent/file'/>
<target dev='hda'/>
</disk>
error: Unknown source type: 'nothing'
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='block' device='disk'>
<source dev='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='block' device='cdrom'>
<source dev='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='file' device='blah'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='block' device='blah'>
<source dev='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='file' device='disk'>
<driver name='testdriver'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='file' device='disk'>
<driver type='qcow2'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='file' device='disk'>
<driver type='raw'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='file' device='disk'>
<driver cache='none'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='file' device='disk'>
<driver type='qcow2' cache='none'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='file' device='disk'>
<driver type='qcow2'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<serial>TEST_SERIAL</serial>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<readonly/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<shareable/>
</disk>
error: No support for whatever in command 'attach-disk'
<disk type='file' device='disk'>
<driver type='qcow2'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<alias name='testalias'/>
</disk>
<disk type='file' device='disk' rawio='yes'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' iothread='3' cache='none'/>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<readonly/>
<alias name='testalias'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<address type='drive' controller='1' bus='2' unit='3'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<address type='drive' controller='1' bus='2' unit='4'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='hda'/>
<address type='drive' controller='1' bus='2' unit='5'/>
</disk>
error: expecting a scsi:00.00.00 or usb:00.00 or sata:00.00.00 address.
error: expecting a pci:0000.00.00.00 or ccw:00.0.0000 address.
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='usb' bus='12' port='34'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='usb' bus='12' port='3'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='usb' bus='12' port='34'/>
</disk>
error: expecting a pci:0000.00.00.00 or ccw:00.0.0000 address.
error: expecting an ide:00.00.00 address.
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='drive' controller='1' bus='2' unit='3'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='drive' controller='1' bus='2' unit='4'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='drive' controller='1' bus='2' unit='5'/>
</disk>
error: expecting an ide:00.00.00 address.
error: expecting a pci:0000.00.00.00 or ccw:00.0.0000 address.
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='drive' controller='1' bus='2' unit='3'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='drive' controller='1' bus='2' unit='4'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='sda'/>
<address type='drive' controller='1' bus='2' unit='5'/>
</disk>
error: expecting an ide:00.00.00 address.
error: expecting a pci:0000.00.00.00 or ccw:00.0.0000 address.
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='pci' domain='0x0012' bus='0x34' slot='0x56' function='0x78'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='pci' domain='0x0012' bus='0x34' slot='0x56' function='0x78'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='pci' domain='0x0012' bus='0x34' slot='0x56' function='0xaa'/>
</disk>
error: expecting an ide:00.00.00 address.
error: expecting a scsi:00.00.00 or usb:00.00 or sata:00.00.00 address.
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='pci' domain='0x0012' bus='0x34' slot='0x56' function='0x78' multifunction='on'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='pci' domain='0x0012' bus='0x34' slot='0x56' function='0x78' multifunction='on'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='pci' domain='0x0012' bus='0x34' slot='0x56' function='0xaa' multifunction='on'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='ccw' cssid='0x12' ssid='0x34' devno='0x0056'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='ccw' cssid='0x12' ssid='0x34' devno='0x0056'/>
</disk>
<disk type='file' device='disk'>
<source file='/nonexistent/file'/>
<target dev='vda'/>
<address type='ccw' cssid='0x12' ssid='0x34' devno='0x0056'/>
</disk>
error: expecting an ide:00.00.00 address.
error: expecting a scsi:00.00.00 or usb:00.00 or sata:00.00.00 address.
error: Invalid address.
error: Invalid address.
error: Invalid address.
error: --source-protocol option requires --sourcetype network
error: --source-protocol option requires --sourcetype network
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host name='hostname'/>
</source>
<target dev='hda'/>
</disk>
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host name='hostname' port='port'/>
</source>
<target dev='hda'/>
</disk>
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host name='hostname' port=''/>
</source>
<target dev='hda'/>
</disk>
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host name='' port='port'/>
</source>
<target dev='hda'/>
</disk>
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host name='' port=''/>
</source>
<target dev='hda'/>
</disk>
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host transport='trnsp' name='hostname' port='port'/>
</source>
<target dev='hda'/>
</disk>
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host transport='trnsp'/>
</source>
<target dev='hda'/>
</disk>
<disk type='network'>
<source protocol='TEST' name='/nonexistent/file'>
<host transport='trnsp' socket='/nonexistent/socket'/>
</source>
<target dev='hda'/>
</disk>
error: Option --source-host-transport is required by option --source-host-socket
## Exit code: 1

View File

@ -1,3 +0,0 @@
blkiotune fv0
blkiotune fv0 --weight 500 --device-weights /dev/hda,1000 --device-read-iops-sec /dev/hda,1000 --device-write-iops-sec /dev/hda,1000 --device-read-bytes-sec /dev/hda,1000 --device-write-bytes-sec /dev/hda,1000
blkiotune fv0

View File

@ -1,15 +0,0 @@
weight : 800
device_weight : /dev/hda,700
device_read_iops_sec: /dev/hda,700
device_write_iops_sec: /dev/hda,700
device_read_bytes_sec: /dev/hda,700
device_write_bytes_sec: /dev/hda,700
weight : 500
device_weight : /dev/hda,1000
device_read_iops_sec: /dev/hda,1000
device_write_iops_sec: /dev/hda,1000
device_read_bytes_sec: /dev/hda,1000
device_write_bytes_sec: /dev/hda,1000

View File

@ -1,41 +0,0 @@
<domaincheckpoint>
<name>c2</name>
<parent>
<name>c3</name>
</parent>
<creationTime>1234</creationTime>
<disks>
<disk name='vda' checkpoint='bitmap' bitmap='c2'/>
</disks>
<domain type='test'>
<name>test</name>
<uuid>6695eb01-f6a4-8304-79aa-97f2502e193f</uuid>
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static'>2</vcpu>
<os>
<type arch='i686'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<source file='/guest/diskimage1'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</disk>
<interface type='network'>
<mac address='aa:bb:cc:dd:ee:ff'/>
<source network='default'/>
<target dev='testnet0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</interface>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</memballoon>
</devices>
</domain>
</domaincheckpoint>

View File

@ -1,38 +0,0 @@
<domaincheckpoint>
<name>c3</name>
<creationTime>5678</creationTime>
<disks>
<disk name='vda' checkpoint='bitmap' bitmap='c3'/>
</disks>
<domain type='test'>
<name>test</name>
<uuid>6695eb01-f6a4-8304-79aa-97f2502e193f</uuid>
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static'>2</vcpu>
<os>
<type arch='i686'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<source file='/guest/diskimage1'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</disk>
<interface type='network'>
<mac address='aa:bb:cc:dd:ee:ff'/>
<source network='default'/>
<target dev='testnet0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</interface>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</memballoon>
</devices>
</domain>
</domaincheckpoint>

View File

@ -1,13 +0,0 @@
Redefine must be in topological order; this will fail
error: invalid argument: parent c3 for moment c2 not found
correct order
Domain checkpoint c3 created from 'checkpoint-c3.xml'
Domain checkpoint c2 created from 'checkpoint-c2.xml'
Name: c2
Domain: test
Parent: c3
Children: 0
Descendants: 0

View File

@ -1,35 +0,0 @@
echo Create a series of checkpoints, with names that intentionally sort
echo differently by topology than by name. For now, it is not possible
echo to create fanout without hacking through redefines.
checkpoint-create-as test c1
checkpoint-create-as test c1
checkpoint-create-as test c3
checkpoint-create-as test c2
echo snapshots cannot be created while checkpoints exist
snapshot-create-as test s1
echo Checking tree view (siblings sorted alphabetically)
checkpoint-list test --tree
echo Demonstrate list filtering
checkpoint-list test --roots --name
checkpoint-list test --leaves --name
checkpoint-list test --parent --no-leaves --name
checkpoint-list test --from c3 --name
checkpoint-list test --from c1 --descendants --name
echo Now the tree is linear, so we have an unambiguous topological order
checkpoint-list test --name
checkpoint-list test --name --topological
echo validate XML
checkpoint-delete test c1
checkpoint-dumpxml test c3
checkpoint-dumpxml test c2
echo Deleting current checkpoint moves current up to remaining parent
checkpoint-delete test --children-only c3
checkpoint-list test --leaves --name
checkpoint-delete test --children c3
checkpoint-list test --leaves --name

View File

@ -1,133 +0,0 @@
Create a series of checkpoints, with names that intentionally sort
differently by topology than by name. For now, it is not possible
to create fanout without hacking through redefines.
Domain checkpoint c1 created
error: operation failed: domain moment c1 already exists
Domain checkpoint c3 created
Domain checkpoint c2 created
snapshots cannot be created while checkpoints exist
error: Operation not supported: cannot create snapshot while checkpoint exists
Checking tree view (siblings sorted alphabetically)
c1
|
+- c3
|
+- c2
Demonstrate list filtering
c1
c2
c1
c3 c1
c2
c2
c3
Now the tree is linear, so we have an unambiguous topological order
c1
c2
c3
c1
c3
c2
validate XML
Domain checkpoint c1 deleted
<domaincheckpoint>
<name>c3</name>
<disks>
<disk name='vda' checkpoint='bitmap' bitmap='c3'/>
</disks>
<domain type='test'>
<name>test</name>
<uuid>6695eb01-f6a4-8304-79aa-97f2502e193f</uuid>
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static'>2</vcpu>
<os>
<type arch='i686'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<source file='/guest/diskimage1'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</disk>
<interface type='network'>
<mac address='aa:bb:cc:dd:ee:ff'/>
<source network='default'/>
<target dev='testnet0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</interface>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</memballoon>
</devices>
</domain>
</domaincheckpoint>
<domaincheckpoint>
<name>c2</name>
<parent>
<name>c3</name>
</parent>
<disks>
<disk name='vda' checkpoint='bitmap' bitmap='c2'/>
</disks>
<domain type='test'>
<name>test</name>
<uuid>6695eb01-f6a4-8304-79aa-97f2502e193f</uuid>
<memory unit='KiB'>8388608</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static'>2</vcpu>
<os>
<type arch='i686'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<source file='/guest/diskimage1'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</disk>
<interface type='network'>
<mac address='aa:bb:cc:dd:ee:ff'/>
<source network='default'/>
<target dev='testnet0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</interface>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</memballoon>
</devices>
</domain>
</domaincheckpoint>
Deleting current checkpoint moves current up to remaining parent
Domain checkpoint c3 children deleted
c3
Domain checkpoint c3 deleted

View File

@ -1 +0,0 @@
a

View File

@ -1 +0,0 @@
a

View File

@ -1 +0,0 @@
a --shell

View File

@ -1 +0,0 @@
-- --shell a

View File

@ -1 +0,0 @@
a

View File

@ -1 +0,0 @@
--shell a

View File

@ -1,3 +0,0 @@
error: failed to get domain '4294967298'
## Exit code: 1

View File

@ -1,18 +0,0 @@
dominfo ef861801-45b9-11cb-88e3-afbfe5370493
dominfo fc4
dominfo fc5
domid fc4
domid ef861801-45b9-11cb-88e3-afbfe5370493
domuuid 2
domuuid fc4
domname 2
domname ef861801-45b9-11cb-88e3-afbfe5370493
domstate 2
domstate ef861801-45b9-11cb-88e3-afbfe5370493
domstate fc4
domcontrol fc4

View File

@ -1,73 +0,0 @@
Id: 2
Name: fc4
UUID: ef861801-45b9-11cb-88e3-afbfe5370493
OS Type: linux
State: running
CPU(s): 1
Max memory: 261072 KiB
Used memory: 131072 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: testSecurity
Security DOI:
Security label: libvirt-test (enforcing)
Messages: tainted: network configuration using opaque shell scripts
Id: 2
Name: fc4
UUID: ef861801-45b9-11cb-88e3-afbfe5370493
OS Type: linux
State: running
CPU(s): 1
Max memory: 261072 KiB
Used memory: 131072 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: testSecurity
Security DOI:
Security label: libvirt-test (enforcing)
Messages: tainted: network configuration using opaque shell scripts
Id: 3
Name: fc5
UUID: 08721f99-3d1d-4aec-96eb-97803297bb36
OS Type: linux
State: running
CPU(s): 4
Max memory: 2097152 KiB
Used memory: 2097152 KiB
Persistent: yes
Autostart: disable
Managed save: no
Security model: testSecurity
Security DOI:
Security label: libvirt-test (enforcing)
Messages: tainted: running with undesirable elevated privileges
tainted: network configuration using opaque shell scripts
tainted: use of host cdrom passthrough
tainted: custom device tree blob used
tainted: use of deprecated configuration settings
deprecated configuration: CPU model Deprecated-Test
2
2
ef861801-45b9-11cb-88e3-afbfe5370493
ef861801-45b9-11cb-88e3-afbfe5370493
fc4
fc4
running
running
running
ok

View File

@ -1 +0,0 @@
hello

View File

@ -1,3 +0,0 @@
echo --string hello
echo --str hello
echo --hi;

View File

@ -1,3 +0,0 @@
hello
hello
hello

View File

@ -1,2 +0,0 @@
a A 0 + * ; . ' " / ? =
< > &

View File

@ -1,2 +0,0 @@
a A 0 + '*' ';' . ''\''' '"' / '?' = ' ' '
' '<' '>' '&'

View File

@ -1,2 +0,0 @@
a A 0 + * ; . &apos; &quot; / ? =
&lt; &gt; &amp;

View File

@ -1,11 +0,0 @@
echo a A 0 + * . \' / ? = < > &
echo --xml a A 0 + * . \' / ? = < > &
echo --shell a A 0 + * . \' / ? = < > &
echo ""
echo --shell
echo --xml
echo --shell
echo ''
echo --shell ""
echo --xml ''
echo --shell ""''

View File

@ -1,11 +0,0 @@
a A 0 + * . ' / ? = < > &
a A 0 + * . &apos; / ? = &lt; &gt; &amp;
a A 0 + '*' . ''\''' / '?' = '<' '>' '&'
''
''

View File

@ -1 +0,0 @@
a b

View File

@ -1 +0,0 @@
a b

View File

@ -1 +0,0 @@
a b

View File

@ -1 +0,0 @@
a b

View File

@ -1 +0,0 @@
' " \;echo a

View File

@ -1 +0,0 @@
' " ;echo a

View File

@ -1,2 +0,0 @@
' " \
a

View File

@ -1 +0,0 @@
' " \\

View File

@ -1,5 +0,0 @@
echo --split a,b,,c,,,d,,,,e,,,,,f,,,,,,e
echo --split ,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,
echo --split ,,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,,
echo --split ,,,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,,,
echo --split ,,,,a,b,,c,,,d,,,,e,,,,,f,,,,,,e,,,,

View File

@ -1,24 +0,0 @@
a
b,c,
d,,e,,
f,,,e
a
b,c,
d,,e,,
f,,,e
,a
b,c,
d,,e,,
f,,,e,
,
a
b,c,
d,,e,,
f,,,e,
,,a
b,c,
d,,e,,
f,,,e,,

View File

@ -1,2 +0,0 @@
list
nodeinfo

View File

@ -1,15 +0,0 @@
Id Name State
----------------------
1 fv0 running
2 fc4 running
3 fc5 running
CPU model: i986
CPU(s): 50
CPU frequency: 6000 MHz
CPU socket(s): 4
Core(s) per socket: 4
Thread(s) per core: 2
NUMA cell(s): 4
Memory size: 8192000 KiB

View File

@ -1,2 +0,0 @@
list
nodeinfo

Some files were not shown because too many files have changed in this diff Show More