From aeede83c9a6a4b07aee477b67d763561a3f342e6 Mon Sep 17 00:00:00 2001 From: Ming Yang Date: Wed, 18 Aug 2021 18:44:39 +0800 Subject: [PATCH 01/10] docs: fix some statement Signed-off-by: Ming Yang --- docs/config_guidebook.md | 32 ++++++++++++++++--------------- docs/interconnect_with_libvirt.md | 8 ++++---- docs/stratovirt_aarch64.xml | 10 +++++----- docs/stratovirt_x86.xml | 12 ++++++------ 4 files changed, 32 insertions(+), 30 deletions(-) diff --git a/docs/config_guidebook.md b/docs/config_guidebook.md index 72b4c7e..e1279e1 100644 --- a/docs/config_guidebook.md +++ b/docs/config_guidebook.md @@ -148,7 +148,7 @@ There is only one argument for iothread: Virtio block device is a virtual block device, which process read and write requests in virtio queue from guest. -Eight properties are supported for virtio block device. +Nine properties are supported for virtio block device. * drive_id: unique device-id in StratoVirt. * path_on_host: the path of block device in host. @@ -156,7 +156,8 @@ Eight properties are supported for virtio block device. * read_only: whether virtio block device is read-only. If not set, default is false. * direct: open block device with `O_DIRECT` mode. If not set, default is true. * iothread: indicate which iothread will be used, if not specified the main thread will be used. (optional) -* iops: used to limit IO operations for block device. (optional) +* throttling.iops-total: used to limit IO operations for block device. (optional) +* if: drive type, for block drive, it should be `none`. If not set, default is `none` (optional) * format: the format of block image, default value `raw`. NB: currently only `raw` is supported. (optional) If not set, default is raw. @@ -170,11 +171,11 @@ If you want to boot VM with a virtio block device as rootfs, you should add `roo ```shell # virtio mmio block device. --drive id=drive_id,file=path_on_host[,serial=serial_num,readonly=off,direct=off] --device virtio-blk-device,drive=drive_id[,iothread=iothread1,iops=200] +-drive id=drive_id,file=path_on_host[,serial=serial_num,readonly=off,direct=off,throttling.iops-total=200] +-device virtio-blk-device,drive=drive_id[,iothread=iothread1] # virtio pci block device. --drive id=drive_id,file=path_on_host[,serial=serial_num,readonly=off,direct=off] --device virtio-blk-pci,drive=drive_id,bus=pcie.0,addr=0x3.0x0[,iothread=iothread1,iops=200] +-drive id=drive_id,file=path_on_host[,serial=serial_num,readonly=off,direct=off,throttling.iops-total=200] +-device virtio-blk-pci,drive=drive_id,bus=pcie.0,addr=0x3.0x0[,iothread=iothread1] ``` @@ -207,11 +208,11 @@ is a single function device, the function number should be set to zero. ```shell # virtio mmio net device --netdev tap,id=netdevid,ifname=host_dev_name[,mac=12:34:56:78:9A:BC] --device virtio-net-device,netdev=netdevid,id=netid[,iothread=iothread1] +-netdev tap,id=netdevid,ifname=host_dev_name +-device virtio-net-device,netdev=netdevid,id=netid[,iothread=iothread1,mac=12:34:56:78:9A:BC] # virtio pci net device --netdev tap,id=netdevid,ifname=host_dev_name[,mac=12:34:56:78:9A:BC] --device virtio-net-pci,netdev=netdevid,id=netid,bus=pcie.0,addr=0x2.0x0[,iothread=iothread1] +-netdev tap,id=netdevid,ifname=host_dev_name +-device virtio-net-pci,netdev=netdevid,id=netid,bus=pcie.0,addr=0x2.0x0[,iothread=iothread1,mac=12:34:56:78:9A:BC] ``` StratoVirt also supports vhost-net to get a higher performance in network. It can be set by @@ -222,11 +223,11 @@ given when `vhost=on`, StratoVirt gets it by opening "/dev/vhost-net" automatica ```shell # virtio mmio net device --netdev tap,id=netdevid,ifname=host_dev_name,vhost=on[,mac=12:34:56:78:9A:BC,vhostfd=2] --device virtio-net-device,netdev=netdevid,id=netid[,iothread=iothread1] +-netdev tap,id=netdevid,ifname=host_dev_name,vhost=on[,vhostfd=2] +-device virtio-net-device,netdev=netdevid,id=netid[,iothread=iothread1,mac=12:34:56:78:9A:BC] # virtio pci net device --netdev tap,id=netdevid,ifname=host_dev_name,vhost=on[,mac=12:34:56:78:9A:BC,vhostfd=2] --device virtio-net-pci,netdev=netdevid,id=netid,bus=pcie.0,addr=0x2.0x0[,iothread=iothread1] +-netdev tap,id=netdevid,ifname=host_dev_name,vhost=on[,vhostfd=2] +-device virtio-net-pci,netdev=netdevid,id=netid,bus=pcie.0,addr=0x2.0x0[,iothread=iothread1,mac=12:34:56:78:9A:BC] ``` *How to set a tap device?* @@ -290,10 +291,11 @@ If you want use it, need: And `modprobe vhost_vsock` in the host. -Two properties can be set for virtio vsock device. +Three properties can be set for virtio vsock device. * vsock_id: unique device-id in StratoVirt. * guest_cid: a unique Context-ID in host to each guest, it should satisfy `3<=guest_cid/path/to/standard_vm_kernel -console=ttys0 root=/dev/vda reboot=k panic=1 rw +console=ttyS0 root=/dev/vda reboot=k panic=1 rw ``` - feature: @@ -77,7 +77,7 @@ Pflash can be added by the following config. `/path/to/pflash` is the path of pflash file. ``` /path/to/pflash -/path/to/OVMF_VARS +/path/to/OVMF_VARS ``` - iothread @@ -144,7 +144,7 @@ To use `virsh console` command, the virtio console with redirect `pty` should be - /dev/random + /path/to/random_file
``` @@ -153,7 +153,7 @@ To use `virsh console` command, the virtio console with redirect `pty` should be ``` - +
diff --git a/docs/stratovirt_aarch64.xml b/docs/stratovirt_aarch64.xml index 9bbf8d2..fa37d2b 100644 --- a/docs/stratovirt_aarch64.xml +++ b/docs/stratovirt_aarch64.xml @@ -13,7 +13,7 @@ hvm /path/to/standard_vm_kernel - console=ttys0 root=/dev/vda reboot=k panic=1 rw + console=ttyAMA0 root=/dev/vda reboot=k panic=1 rw /path/to/pflash @@ -24,8 +24,8 @@ /path/to/StratoVirt_binary_file - - + +
@@ -58,7 +58,7 @@ - /dev/random + /path/to/random_file
@@ -67,7 +67,7 @@
- +
diff --git a/docs/stratovirt_x86.xml b/docs/stratovirt_x86.xml index b561a5f..68069c0 100644 --- a/docs/stratovirt_x86.xml +++ b/docs/stratovirt_x86.xml @@ -13,9 +13,9 @@ hvm /path/to/standard_vm_kernel - console=ttys0 root=/dev/vda reboot=k panic=1 rw + console=hvc0 root=/dev/vda reboot=k panic=1 rw /path/to/pflash - /path/to/OVMF_VARS + /path/to/OVMF_VARS @@ -32,8 +32,8 @@ - - + + @@ -66,7 +66,7 @@ - /dev/random + /path/to/random_file
@@ -75,7 +75,7 @@
- +
-- 2.25.1