net-autostart --network network-identifier --disable
| Name | Required? | Description |
|---|---|---|
--network network-identifier
|
Required
|
The name or UUID for the virtual network being configured.
The word "
--network" itself is optional.
|
--disable
|
Optional
|
Disables the automatic starting of the virtual network.
|
virsh #net-autostartdefault--disable
default" from automatically starting when the libvirt daemon starts.
virsh #net-autostart--networkdefault--disable
virsh #net-autostartbfbc4c69-7d6a-cc9a-904c-09910ce179c0--disable
bfbc4c69-7d6a-cc9a-904c-09910ce179c0" from automatically starting when the libvirt daemon starts.
virsh #net-autostart--networkbfbc4c69-7d6a-cc9a-904c-09910ce179c0--disable
virsh #net-autostartdefault
default", by the libvirt daemon when it starts.
virsh #net-autostart--networkdefault
<network> <name>examplenetwork</name> <bridge name="virbr100" /> <forward mode="route" /> <ip address="10.10.120.1" netmask="255.255.255.0" /> </network>
# ls -al /root/examplenetwork.xml -rw-r--r--. 1 root root 162 Nov 7 16:43 /root/examplenetwork.xml
# virsh
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # net-list Name State Autostart ----------------------------------------- default active yes
virsh # net-define /root/examplenetwork.xml
Network examplenetwork defined from /root/examplenetwork.xmlvirsh # net-list --all Name State Autostart ----------------------------------------- default active yes examplenetwork inactive no <-- this is the important bit
virsh #net-autostartexamplenetworkNetwork examplenetworkmarked as autostarted
virsh # net-list --all Name State Autostart ----------------------------------------- default active yes examplenetwork inactive yes <-- this is the important bit
--disable option to the command:
#net-autostart--disableexamplenetworkNetwork examplenetworkunmarked as autostarted
virsh # net-list --all Name State Autostart ----------------------------------------- default active yes examplenetwork inactive no <-- this is the important bit