From Fedora Project Wiki
Description
This test aims to verify networking is setup correctly
Setup
Follow the VirtSandbox common setup
Ensure the default libvirt network is configured
# yum install libvirt-daemon-config-network # systemctl restart libvirtd.service # virsh net-start default
How to test
- Run a sandbox without any networking
- virt-sandbox -c $URI /bin/sh
- $ ifconfig
- Run a sandbox with dynamic (DHCP) networking
- virt-sandbox -c $URI --network dhcp /bin/sh
- $ ifconfig
- Run a sandbox with static networking
- virt-sandbox -c $URI --network address=192.168.122.50/24%192.168.122.1 /bin/sh
- $ ifconfig
Expected Results
- No network interfaces should be shown. Only lo should exist, but be offline
- Two network interfaces:
- eth0 Link encap:Ethernet HWaddr 52:54:00:68:E9:5C
- inet addr:192.168.122.50 Bcast:192.168.122.1 Mask:255.255.255.0
- inet6 addr: fe80::5054:ff:fe68:e95c/64 Scope:Link
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:5 errors:0 dropped:0 overruns:0 frame:0
- TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:336 (336.0 b) TX bytes:238 (238.0 b)
- lo Link encap:Local Loopback
- inet addr:127.0.0.1 Mask:255.0.0.0
- inet6 addr: ::1/128 Scope:Host
- UP LOOPBACK RUNNING MTU:16436 Metric:1
- RX packets:0 errors:0 dropped:0 overruns:0 frame:0
- TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
- As with DHCP, two network interfaces