8 For this use case we will assume FD.io VPP is installed. We will also assume the user can create and start
9 basic virtual machines. This use case will use the linux virsh commands. For more information on virsh
10 refer to `virsh man page <https://linux.die.net/man/1/virsh>`_.
12 The image that we use is based on an Ubuntu cloud image downloaded from:
13 `Ubuntu Cloud Images <https://cloud-images.ubuntu.com/xenial/current>`_.
15 All FD.io VPP commands are being run from a su shell.
22 In this case we will use 2 systems. One system we will be running standard linux, the other will
25 .. figure:: /_images/vhost-topo.png
28 Vhost Use Case Topology
30 Creating The Virtual Interface
31 ------------------------------
33 We will start on the system running FD.io VPP and show that no Virtual interfaces have been created.
34 We do this using the :ref:`showintcommand` command.
36 Notice we do not have any virtual interfaces. We do have an interface (TenGigabitEthernet86/0/0) that
37 is up. This interface is connected to a system running, in our example standard linux. We will use
38 this system to verify our connectivity to our VM with ping.
40 .. code-block:: console
45 __/ __/ _ \ (_)__ | | / / _ \/ _ \
46 _/ _// // / / / _ \ | |/ / ___/ ___/
47 /_/ /____(_)_/\___/ |___/_/ /_/
51 Name Idx State Counter Count
52 TenGigabitEthernet86/0/0 1 up
53 TenGigabitEthernet86/0/1 2 down
57 For more information on the interface commands refer to: :ref:`intcommands`
59 The next step will be to create the virtual port using the :ref:`createvhostuser` command.
60 This command will create the virtual port in VPP and create a linux socket that the VM will
61 use to connect to VPP.
63 The port can be created using VPP as the socket server or client.
65 Creating the VPP port:
67 .. code-block:: console
69 vpp# create vhost socket /tmp/vm00.sock
72 Name Idx State Counter Count
73 TenGigabitEthernet86/0/0 1 up
74 TenGigabitEthernet86/0/1 2 down
75 VirtualEthernet0/0/0 3 down
79 Notice the interface **VirtualEthernet0/0/0**. In this example we created the virtual interface as
82 We can get more detail on the vhost connection with the :ref:`showvhost` command.
84 .. code-block:: console
87 Virtio vhost-user interfaces
89 coalesce frames 32 time 1e-3
90 number of rx virtqueues in interrupt mode: 0
91 Interface: VirtualEthernet0/0/0 (ifindex 3)
93 features mask (0xffffffffffffffff):
94 features (0x58208000):
95 VIRTIO_NET_F_MRG_RXBUF (15)
96 VIRTIO_NET_F_GUEST_ANNOUNCE (21)
97 VIRTIO_F_ANY_LAYOUT (27)
98 VIRTIO_F_INDIRECT_DESC (28)
99 VHOST_USER_F_PROTOCOL_FEATURES (30)
100 protocol features (0x3)
101 VHOST_USER_PROTOCOL_F_MQ (0)
102 VHOST_USER_PROTOCOL_F_LOG_SHMFD (1)
104 socket filename /tmp/vm00.sock type client errno "No such file or directory"
107 tx placement: spin-lock
111 Memory regions (total 0)
113 Notice **No such file or directory** and **Memory regions (total 0)**. This is because the
114 VM has not been created yet.