net-destroy
--network
network-identifier
Name | Required? | Description |
---|---|---|
--network network-identifier
|
Required
|
The name or UUID of the network to be shut down..
The word "
--network " itself is optional.
|
virsh # net-dumpxml examplenetwork <network> <name>examplenetwork</name> <uuid>b7005dec-be1a-fe9a-338a-0cb1301dfcfd</uuid> <forward mode='route'/><bridge name='
virbr100
' stp='on' delay='0' />
<ip address='10.10.120.1' netmask='255.255.255.0'> </ip> </network>
ifconfig
, or a similar tool such as ip
, the virbr100 interface will be seen on the host when the virtual network is running:
# ifconfig virbr100 virbr100 Link encap:Ethernet HWaddr D2:43:D9:47:FA:AA inet addr:10.10.120.1 Bcast:10.10.120.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:7 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:1553 (1.5 KiB)
net-destroy
command, the Linux OS will no longer show this interface:
# ifconfig virbr100
virbr100: error fetching interface information: Device not found
virsh #net-destroy
mynetwork
virsh #net-destroy
--network
mynetwork
virsh #net-destroy
bfbc4c69-7d6a-cc9a-904c-09910ce179c0
virsh #net-destroy
--network
bfbc4c69-7d6a-cc9a-904c-09910ce179c0
examplenetwork
, already running on a virtualisation host server:
virsh # net-list Name State Autostart ----------------------------------------- default active yes examplenetwork active yes
net-destroy
command on it:
#net-destroy
examplenetwork
Network examplenetwork destroyed
virsh # net-list --all Name State Autostart ----------------------------------------- default active yes examplenetwork inactive yes