Hangs on dhclient on Ubuntu 18.04, and works on 17.10:
$ virt-rescue --scratch --network -v -x
Runs perfectly on both 17.10 and 18.04, but there is no network set up:
$ virt-rescue --scratch -v -x
17.10:
...
+ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
+ ip r
+ lsmod
...
18.04:
...
+ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
+ ip r
+ cat /etc/resolv.conf
cat: /etc/resolv.conf: No such file or directory
+ lsmod
...
Difference in your two commands can be seen in qemu launch options; in 1st command there are parameters '-netdev user,id=usernet,net=169.254.0.0/16 -device virtio-net-pci,netdev=usernet', and in 2nd there are no such parameters.
Command below shows same behavior as first command you have suggested:
guestfish -a /dev/null --network -v -x run
Hangs on dhclient on Ubuntu 18.04, and works on 17.10:
$ virt-rescue --scratch --network -v -x
Runs perfectly on both 17.10 and 18.04, but there is no network set up:
$ virt-rescue --scratch -v -x
17.10: UP,LOWER_ UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
...
+ ip a
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
+ ip r
+ lsmod
...
18.04: UP,LOWER_ UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
...
+ ip a
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
+ ip r
+ cat /etc/resolv.conf
cat: /etc/resolv.conf: No such file or directory
+ lsmod
...
Difference in your two commands can be seen in qemu launch options; in 1st command there are parameters '-netdev user,id= usernet, net=169. 254.0.0/ 16 -device virtio- net-pci, netdev= usernet' , and in 2nd there are no such parameters.
Command below shows same behavior as first command you have suggested:
guestfish -a /dev/null --network -v -x run