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
Next revisionBoth sides next revision
fuss:libvirt [2018/01/09 18:32] – [Hotswap CD-ROM or Floppy] officefuss:libvirt [2018/07/27 13:27] – [Create a New Virtual Machine] office
Line 11: Line 11:
 Next, to start the install, run: Next, to start the install, run:
 <code bash> <code bash>
-virt-install --name live --network bridge:br0 --ram 1024 --boot cdrom --cdrom live.iso --graphics vnc,listen=192.168.1.1,port=5901 --disk /var/lib/libvirt/images/live.img+virt-install --name live 
 +    --network bridge:br0 --ram 1024 
 +    --boot cdrom --cdrom live.iso 
 +    --graphics vnc,listen=192.168.1.1,port=5901 
 +    --disk /var/lib/libvirt/images/live.img
 </code> </code>
  
Line 62: Line 66:
 ... ...
       <model type='virtio'/>       <model type='virtio'/>
-...+      <driver> 
 +        <host gso='off' tso4='off' tso6='off' ecn='off' ufo='off'/> 
 +        <guest tso4='off' tso6='off' ecn='off'/> 
 +      </driver>
     </interface>     </interface>
 </code> </code>
 +
 +The ''driver'' block ensures that various offload parameters are turned off for the host and guest which is deemed to be good practice for virtio interfaces on a bridge. Additionally, the bridge can be configured to turn off most of the offloading:
 +<code bash>
 +ethtool -K br0 tso off sg off ufo off gro off gso off
 +</code>
 +where:
 +  * ''br0'' is the bridge interface to which the virtio interfaces are added.
 +
 +
  
 ====== Speed-Up Virtualization using Multi-Queue VirtIO Networking ====== ====== Speed-Up Virtualization using Multi-Queue VirtIO Networking ======
Line 600: Line 616:
   * ''vms'' is the libvirt storage pool for the domain ''mydomain.db''.   * ''vms'' is the libvirt storage pool for the domain ''mydomain.db''.
  
 +====== Passing Plan 9 Permissions ======
 +
 +Given a passed-through folder defined in the domain configuration file:
 +<code xml>
 +    <filesystem type='mount' accessmode='passthrough'>
 +      <source dir='/mnt/cdrom'/>
 +      <target dir='cd'/>
 +    </filesystem>
 +</code>
 +
 +virtual machines running under ''qemu'' / ''kvm'' have to be started as root. To accomplish that, edit ''/etc/default/libvirt/qemu.conf'' and set:
 +<code>
 +user = "root"
 +group = "root"
 +</code>
 +
 +Additionally, the following setting:
 +<code>
 +clear_emulator_capabilities = 0
 +</code>
 +has to be added to ''/etc/default/libvirt/qemu.conf''.
 +
 +Once the virtual machine boots, the share can then be automatically mounted by adding the following line:
 +<code>
 +cd  /mnt/share     9p      defaults,trans=virtio,version=9p2000.L,posixacl 0       0
 +</code>
  
 +to ''/etc/fstab'', where
 +  * ''cd'' is the name of the share exposed by the host,
 +  * ''/mnt/share'' is the path to a directory where the host share will be mounted,
 +  * ''posixacl'' turns on passing POSIX ACLs (very convenient for using ''getfacl'' and ''setfacl'' to fine tune permissions).
  
  

fuss/libvirt.txt · Last modified: 2023/08/21 09:09 by office

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.