unix:virtualization:techniques
Differences
This shows you the differences between two versions of the page.
Next revisionBoth sides next revision | |||
unix:virtualization:techniques [2020/02/19 15:02] – created rodolico | unix:virtualization:techniques [2020/02/19 15:15] – rodolico | ||
---|---|---|---|
Line 25: | Line 25: | ||
===== Sticky IP's (Reservations) with virt-manager ===== | ===== Sticky IP's (Reservations) with virt-manager ===== | ||
+ | virt-manager defaults to NAT on the networking. I find this useful on my laptop, where I don't always have a DHCP server available and the running virtuals should be private to my laptop. However, the dhcp server will occasionally give a different IP to the same machine. | ||
+ | To get around this, find the MAC address of the virtual, then set the network to always give it the same IP address. By default, the dhcp server built into virt-manager sets up an entire /24 range except for the primary IP, so we'll need to adjust that range also. | ||
+ | |||
+ | First, find the MAC address of the virtual you want to set up this way, and get the network list (usually " | ||
+ | <code bash> | ||
+ | # get network name | ||
+ | virsh net-list | ||
+ | # get MAC address of a virtual' | ||
+ | virsh dumpxml | ||
+ | </ | ||
+ | |||
+ | Now, edit the DHCP server | ||
+ | <code bash> | ||
+ | # change default to whatever you got in net-list, if it is different | ||
+ | virsh net-edit default | ||
+ | </ | ||
+ | |||
+ | Look through this list and find the XML block which defines the DHCP server. Adjust the range for automatic assignments to give you room to add your reservations, | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | <range start=' | ||
+ | <host mac=' | ||
+ | <host mac=' | ||
+ | <host mac=' | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Save your work, then you need to do something to get it all to begin work. [[https:// | ||
+ | |||
+ | ===== Links ===== | ||
+ | * [[https:// | ||
+ | * https:// |
unix/virtualization/techniques.txt · Last modified: 2022/05/08 17:52 by rodolico