Created
August 8, 2014 17:55
-
-
Save hub-cap/8e90b5f47d289e613ceb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
virsh -c lxc:/// net-destroy default | |
virsh -c lxc:/// net-undefine default | |
echo "<network> | |
<name>default</name> | |
<uuid>feb3e820-777f-c3df-defe-94d8c140791a</uuid> | |
<forward mode='nat'/> | |
<bridge name='br100' stp='on' delay='0' /> | |
<mac address='52:54:00:F4:0B:84'/> | |
<ip address='10.0.0.1' netmask='255.255.255.0'> | |
<dhcp> | |
<range start='10.0.0.2' end='10.0.0.254' /> | |
</dhcp> | |
</ip> | |
</network>" | sudo tee /etc/libvirt/qemu/networks/default.xml | |
virsh -c lxc:/// net-define /etc/libvirt/qemu/networks/default.xml | |
virsh -c lxc:/// net-start default | |
Do openvz stuff now and profit | |
cuz you need to be root running those commands to get redirection to a file that is owned by root.
baz@marceline:~$ echo "FOO" >> /etc/libvirt/ZOMG
bash: /etc/libvirt/ZOMG: Permission denied
baz@marceline:~$ sudo echo "FOO" >> /etc/libvirt/ZOMG
bash: /etc/libvirt/ZOMG: Permission denied
baz@marceline:~$ echo "FOO" | sudo tee /etc/libvirt/ZOMG
FOO
I see makes sense.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sudo tee? why u no use the '>>'