Skip to content

Commit

Permalink
Update README with an example of bridge networked
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianrakel committed Sep 24, 2024
1 parent 948cba9 commit a5551b3
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ libvirt::network { 'net-ovs':

Define a domain (VM):

<<<<<<< HEAD
```
libvirt::domain { 'my-domain':
devices_profile => 'default',
Expand All @@ -151,6 +152,36 @@ libvirt::domain { 'my-domain':
autostart => true,
}
```

Define a domain (VM) with a bridged network:
*the network device must exists*
```
libvirt::domain { 'my-domain':
devices_profile => 'default',
dom_profile => 'default',
boot => 'hd',
domconf => { memory => { values => '2048', attrs => { unit => 'MiB' }}},
disks => [{'type' => 'block',
'device' => 'disk',
'source' => {'dev' => '/dev/vm-pool/my-domain.img'},
},
{'type' => 'file',
'device' => 'disk',
'source' => {'dev' => '/var/lib/libvirt/images/my-disk.qcow2'},
'bus' => 'virtio',
'driver' => {'name' => 'qemu',
'type' => 'qcow2',
'cache' => 'none',
},
],
interfaces => [{
'network' => virbr0',
'bridge_network' => true,
},
],
autostart => true,
}
```

Define a storage pool:

Expand Down

0 comments on commit a5551b3

Please sign in to comment.