Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
kvm [2019/02/09 09:54] – [Harddisks] admin | kvm [2021/02/14 09:36] (current) – [Edit networks] dani | ||
---|---|---|---|
Line 95: | Line 95: | ||
virsh --connect qemu:/// | virsh --connect qemu:/// | ||
</ | </ | ||
- | * Start a console session | + | * Setup autostart (when booting the KVM server) |
virsh --connect qemu:/// | virsh --connect qemu:/// | ||
</ | </ | ||
+ | |||
+ | | **Note: | ||
===== Installation of VM’s ===== | ===== Installation of VM’s ===== | ||
Line 151: | Line 153: | ||
* Attach a network interface to a virtual machine (domain):< | * Attach a network interface to a virtual machine (domain):< | ||
virsh attach-interface --domain <vm name> --type bridge --source virbr0 --model virtio --config --live | virsh attach-interface --domain <vm name> --type bridge --source virbr0 --model virtio --config --live | ||
- | </ | + | </ |
- | + | ||
- | + | ||
- | + | ||
- | <code bash> | + | |
virsh attach-interface --domain <vm name> --type direct --source enp0s31f6 --model virtio --config --live | virsh attach-interface --domain <vm name> --type direct --source enp0s31f6 --model virtio --config --live | ||
</ | </ | ||
+ | |||
| **Note: | | **Note: | ||
+ | |||
* Unordered List ItemIf you want to figure out the IP addresss of one or more VM’s, you can use the following command executed on the KVM host:< | * Unordered List ItemIf you want to figure out the IP addresss of one or more VM’s, you can use the following command executed on the KVM host:< | ||
vm=fedora27 | vm=fedora27 | ||
Line 184: | Line 184: | ||
<bridge name=' | <bridge name=' | ||
<mac address=' | <mac address=' | ||
- | <ip address=' | + | <ip address=' |
< | < | ||
- | <range start=' | + | <range start=' |
- | <host mac=' | + | <host mac=' |
- | <host mac=' | + | <host mac=' |
- | <host mac=' | + | <host mac=' |
- | <host mac=' | + | |
- | <host mac=' | + | |
- | <host mac=' | + | |
- | <host mac=' | + | |
- | <host mac=' | + | |
- | <host mac=' | + | |
- | <host mac=' | + | |
- | <host mac=' | + | |
- | <host mac=' | + | |
- | <host mac=' | + | |
- | <host mac=' | + | |
- | <host mac=' | + | |
</ | </ | ||
</ip> | </ip> | ||
Line 214: | Line 202: | ||
</ | </ | ||
* Delete a vm (host) in a network (here '' | * Delete a vm (host) in a network (here '' | ||
- | virsh net-update default delete ip-dhcp-host "< | + | virsh net-update default delete ip-dhcp-host "< |
+ | </ | ||
+ | * Add a network configuration (host) live:< | ||
+ | virsh net-update default add ip-dhcp-host "< | ||
</ | </ | ||
Line 226: | Line 217: | ||
| **Note: | | **Note: | ||
+ | |||
+ | ==== Resize (LVM) disk ==== | ||
+ | |||
+ | * First increase size of the LV on KVM host:< | ||
+ | lvresize -G < | ||
+ | </ | ||
+ | * Configure the size of that domain and disk using '' | ||
+ | virsh blockresize < | ||
+ | </ | ||
+ | |||