I am trying to run Ubuntu 16.04 on kvmTool. I am using following command to run the Ubuntu image on guest:

sudo http://superuser.com/lkvm run -k ~/kvmtool/guest_linux_kernel/linux-4.13/arch/x86_64/boot/bzImage -m 448 -c 4 --network mode=user --disk ~/kvmtool/ubuntu_disk/ubuntuD.img -i ~/kvmtool/guest_linux_kernel/linux-4.13/initrd-4.13.0-41-generic.img -p "root=/dev/vda1"`

It fails to configure the network device correctly. Here is the output of lkvm run: https://gist.github.com/proywm/ef801970aaa3e1857f798b4ffb7e6413

Network information:

ifconfig -a

enp0s0 Link encap:Ethernet HWaddr 02:15:15:15:15:15 inet addr:192.168.33.15 Bcast:192.168.33.255 Mask:255.255.255.0inet6 addr: fe80::47f3:7c5b:78c4:93cc/64 Scope:LinkUP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1RX packets:23 errors:0 dropped:0 overruns:0 frame:0TX packets:63 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000 RX bytes:3710 (3.7 KB) TX bytes:7908 (7.9 KB)lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0inet6 addr: ::1/128 Scope:HostUP LOOPBACK RUNNING MTU:65536 Metric:1RX packets:206 errors:0 dropped:0 overruns:0 frame:0TX packets:206 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000 RX bytes:14940 (14.9 KB) TX bytes:14940 (14.9 KB)

ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00inet 127.0.0.1/8 scope host lovalid_lft forever preferred_lft foreverinet6 ::1/128 scope host valid_lft forever preferred_lft forever2: enp0s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000link/ether 02:15:15:15:15:15 brd ff:ff:ff:ff:ff:ffinet 192.168.33.15/24 brd 192.168.33.255 scope global dynamic enp0s0valid_lft 14363sec preferred_lft 14363secinet6 fe80::47f3:7c5b:78c4:93cc/64 scope link valid_lft forever preferred_lft forever

sudo cat /etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)auto loiface lo inet loopback

The disk image works fine when loaded with Qemu.

How can I enable network interfaces of Ubuntu using kvmtool?

    Your Answer

     

    By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

    Browse other questions tagged or ask your own question.