Skip to content
This repository was archived by the owner on Mar 2, 2024. It is now read-only.

Commit 2854d9c

Browse files
mariasfiraialaunikraft-bot
authored andcommitted
Fix command for manually running redis
Signed-off-by: Maria Sfiraiala <maria.sfiraiala@gmail.com> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Reviewed-by: Razvan Deaconescu <razvand@unikraft.io> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #6
1 parent afda44b commit 2854d9c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ $ ip a s virbr0
3838

3939
Now we start the virtual machine and pass it the proper arguments to assign the IP address `172.44.0.2/24`:
4040
```
41-
$ kraft run -b virbr0 "netdev.ipv4_addr=172.44.0.2 netdev.ipv4_gw_addr=172.44.0.1 netdev.ipv4_subnet_mask=255.255.255.0 --"
41+
$ kraft run -b virbr0 "netdev.ipv4_addr=172.44.0.2 netdev.ipv4_gw_addr=172.44.0.1 netdev.ipv4_subnet_mask=255.255.255.0 -- /redis.conf"
4242
[...]
4343
0: Set IPv4 address 172.44.0.2 mask 255.255.255.0 gw 172.44.0.1
4444
en0: Added
@@ -90,18 +90,24 @@ To configure it for the KVM platform:
9090
$ make menuconfig
9191
```
9292

93+
Be aware of the fact that you'll have to choose a file system: for instance, from the `vfscore` library, choose the `Default root filesystem` to be `9pfs`.
94+
95+
If you are going to use the `qemu-guest` script or `kraft` to launch the app, you need to name the `Default root device` `fs0` (`Library Configuration` -> `vfscore` -> `Default root device`).
96+
This is due to how the `qemu-guest` script and `kraft` automatically tag the FS devices attached to `qemu`.
97+
9398
Build the application:
9499
```
95100
$ make
96101
```
97102

98103
Run the application:
99104
```
100-
sudo qemu-system-x86_64 \
105+
sudo qemu-system-x86_64 -fsdev local,id=myid,path=$(pwd)/fs0,security_model=none \
106+
-device virtio-9p-pci,fsdev=myid,mount_tag=fs0,disable-modern=on,disable-legacy=off \
101107
-netdev bridge,id=en0,br=virbr0 \
102108
-device virtio-net-pci,netdev=en0 \
103109
-kernel "build/app-redis_kvm-x86_64" \
104-
-append "netdev.ipv4_addr=172.44.0.2 netdev.ipv4_gw_addr=172.44.0.1 netdev.ipv4_subnet_mask=255.255.255.0 --" \
110+
-append "netdev.ipv4_addr=172.44.0.2 netdev.ipv4_gw_addr=172.44.0.1 netdev.ipv4_subnet_mask=255.255.255.0 -- /redis.conf" \
105111
-cpu host \
106112
-enable-kvm \
107113
-nographic

0 commit comments

Comments
 (0)