Aashica
Aashica

Reputation: 21

virt-install command inside a container

to run the libvirtd service in a container - used the steps listed in the below link- http://www.projectatomic.io/blog/2014/10/libvirtd_in_containers/

Was successfully able to launch the libvirtd service container on rhel7. But when I launch the libvirt-client container and try to run the virt-install command on this to launch fedora- we see the following error.

[root@b054f0860441 libvirt]# virt-install --name fedoratest --vcpus=4 --ram 4096 --os-type=linux --disk path=/var/lib/libvirt/images/Fedora-Cloud-Base-24-1.2.x8664.qcow2,format=qcow2,size=9 --check pathinuse=off, --noautoconsole --network bridge=virbr0 --import WARNING KVM acceleration not available, using 'qemu' WARNING Disk /var/lib/libvirt/images/Fedora-Cloud-Base-24-1.2.x8664.qcow2 is already in use by other guests ['x', 'y'].

Starting install... ERROR Cannot get interface MTU on 'virbr0': No such device -------->>>> This seems to be the error

connectivity to the docker0, virbr0 networks, DNS connectivity etc- all is fine. ifconfig commands don't list the interfaces inside the container, but 'ip addr' lists the interfaces inside docker. Any help is appreciated.

Upvotes: 1

Views: 1869

Answers (1)

Aashica
Aashica

Reputation: 21

Using --network none helped to proceed with the install. So if you want to see the login prompt for fedora. This is the command which worked for me: This specific Fedora image loads with network none option:

docker run -it --rm -v /var/lib/libvirt:/var/lib/libvirt cisco-kuldeep_libvirt-client virt-install --name fedora_test25 --vcpus=1 --ram 4096 --os-type=linux --network none --disk path=/var/lib/libvirt/images/Fedora-x86_64-20-20131211.1-sda.qcow2,format=qcow2,size=9 --check path_in_use=off, --graphics none --network none --import

Upvotes: 1

Related Questions