Difference between revisions of "Talk:Libvirt"

From ArchWiki
Jump to: navigation, search
m (added proper section headings)
(Xen integration?: Close)
 
(27 intermediate revisions by 11 users not shown)
Line 1: Line 1:
==Xen integration?==
 
What is the reasoning behind disabling xen integration? I'm tempted to open a bug for the missing xen integration, but I assume there is a reason it is excluded. [[User:TripleSpeeder|TripleSpeeder]] ([[User talk:TripleSpeeder|talk]]) 14:43, 27 November 2012 (UTC)
 
 
 
==libvirt-guests and systemd==
 
==libvirt-guests and systemd==
 
libvirt-guests does not work with systemd. At least not without modification to the scripts.  
 
libvirt-guests does not work with systemd. At least not without modification to the scripts.  
Line 11: Line 8:
 
</nowiki></pre>
 
</nowiki></pre>
 
--[[User:En0|En0]] ([[User talk:En0|talk]]) 14:35, 10 December 2012 (UTC)
 
--[[User:En0|En0]] ([[User talk:En0|talk]]) 14:35, 10 December 2012 (UTC)
 
==virt-manager 0.9.4 broken?==
 
virt-manager-0.9.4-4 python scripts don't seem to be working. I have been testing them all day.. Including but not limited to a full clean reinstall of Arch 4 times.. I have been getting the error: Building default storage pool failed error. So as a work around I used is below.. This is after the directories are created and root has access to them.
 
<pre><nowiki>
 
 
# virsh
 
# pool-destroy default
 
# pool-undefine default
 
# pool-define-as --name default --type dir --target /path/to/default/directory
 
# pool-autostart default
 
# pool-build default
 
# pool-start default
 
# pool-destroy local
 
# pool-undefine local
 
# pool-define-as --name local-iso --type dir --target /path/to/default/local-iso/directory
 
# pool-autostart local-iso
 
# pool-build local-iso
 
# pool-start local-iso
 
# quit
 
 
$ virt-manager
 
</nowiki></pre>
 
--[[User:Rxdarkdawg10|Rxdarkdawg10]] ([[User talk:Rxdarkdawg10|talk]]) 21:17, 30 January 2013 (MST)
 
 
==QEMU/libvirt broke==
 
Last version broke for me. It was a permissions issue that i solved by creating a service account.
 
I am running v1.0.2-1 with qemu.
 
 
Create service account for qemu:
 
<pre><nowiki># useradd -g kvm -M -N -r qemu</nowiki></pre>
 
 
Edit to run under creds: /etc/libvirt/qemu.conf
 
<pre><nowiki>
 
user='qemu'
 
group='kvm'
 
</nowiki></pre>
 
 
Also you will need to modify the permissions to the /dev/kvm
 
<pre>
 
# chown root:kvm /dev/kvm
 
</pre>
 
--[[User:En0|En0]] ([[User talk:En0|talk]]) 04:50, 31 January 2013 (UTC)
 
  
 
==KVM acceleration after removing qemu-kvm package==
 
==KVM acceleration after removing qemu-kvm package==
Line 77: Line 32:
 
--[[User:En0|En0]] ([[User talk:En0|talk]]) 15:49, 7 March 2013 (UTC)
 
--[[User:En0|En0]] ([[User talk:En0|talk]]) 15:49, 7 March 2013 (UTC)
  
== bridged network edit ==
+
== kvm group ==
  
