RE: How to configure a libvirt network in %post (virsh fails due to libvirtd unable to run)

"Goller, Sean" <[email protected]>
Newsgroups gmane.linux.redhat.kickstart.general
Message-ID <D5C6242D1836D2448715E2EA82207B0D903F9F160F@cs-mail04.cloudshield.com>
Just copy the xml file manually into /etc/libvirt/qemu/networks/ , then put a symlink to it in /etc/libvirt/qemu/networks/autostart/ .

Create the network on an existing system then check out those directories to see how it's set up.

-Sean.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Patrick Lists
Sent: Wednesday, March 28, 2012 3:38 PM
To: [email protected]
Subject: How to configure a libvirt network in %post (virsh fails due to libvirtd unable to run)

Hi,

I am trying to do something like this in the %post section of the kickstart file for my F16 workstation:

# setup libvirt network
cat > /home/patrick/Downloads/vmr.xml <<EOF <network> <name>vmr</name> <forward mode='route'/> <bridge name='virbr1' /> <ip address='192.168.198.1' netmask='255.255.255.0'> </ip> </network> EOF

# make sure libvirtd is started
service libvirtd restart

# add the network
virsh net-define vmr.xml
virsh net-start vmr
virsh net-autostart vmr

Unfortunately the virsh commands fail because it seems it is not possible to start libvirtd and afaict virsh requires libvirtd.

Anyone have any suggestions how to make this work?

Thanks!

Regards,
Patrick

_______________________________________________
Kickstart-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/kickstart-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.