net-uuid
--network
network-name
Name | Required? | Description |
---|---|---|
--network network-name
|
Required
|
The name of the virtual network you want the UUID for.
The word "
--network " itself is optional.
|
virsh #net-uuid
mynetwork
mynetwork
".
virsh #net-uuid
--network
mynetwork
virsh #net-uuid
examplenetwork
bfbc4c69-7d6a-cc9a-904c-09910ce179c0
virsh # net-dumpxml bfbc4c69-7d6a-cc9a-904c-09910ce179c0 <network> <name>examplenetwork</name> <-- the name is here <uuid>b7005dec-be1a-fe9a-338a-0cb1301dfcfd</uuid> <-- the UUID is here <forward mode='route'/> <bridge name='virbr100' stp='on' delay='1' /> <ip address='10.10.120.1' netmask='255.255.255.0'> </ip> </network>
net-uuid
is more efficient than dumping the XML for the virtual network and manually extracting the uuid value.