User Tools

Site Tools


unix:virtualization:virtlib:quickreference

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
unix:virtualization:virtlib:quickreference [2022/07/19 20:44] rodolicounix:virtualization:virtlib:quickreference [2023/02/26 17:12] (current) rodolico
Line 1: Line 1:
 ====== virt-lib Quick Reference ====== ====== virt-lib Quick Reference ======
 +
 +virtlib stores its configuration for each //domain// (virtual) in /etc/libvirt/qemu*.xml. You should not manually modify anything in this directory, but you can safely do any read-only operation. To edit/export/whatever, the //virsh// command has several options that will help you out.
 +
 +The xml files are, well, xml. The format is documented at https://libvirt.org/formatdomain.html which is guaranteed to either help you, or put you to sleep.
  
 ===== virt-top ===== ===== virt-top =====
Line 250: Line 254:
  
 In my case, I had built a Windows domain without using virtio, and I wanted to change it. This was actually the simplest way I found to do it. In my case, I had built a Windows domain without using virtio, and I wanted to change it. This was actually the simplest way I found to do it.
-==== Links ====+ 
 +===== Naming Network Links ===== 
 + 
 +to give a domain interface a static name when it is run, you can add the following to the interface definition. 
 +<code xml><target dev='dom113'/></code> 
 +NOTE: the name must not begin with 'vnet', 'vif', 'macvtap', or 'macvlan', which are prefixes reserved by libvirt and certain hypervisors. See 
 +https://libvirt.org/formatdomain.html#overriding-the-target-element 
 +<code xml> 
 +   <interface type='bridge'> 
 +      <mac address='00:16:3e:6b:f4:da'/> 
 +      <source bridge='br_lan'/> 
 +      <target dev='dom113'/> 
 +      <model type='virtio'/> 
 +      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> 
 +    </interface> 
 +</code> 
 + 
 +You can now do things like <code bash>ifconfig dom113</code> or <code bash>ip a show dom113</code> 
 + 
 +===== Adding USB Drive Image ===== 
 + 
 +Building and using a USB Thumbdrive image is a little weird, but it can be done. See [[software:multibootusb|]] for an example of one way I did it. 
 + 
 +===== Links =====
  
   * https://www.caretech.io/2017/10/18/converting-windows-vm-hard-disk-interface-to-virtio-with-proxmox-ve-5/   * https://www.caretech.io/2017/10/18/converting-windows-vm-hard-disk-interface-to-virtio-with-proxmox-ve-5/
Line 257: Line 284:
   * https://serverfault.com/questions/672253/how-to-configure-and-use-qemu-guest-agent-in-ubuntu-12-04-my-main-aim-is-to-get#691616   * https://serverfault.com/questions/672253/how-to-configure-and-use-qemu-guest-agent-in-ubuntu-12-04-my-main-aim-is-to-get#691616
   * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/virtualization_administration_guide/sect-qemu_guest_agent-running_the_qemu_guest_agent_on_a_windows_guest   * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/virtualization_administration_guide/sect-qemu_guest_agent-running_the_qemu_guest_agent_on_a_windows_guest
 +  * https://libvirt.org/formatdomain.html
 +
unix/virtualization/virtlib/quickreference.1658281446.txt.gz · Last modified: 2022/07/19 20:44 by rodolico