note: sorry this is typed all lowercase (broken wrist)
+
About the disput of using or not the kvm group, the discussion which lead to adding this group in the [[Users_and_groups#Deprecated_or_unused_groups|depreceated group list]] is [https://wiki.archlinux.org/index.php?title=Talk:KVM&oldid=283995#kvm_user_group there]; deleted from the talk page of KVM article.
 +
[[User:Bricewge|Bricewge]] ([[User talk:Bricewge|talk]]) 16:26, 18 September 2014 (UTC)
  
im looking to do an edit on bridged networking section im looking for a suggestion as what to keep since netcfg is deprecated...
+
== Errors and possible fixes ==
 +
If you get the following error(s) when creating a new virtual machine using virt-manager:
  
i pretty much want to layout how to set a bridge with netctl...
+
<pre><nowiki>
 +
summary=Error launching details: 'Terminal' object has no attribute 'set_visible_bell'
 +
details=Error launching details: 'Terminal' object has no attribute 'set_visible_bell'
 +
</nowiki></pre>
  
Host
+
install extra/vte290
  
first find your network device to bridge...
+
<pre><nowiki>
 +
sudo pacman -S vte290
 +
</nowiki></pre>
  
ip a
+
and change the following line in /usr/share/virt-manager/virtManager/serialcon.py
  
it should be somthing along the lines of enpXXX
+
BEFORE
  
next create the bridge profile for netctl, then start and enable it
+
<pre><nowiki>
 +
from gi.repository import Vte
 +
</nowiki></pre>
  
/etc/netctl/br0
+
AFTER
  
Description="Internet bridge"
+
<pre><nowiki>
Interface=br0
+
#from gi.repository import Vte
Connection=bridge
+
import gi
BindsToInterfaces=(enp8s)  
+
gi.require_version('Vte', '2.90')
IP=dhcp
+
from gi.repository import Vte
 
+
</nowiki></pre>
netctl start br0
 
 
 
netctl enable br0
 
 
 
Guest
 
 
 
now this is where i need suggestions...is the current info relevant?
 
  
all i did was setup my vm to use br0 in virt-manager
+
to explicitely use a vte 290 terminal
  
i will go through these steps i used virt-manager but dont want to delete info if it isnt deprecate
+
== Trouble shooting when configuring network ==
  
:(Sorry for your wrist)
+
After following the instructions configuring a libvirt environment, if one provides the argument {{ic|1=--network bridge=xxx}} to <br>[[#Create a new domain using virt-install|virt-install]], then an error may occur:
  
:Please don't delete anything if you're not sure of what you're doing: add templates like [[Template:Accuracy]] or [[Template:Out of date]] where appropriate instead. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 13:35, 16 July 2013 (UTC)
+
ERROR    internal error: /usr/lib/qemu/qemu-bridge-helper --br=xxx --fd=xx: \<br>
 +
failed to communicate with bridge helper: Transport endpoint is not connected  <br>
 +
<br>
 +
stderr=failed to parse default acl file `/etc/qemu/bridge.conf'
  
::Kynikos, just wondering if the info is still relevant as i took a totally different approach with virt-manager, ill go ahead and post my relevant info, removing only the deprecated netcfg stuff  --[[User:Dzavitz|Dzavitz]] ([[User talk:Dzavitz|talk]]) 06:21, 17 July 2013 (UTC)
+
I would like to add a note section which describes the solution to this error, which is to create a file {{ic|/etc/qemu/bridge.conf}} with proper settings.
  
:::Ok, just always remember to use the Edit Summary, thank you. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 08:28, 17 July 2013 (UTC)
+
If you are fine with this idea, I will add it soon. --[[User:NonerKao|NonerKao]] ([[User talk:NonerKao|talk]]) 06:28, 22 June 2016 (UTC)

Latest revision as of 23:13, 11 February 2018

libvirt-guests and systemd

libvirt-guests does not work with systemd. At least not without modification to the scripts. To enable a guest to auto-start you can either check the "autostart" box in virt-manager, enable autostart through virsh or you can manually create a symlink in the libvirt auto-start directory.

To automatically start a guest named www that runs in qemu

ln -s /etc/libvirt/qemu/www.xml /etc/libvirt/qemu/autostart/www.xml

--En0 (talk) 14:35, 10 December 2012 (UTC)

KVM acceleration after removing qemu-kvm package

In order to have KVM acceleration after the removal of qemu-kvm I had to edit the config of my virtual machines like this:

<domain type='qemu' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
...
  <qemu:commandline>
    <qemu:arg value='-machine'/>
    <qemu:arg value='accel=kvm'/>
    <qemu:arg value='kernel_irqchip=on' />
  </qemu:commandline>
</domain>

I don't know if there is some specific field in libvirt XML, but this works for me.

--Vimes656 (talk) 13:16, 7 March 2013 (UTC)Vimes656

Chip-level IRQs

Added chip level IRQs to the argument list of Vimes656 recommendation.

--En0 (talk) 15:49, 7 March 2013 (UTC)

kvm group

About the disput of using or not the kvm group, the discussion which lead to adding this group in the depreceated group list is there; deleted from the talk page of KVM article. Bricewge (talk) 16:26, 18 September 2014 (UTC)

Errors and possible fixes

If you get the following error(s) when creating a new virtual machine using virt-manager:

summary=Error launching details: 'Terminal' object has no attribute 'set_visible_bell'
details=Error launching details: 'Terminal' object has no attribute 'set_visible_bell'

install extra/vte290

sudo pacman -S vte290

and change the following line in /usr/share/virt-manager/virtManager/serialcon.py

BEFORE

from gi.repository import Vte

AFTER

#from gi.repository import Vte
import gi
gi.require_version('Vte', '2.90')
from gi.repository import Vte

to explicitely use a vte 290 terminal

Trouble shooting when configuring network

After following the instructions configuring a libvirt environment, if one provides the argument --network bridge=xxx to
virt-install, then an error may occur:

ERROR    internal error: /usr/lib/qemu/qemu-bridge-helper --br=xxx --fd=xx: \
failed to communicate with bridge helper: Transport endpoint is not connected

stderr=failed to parse default acl file `/etc/qemu/bridge.conf'

I would like to add a note section which describes the solution to this error, which is to create a file /etc/qemu/bridge.conf with proper settings.

If you are fine with this idea, I will add it soon. --NonerKao (talk) 06:28, 22 June 2016 (UTC)