diff options
author | Peter Maydell | 2019-09-05 18:09:13 +0200 |
---|---|---|
committer | Peter Maydell | 2019-09-05 18:09:13 +0200 |
commit | 90b1e3afd33226b6078fec6d77a18373712a975c (patch) | |
tree | 30ef7417309fe5241eaa547562d50b11f80df76c /docs/qemu-block-drivers.texi | |
parent | Merge remote-tracking branch 'remotes/berrange/tags/docs-pull-request' into s... (diff) | |
parent | gitlab-ci.yml: Install libattr-devel and libcap-devel to test virtio-9p (diff) | |
download | qemu-90b1e3afd33226b6078fec6d77a18373712a975c.tar.gz qemu-90b1e3afd33226b6078fec6d77a18373712a975c.tar.xz qemu-90b1e3afd33226b6078fec6d77a18373712a975c.zip |
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-09-05-v2' into staging
- Make the core libqtest library independent from global_qtest
- Clean up docs from hard-coded qemu-system-* names
- Install libattr-dev and libcap-dev in gitlab-ci to test virtio-9p
# gpg: Signature made Thu 05 Sep 2019 15:52:30 BST
# gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg: issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg: aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5
* remotes/huth-gitlab/tags/pull-request-2019-09-05-v2:
gitlab-ci.yml: Install libattr-devel and libcap-devel to test virtio-9p
qemu-doc: Do not hard-code the name of the QEMU binary
tests/vm: Take the J=x setting into account for the vm-boot-ssh targets, too
tests/libqtest: Use libqtest-single.h in tests that require global_qtest
tests/libqtest: Move global_test wrapper function into a separate header
tests: Remove unnecessary global_qtest references
tests/libqos: Replace clock_step with qtest_clock_step in virtio code
tests/libqos/e1000e: Make e1000e libqos functions independent from global_qtest
tests/migration: Do not use functions anymore that rely on global_qtest
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'docs/qemu-block-drivers.texi')
-rw-r--r-- | docs/qemu-block-drivers.texi | 72 |
1 files changed, 37 insertions, 35 deletions
diff --git a/docs/qemu-block-drivers.texi b/docs/qemu-block-drivers.texi index c02547e28c..2c7ea49c32 100644 --- a/docs/qemu-block-drivers.texi +++ b/docs/qemu-block-drivers.texi @@ -2,6 +2,8 @@ QEMU block driver reference manual @c man end +@set qemu_system qemu-system-x86_64 + @c man begin DESCRIPTION @node disk_images_formats @@ -405,7 +407,7 @@ QEMU can automatically create a virtual FAT disk image from a directory tree. In order to use it, just type: @example -qemu-system-i386 linux.img -hdb fat:/my_directory +@value{qemu_system} linux.img -hdb fat:/my_directory @end example Then you access access to all the files in the @file{/my_directory} @@ -415,14 +417,14 @@ them via SAMBA or NFS. The default access is @emph{read-only}. Floppies can be emulated with the @code{:floppy:} option: @example -qemu-system-i386 linux.img -fda fat:floppy:/my_directory +@value{qemu_system} linux.img -fda fat:floppy:/my_directory @end example A read/write support is available for testing (beta stage) with the @code{:rw:} option: @example -qemu-system-i386 linux.img -fda fat:floppy:rw:/my_directory +@value{qemu_system} linux.img -fda fat:floppy:rw:/my_directory @end example What you should @emph{never} do: @@ -440,14 +442,14 @@ QEMU can access directly to block device exported using the Network Block Device protocol. @example -qemu-system-i386 linux.img -hdb nbd://my_nbd_server.mydomain.org:1024/ +@value{qemu_system} linux.img -hdb nbd://my_nbd_server.mydomain.org:1024/ @end example If the NBD server is located on the same host, you can use an unix socket instead of an inet socket: @example -qemu-system-i386 linux.img -hdb nbd+unix://?socket=/tmp/my_socket +@value{qemu_system} linux.img -hdb nbd+unix://?socket=/tmp/my_socket @end example In this case, the block device must be exported using qemu-nbd: @@ -464,23 +466,23 @@ qemu-nbd --socket=/tmp/my_socket --share=2 my_disk.qcow2 @noindent and then you can use it with two guests: @example -qemu-system-i386 linux1.img -hdb nbd+unix://?socket=/tmp/my_socket -qemu-system-i386 linux2.img -hdb nbd+unix://?socket=/tmp/my_socket +@value{qemu_system} linux1.img -hdb nbd+unix://?socket=/tmp/my_socket +@value{qemu_system} linux2.img -hdb nbd+unix://?socket=/tmp/my_socket @end example If the nbd-server uses named exports (supported since NBD 2.9.18, or with QEMU's own embedded NBD server), you must specify an export name in the URI: @example -qemu-system-i386 -cdrom nbd://localhost/debian-500-ppc-netinst -qemu-system-i386 -cdrom nbd://localhost/openSUSE-11.1-ppc-netinst +@value{qemu_system} -cdrom nbd://localhost/debian-500-ppc-netinst +@value{qemu_system} -cdrom nbd://localhost/openSUSE-11.1-ppc-netinst @end example The URI syntax for NBD is supported since QEMU 1.3. An alternative syntax is also available. Here are some example of the older syntax: @example -qemu-system-i386 linux.img -hdb nbd:my_nbd_server.mydomain.org:1024 -qemu-system-i386 linux2.img -hdb nbd:unix:/tmp/my_socket -qemu-system-i386 -cdrom nbd:localhost:10809:exportname=debian-500-ppc-netinst +@value{qemu_system} linux.img -hdb nbd:my_nbd_server.mydomain.org:1024 +@value{qemu_system} linux2.img -hdb nbd:unix:/tmp/my_socket +@value{qemu_system} -cdrom nbd:localhost:10809:exportname=debian-500-ppc-netinst @end example @node disk_images_sheepdog @@ -505,7 +507,7 @@ qemu-img convert @var{filename} sheepdog:///@var{image} You can boot from the Sheepdog disk image with the command: @example -qemu-system-i386 sheepdog:///@var{image} +@value{qemu_system} sheepdog:///@var{image} @end example You can also create a snapshot of the Sheepdog image like qcow2. @@ -517,7 +519,7 @@ where @var{tag} is a tag name of the newly created snapshot. To boot from the Sheepdog snapshot, specify the tag name of the snapshot. @example -qemu-system-i386 sheepdog:///@var{image}#@var{tag} +@value{qemu_system} sheepdog:///@var{image}#@var{tag} @end example You can create a cloned image from the existing snapshot. @@ -530,14 +532,14 @@ is its tag name. You can use an unix socket instead of an inet socket: @example -qemu-system-i386 sheepdog+unix:///@var{image}?socket=@var{path} +@value{qemu_system} sheepdog+unix:///@var{image}?socket=@var{path} @end example If the Sheepdog daemon doesn't run on the local host, you need to specify one of the Sheepdog servers to connect to. @example qemu-img create sheepdog://@var{hostname}:@var{port}/@var{image} @var{size} -qemu-system-i386 sheepdog://@var{hostname}:@var{port}/@var{image} +@value{qemu_system} sheepdog://@var{hostname}:@var{port}/@var{image} @end example @node disk_images_iscsi @@ -627,7 +629,7 @@ cat >iscsi.conf <<EOF header-digest = "CRC32C" EOF -qemu-system-i386 -drive file=iscsi://127.0.0.1/iqn.qemu.test/1 \ +@value{qemu_system} -drive file=iscsi://127.0.0.1/iqn.qemu.test/1 \ -readconfig iscsi.conf @end example @@ -646,7 +648,7 @@ tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 2 \ -b /IMAGES/cd.iso --device-type=cd tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL -qemu-system-i386 -iscsi initiator-name=iqn.qemu.test:my-initiator \ +@value{qemu_system} -iscsi initiator-name=iqn.qemu.test:my-initiator \ -boot d -drive file=iscsi://127.0.0.1/iqn.qemu.test/1 \ -cdrom iscsi://127.0.0.1/iqn.qemu.test/2 @end example @@ -659,11 +661,11 @@ GlusterFS is a user space distributed file system. You can boot from the GlusterFS disk image with the command: @example URI: -qemu-system-x86_64 -drive file=gluster[+@var{type}]://[@var{host}[:@var{port}]]/@var{volume}/@var{path} +@value{qemu_system} -drive file=gluster[+@var{type}]://[@var{host}[:@var{port}]]/@var{volume}/@var{path} [?socket=...][,file.debug=9][,file.logfile=...] JSON: -qemu-system-x86_64 'json:@{"driver":"qcow2", +@value{qemu_system} 'json:@{"driver":"qcow2", "file":@{"driver":"gluster", "volume":"testvol","path":"a.img","debug":9,"logfile":"...", "server":[@{"type":"tcp","host":"...","port":"..."@}, @@ -711,22 +713,22 @@ qemu-img create gluster://@var{host}/@var{volume}/@var{path} @var{size} Examples @example -qemu-system-x86_64 -drive file=gluster://1.2.3.4/testvol/a.img -qemu-system-x86_64 -drive file=gluster+tcp://1.2.3.4/testvol/a.img -qemu-system-x86_64 -drive file=gluster+tcp://1.2.3.4:24007/testvol/dir/a.img -qemu-system-x86_64 -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]/testvol/dir/a.img -qemu-system-x86_64 -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]:24007/testvol/dir/a.img -qemu-system-x86_64 -drive file=gluster+tcp://server.domain.com:24007/testvol/dir/a.img -qemu-system-x86_64 -drive file=gluster+unix:///testvol/dir/a.img?socket=/tmp/glusterd.socket -qemu-system-x86_64 -drive file=gluster+rdma://1.2.3.4:24007/testvol/a.img -qemu-system-x86_64 -drive file=gluster://1.2.3.4/testvol/a.img,file.debug=9,file.logfile=/var/log/qemu-gluster.log -qemu-system-x86_64 'json:@{"driver":"qcow2", +@value{qemu_system} -drive file=gluster://1.2.3.4/testvol/a.img +@value{qemu_system} -drive file=gluster+tcp://1.2.3.4/testvol/a.img +@value{qemu_system} -drive file=gluster+tcp://1.2.3.4:24007/testvol/dir/a.img +@value{qemu_system} -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]/testvol/dir/a.img +@value{qemu_system} -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]:24007/testvol/dir/a.img +@value{qemu_system} -drive file=gluster+tcp://server.domain.com:24007/testvol/dir/a.img +@value{qemu_system} -drive file=gluster+unix:///testvol/dir/a.img?socket=/tmp/glusterd.socket +@value{qemu_system} -drive file=gluster+rdma://1.2.3.4:24007/testvol/a.img +@value{qemu_system} -drive file=gluster://1.2.3.4/testvol/a.img,file.debug=9,file.logfile=/var/log/qemu-gluster.log +@value{qemu_system} 'json:@{"driver":"qcow2", "file":@{"driver":"gluster", "volume":"testvol","path":"a.img", "debug":9,"logfile":"/var/log/qemu-gluster.log", "server":[@{"type":"tcp","host":"1.2.3.4","port":24007@}, @{"type":"unix","socket":"/var/run/glusterd.socket"@}]@}@}' -qemu-system-x86_64 -drive driver=qcow2,file.driver=gluster,file.volume=testvol,file.path=/path/a.img, +@value{qemu_system} -drive driver=qcow2,file.driver=gluster,file.volume=testvol,file.path=/path/a.img, file.debug=9,file.logfile=/var/log/qemu-gluster.log, file.server.0.type=tcp,file.server.0.host=1.2.3.4,file.server.0.port=24007, file.server.1.type=unix,file.server.1.socket=/var/run/glusterd.socket @@ -739,13 +741,13 @@ You can access disk images located on a remote ssh server by using the ssh protocol: @example -qemu-system-x86_64 -drive file=ssh://[@var{user}@@]@var{server}[:@var{port}]/@var{path}[?host_key_check=@var{host_key_check}] +@value{qemu_system} -drive file=ssh://[@var{user}@@]@var{server}[:@var{port}]/@var{path}[?host_key_check=@var{host_key_check}] @end example Alternative syntax using properties: @example -qemu-system-x86_64 -drive file.driver=ssh[,file.user=@var{user}],file.host=@var{server}[,file.port=@var{port}],file.path=@var{path}[,file.host_key_check=@var{host_key_check}] +@value{qemu_system} -drive file.driver=ssh[,file.user=@var{user}],file.host=@var{server}[,file.port=@var{port}],file.path=@var{path}[,file.host_key_check=@var{host_key_check}] @end example @var{ssh} is the protocol. @@ -808,13 +810,13 @@ driver. For example: # echo 0000:06:0d.0 > /sys/bus/pci/devices/0000:06:0d.0/driver/unbind # echo 1102 0002 > /sys/bus/pci/drivers/vfio-pci/new_id -# qemu-system-x86_64 -drive file=nvme://@var{host}:@var{bus}:@var{slot}.@var{func}/@var{namespace} +# @value{qemu_system} -drive file=nvme://@var{host}:@var{bus}:@var{slot}.@var{func}/@var{namespace} @end example Alternative syntax using properties: @example -qemu-system-x86_64 -drive file.driver=nvme,file.device=@var{host}:@var{bus}:@var{slot}.@var{func},file.namespace=@var{namespace} +@value{qemu_system} -drive file.driver=nvme,file.device=@var{host}:@var{bus}:@var{slot}.@var{func},file.namespace=@var{namespace} @end example @var{host}:@var{bus}:@var{slot}.@var{func} is the NVMe controller's PCI device |