Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My original purpose is to create centos image for openstack. Although I did directly with kvm, still wondering about error.

Was using this manual for my task.

After this command:

# virt-install --virt-type kvm --name centos-6.4 --ram 1024 \
--cdrom=/data/isos/CentOS-6.4-x86_64-netinstall.iso \
--disk /tmp/centos-6.4.qcow2,format=qcow2 \
--network network=default \
--graphics vnc,listen=0.0.0.0 --noautoconsole \
--os-type=linux --os-variant=rhel6

I got an error:

ERROR    Error in network device parameters: Virtual network 'default' does not exist: Network not found: no network with matching name 'default'

Needless to say that I'm using RDO. By default I don't have any pre-configured network devices for libvirt. Question is which networking devices are available? Or if there's none, how to create one? Maybe RDO has different approach on libvirt networking?

share|improve this question
    
I proposed a documentation patch to document how to start the 'default' network if it isn't running: review.openstack.org/44784 –  Lorin Hochstein Sep 3 '13 at 2:57

4 Answers 4

up vote 1 down vote accepted

List available networks and specify the one you need:

virsh net-list

You can use virt-manager GUI too.

share|improve this answer
    
seems to be there's no any in there.. how can I add one..? RDO seems to be using bridge interface. actually launching this container directly from qemu it works. Wondering why it's not working for virsh. –  holms Aug 28 '13 at 13:34
    
p.s. RDO/Openstack is quite complicated system, it puts all the data to it's db, etc –  GioMac Aug 28 '13 at 13:34
1  
virt-install uses libvirt, if virsh doesn't show you anything about it, then it wont do anything. you can create network with virt-manager, or virsh net-create: libvirt.org/sources/virshcmdref/html/sect-net-create.html –  GioMac Aug 28 '13 at 13:36
1  
ok i've changed network option with this and it's working --network=bridge=br100,mac=22:44:66:EE:EF:1F specified my bridge device which was created by RDO, and random mac address. not sure if internet will work inside vm, but I need virsh only for using virt-sysprep tool –  holms Aug 28 '13 at 13:46

list files in

/etc/libvirt/qemu/networks/

and

/etc/libvirt/qemu/networks/autostart/

if empty - create it

useful commands:

virsh net-start default

or

virsh net-autostart default

and

virsh net-destroy default
virsh net-undefine default
service libvirtd restart

for detailed explanation read wiki: http://wiki.libvirt.org/page/Networking

share|improve this answer

You can start the default network by doing:

virsh net-start default
share|improve this answer

This is actually expected behaviour it seems .. something to do with how NAT forwarding is set-up by default. The system expects a 'default' network, bound to virbr0. So, if you delete that network, virt-install would no longer run as expected.

You probably can work around this if you are willing to poke around the innards of libvirt config files, and modify all relevant configuration file defaults. The error message can also be made more useful and explanatory ..

To recreate the network, first move off the network currently assigned to virbr0, and then:

# virsh net-define /usr/share/libvirt/networks/default.xml
Network default defined from /usr/share/libvirt/networks/default.xml
# virsh net-autostart default
Network default marked as autostarted
# virsh net-start default
Network default started`

Of course, you can also recreate the 'default' network via the virt-manager or other GUI ..

See more details here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.