[libvirt-users] behaviour of "virsh shutdown domainName"
by Jorge Somavilla
Hi all,
I am experiencing some problems with different versions of libvirt
(0.7.5 and 0.7.7), with a kvm (WinXP), host running Ubuntu 9.10, and i
would like to ask you two questions:
- In virsh, after running the command "shutdown domainName", what
should be the final state of the domain, if the shutdown finishes
correctly: "shutoff", "no-state", "inactive", or the domain shouldn't
show in "list --all" (full clean-up)?
- After the command "shutdown domainName", should i be able to run the
command "start domainName", without first defining the domain? (i.e.:
does shutdown "undefine" the domain?).
In my experience 0.7.5 used to leave the shut down domains as defined,
so i could run "start" right after. Testing in other hosts this
doesn't work always like that, and even if the domain apparently shuts
down correctly, the domain sometimes shows in "list --all", and
sometimes it doesn't. With libvirt 0.7.7 the domain never shows in
"list --all" after a successful shutdown, which makes me think it was
a bug and it has been corrected. Am i missing anything?
Any help would be much appreciated, thanks in advance.
Jorge Somavilla.
14 years, 8 months
[libvirt-users] Duplicate USB vendor,product specification
by Don Morrison
I studying how to attach USB devices to a KVM guest virtual machine using
libvirt. Using the "vendor" and "product" to specify the source device
seems like a good option since the "bus" and "device" values can change as
a device is removed and re-inserted. The question I have is what should I
expect to happen if I plug in two identical USB devices - so they have the
same vendor/product information? There is nothing in the documentation on
libvirt.org to address this case. Thanks.
Don Morrison
14 years, 8 months
[libvirt-users] Memory domain
by angelo alfano
1. Can I set the memory of a domain when it is running?
2. If the host has a total memory of 2GB and launch two VM which respectively 2GB of memory setting, because I don't have a mistake o warning?
Grazie Angelo
14 years, 8 months
[libvirt-users] Regarding SPICE
by anuj rampal
Hi,
I have set up KVM on FC12.
I was wondering if its possible to Display the VM using spice + libvirt?
As in, if I can define my domain with graphics like:
<graphics type='spice' port='-1' autoport='yes' listen='0.0.0.0'/>
or
<graphics type='spice' port='5903' ' listen='0.0.0.0'/>
Thanks & Regards
Anuj
14 years, 8 months
[libvirt-users] drivers
by mattias
I no i can use libvirt with qemu and xen
But openvz?
I run debian lenny with libvirt but no no oepnvz
14 years, 8 months
[libvirt-users] Problem with libvirt migration
by Daniel Bidwell
I have two hosts, vm1 and vm2, which are both running libvirt 0.7.0.
They share a common ocfs2 file system that resides on a san, and have
identical network configurations. I am running qemu-kvm 0.11.0 on
ubuntu 9.10 servers.
I start base32 on vm1 and it comes up (it also runs fine if started on
vm2). Then from vm2 I do:
vm2#: virsh -c qemu://vm1/system
migrate --live base32 qemu://vm2/system
The migration starts and the vm2 virsh returns to the prompt. vm2 shows
base32 as running and vm1 shows base32 as stopped. The console for
base32 on vm2 is frozen and unresponsive.
I have the debug level set to 1 on both machines.
This is an excerpt from the virsh.log file from vm1:
8:19:40.772: debug : qemudDomainMigratePerform:6513 : base32: migrate reply: migrate "tcp:vm2.cc.andrews.edu:49152"
08:19:40.772: debug : qemudShutdownVMDaemon:2076 : Shutting down VM 'base32'
08:19:40.773: debug : virEventRemoveHandleImpl:173 : Remove handle 11
08:19:40.773: debug : virEventRemoveHandleImpl:186 : mark delete 9 19
08:19:40.773: debug : virEventInterruptLocked:640 : Interrupting
08:19:40.773: debug : virRun:796 : /usr/bin/virt-aa-helper -R -u libvirt-2469118c-9b90-44e3-a6ce-01a08bfe28f5
08:19:40.773: debug : virEventRunOnce:567 : Poll got 1 event
08:19:40.773: debug : virEventDispatchHandles:450 : Dispatch n=0 f=5 w=1 e=1 (nil)
08:19:40.773: debug : virEventDispatchHandles:440 : Skip deleted n=9 w=11 f=19
08:19:40.773: debug : virEventMakePollFDs:365 : Prepare n=0 w=1, f=5 e=1
08:19:40.773: debug : virEventMakePollFDs:365 : Prepare n=1 w=2, f=8 e=0
08:19:40.773: debug : virEventMakePollFDs:365 : Prepare n=2 w=3, f=8 e=1
08:19:40.773: debug : virEventMakePollFDs:365 : Prepare n=3 w=4, f=9 e=1
08:19:40.773: debug : virEventMakePollFDs:365 : Prepare n=4 w=5, f=3 e=1
08:19:40.774: debug : virEventMakePollFDs:365 : Prepare n=5 w=6, f=11 e=25
08:19:40.774: debug : virEventMakePollFDs:365 : Prepare n=6 w=7, f=12 e=25
08:19:40.774: debug : virEventMakePollFDs:365 : Prepare n=7 w=8, f=14 e=25
08:19:40.774: debug : virEventMakePollFDs:365 : Prepare n=8 w=9, f=15 e=1
08:19:40.774: debug : virEventMakePollFDs:365 : Prepare n=9 w=12, f=16 e=1
08:19:40.774: debug : virEventCalculateTimeout:313 : Calculate expiry of 3 timers
08:19:40.774: debug : virEventCalculateTimeout:343 : Timeout at 0 due in -1 ms
08:19:40.774: debug : virEventRunOnce:565 : Poll on 10 handles 0x2628850 timeout -1
08:19:40.960: debug : virEventUpdateTimeoutImpl:247 : Updating timer 1 timeout with 0 ms freq
08:19:40.960: debug : virEventInterruptLocked:640 : Interrupting
08:19:40.960: debug : virDomainFree:1922 : domain=0x2605c60
08:19:40.960: debug : virUnrefDomain:373 : unref domain 0x2605c60 base32 1
08:19:40.960: debug : virReleaseDomain:327 : release domain 0x2605c60 base32
08:19:40.960: debug : virReleaseDomain:343 : unref connection 0x2679bd0 2
08:19:40.960: debug : virEventUpdateHandleImpl:146 : Update handle w=12 e=3
The logs on vm2 (destination host) are:
08:19:29.566: debug : virDomainMigratePrepare2:3233 : dconn=0x2096d50, cookie=0x7ff72bf59dc0, cookielen=0x7ff72bf59dcc, uri_in=(null), uri_out=0x20839f0,flags=1, dname=(null), bandwidth=0, dom_xml=<domain type='kvm' id='1'>
<name>base32</name>
<uuid>2469118c-9b90-44e3-a6ce-01a08bfe28f5</uuid>
<memory>262144</memory>
<currentMemory>262144</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc-0.11'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<source file='/home/vms/base32/base32.vmdk'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='bridge'>
<mac address='00:0c:29:db:97:14'/>
<source bridge='br0'/>
<target dev='vnet0'/>
<model type='e1000'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1'/>
<video>
<model type='cirrus' vram='9216' heads='1'/>
</video>
</devices>
<seclabel type='dynamic' model='apparmor'>
<label>libvirt-2469118c-9b90-44e3-a6ce-01a08bfe28f5</label>
<imagelabel>libvirt-2469118c-9b90-44e3-a6ce-01a08bfe28f5</imagelabel>
</seclabel>
</domain>
08:19:29.569: debug : virGetDomain:296 : New hash entry 0x20941a0
08:19:29.569: debug : virDomainGetUUIDString:2441 : domain=0x20941a0, buf=0x7ff72bf584f8
08:19:29.569: debug : virDomainGetUUID:2407 : domain=0x20941a0, uuid=0x7ff72bf58450
08:19:29.569: debug : virExecWithHook:607 : /usr/bin/virt-aa-helper -c -u libvirt-2469118c-9b90-44e3-a6ce-01a08bfe28f5
08:19:29.857: debug : virExecWithHook:607 : /usr/bin/kvm -help
08:19:29.865: debug : virEventRunOnce:567 : Poll got 1 event
08:19:29.871: debug : virEventDispatchHandles:450 : Dispatch n=4 f=3 w=5 e=1 0x2058040
08:19:29.871: info : qemudDispatchSignalEvent:370 : Received unexpected signal 17
08:19:29.871: debug : virEventMakePollFDs:365 : Prepare n=0 w=1, f=5 e=1
08:19:29.871: debug : virEventMakePollFDs:365 : Prepare n=1 w=2, f=8 e=0
08:19:29.871: debug : virEventMakePollFDs:365 : Prepare n=2 w=3, f=8 e=1
08:19:29.871: debug : virEventMakePollFDs:365 : Prepare n=3 w=4, f=9 e=1
08:19:29.871: debug : virEventMakePollFDs:365 : Prepare n=4 w=5, f=3 e=1
08:19:29.871: debug : virEventMakePollFDs:365 : Prepare n=5 w=6, f=11 e=25
08:19:29.871: debug : virEventMakePollFDs:365 : Prepare n=6 w=7, f=12 e=25
08:19:29.871: debug : virEventMakePollFDs:365 : Prepare n=7 w=8, f=14 e=25
08:19:29.871: debug : virEventMakePollFDs:365 : Prepare n=8 w=9, f=15 e=1
08:19:29.871: debug : virEventMakePollFDs:365 : Prepare n=9 w=11, f=16 e=1
08:19:29.871: debug : virEventCalculateTimeout:313 : Calculate expiry of 3 timers
08:19:29.871: debug : virEventCalculateTimeout:343 : Timeout at 0 due in -1 ms
08:19:29.871: debug : virEventRunOnce:565 : Poll on 10 handles 0x2091480 timeout -1
08:19:29.872: debug : virEventRunOnce:567 : Poll got 2 event
08:19:29.872: debug : virEventDispatchHandles:450 : Dispatch n=2 f=8 w=3 e=1 0x2074e90
08:19:29.872: debug : device_added:513 : net_4a_cf_74_02_5d_6c
08:19:29.872: debug : virExecWithHook:607 : /usr/bin/kvm -S -M pc-0.11 -cpu qemu32 -m 256 -smp 1 -name base32 -uuid 2469118c-9b90-44e3-a6ce-01a08bfe28f5 -monitor unix:/var/run/libvirt/qemu/base32.monitor,server,nowait -boot c -drive file=/home/vms/base32/base32.vmdk,if=ide,index=0,boot=on -net nic,macaddr=00:0c:29:db:97:14,vlan=0,model=e1000,name=e1000.0 -net tap,fd=19,vlan=0,name=tap.0 -serial none -parallel none -usb -vnc 127.0.0.1:0 -vga cirrus -incoming tcp:0.0.0.0:49152
08:19:29.885: debug : virEventDispatchHandles:450 : Dispatch n=4 f=3 w=5 e=1 0x2058040
08:19:29.885: info : qemudDispatchSignalEvent:370 : Received unexpected signal 17
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=0 w=1, f=5 e=1
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=1 w=2, f=8 e=0
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=2 w=3, f=8 e=1
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=3 w=4, f=9 e=1
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=4 w=5, f=3 e=1
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=5 w=6, f=11 e=25
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=6 w=7, f=12 e=25
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=7 w=8, f=14 e=25
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=8 w=9, f=15 e=1
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=9 w=11, f=16 e=1
08:19:29.885: debug : virEventCalculateTimeout:313 : Calculate expiry of 3 timers
08:19:29.885: debug : virEventCalculateTimeout:343 : Timeout at 0 due in -1 ms
08:19:29.885: debug : virEventRunOnce:565 : Poll on 10 handles 0x2091480 timeout -1
08:19:29.885: debug : virEventRunOnce:567 : Poll got 1 event
08:19:29.885: debug : virEventDispatchHandles:450 : Dispatch n=4 f=3 w=5 e=1 0x2058040
08:19:29.885: info : qemudDispatchSignalEvent:370 : Received unexpected signal 17
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=0 w=1, f=5 e=1
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=1 w=2, f=8 e=0
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=2 w=3, f=8 e=1
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=3 w=4, f=9 e=1
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=4 w=5, f=3 e=1
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=5 w=6, f=11 e=25
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=6 w=7, f=12 e=25
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=7 w=8, f=14 e=25
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=8 w=9, f=15 e=1
08:19:29.885: debug : virEventMakePollFDs:365 : Prepare n=9 w=11, f=16 e=1
08:19:29.885: debug : virEventCalculateTimeout:313 : Calculate expiry of 3 timers
08:19:29.885: debug : virEventCalculateTimeout:343 : Timeout at 0 due in -1 ms
08:19:29.885: debug : virEventRunOnce:565 : Poll on 10 handles 0x2091480 timeout -1
08:19:30.075: debug : virEventAddHandleImpl:112 : Add handle 19 0 0x425d40 0x2073710
08:19:30.075: debug : virEventAddHandleImpl:116 : Used 10 handle slots, adding 10 more
08:19:30.075: debug : virEventInterruptLocked:640 : Interrupting
08:19:30.075: debug : virEventRunOnce:567 : Poll got 1 event
08:19:30.075: debug : virEventDispatchHandles:450 : Dispatch n=0 f=5 w=1 e=1 (nil)
08:19:30.075: debug : virEventMakePollFDs:365 : Prepare n=0 w=1, f=5 e=1
08:19:30.075: debug : virEventMakePollFDs:365 : Prepare n=1 w=2, f=8 e=0
08:19:30.075: debug : virEventMakePollFDs:365 : Prepare n=2 w=3, f=8 e=1
08:19:30.075: debug : virEventMakePollFDs:365 : Prepare n=3 w=4, f=9 e=1
08:19:30.075: debug : virEventMakePollFDs:365 : Prepare n=4 w=5, f=3 e=1
08:19:30.075: debug : virEventMakePollFDs:365 : Prepare n=5 w=6, f=11 e=25
08:19:30.075: debug : virEventMakePollFDs:365 : Prepare n=6 w=7, f=12 e=25
08:19:30.075: debug : virEventMakePollFDs:365 : Prepare n=7 w=8, f=14 e=25
08:19:30.075: debug : virEventMakePollFDs:365 : Prepare n=8 w=9, f=15 e=1
08:19:30.075: debug : virEventMakePollFDs:365 : Prepare n=9 w=11, f=16 e=1
8:19:30.075: debug : virEventMakePollFDs:365 : Prepare n=10 w=12, f=19 e=0
08:19:30.075: debug : virEventCalculateTimeout:313 : Calculate expiry of 3 timers
08:19:30.075: debug : virEventCalculateTimeout:343 : Timeout at 0 due in -1 ms
08:19:30.075: debug : virEventRunOnce:565 : Poll on 11 handles 0x2091480 timeout -1
08:19:30.076: debug : qemudDomainSetMemoryBalloon:3175 : base32: balloon reply: balloon 256
08:19:30.077: debug : virEventUpdateTimeoutImpl:247 : Updating timer 1 timeout with 0 ms freq
08:19:30.077: debug : virEventInterruptLocked:640 : Interrupting
08:19:30.077: debug : virEventRunOnce:567 : Poll got 1 event
08:19:30.077: debug : virEventUpdateHandleImpl:146 : Update handle w=11 e=3
08:19:30.077: debug : virEventUpdateTimeoutImpl:247 : Updating timer 1 timeout with -1 ms freq
08:19:30.077: debug : virEventInterruptLocked:640 : Interrupting
08:19:30.077: debug : virEventInterruptLocked:636 : Skip interrupt, 1 846931856
08:19:30.077: debug : virEventDispatchHandles:450 : Dispatch n=0 f=5 w=1 e=1 (nil)
08:19:30.077: debug : virEventMakePollFDs:365 : Prepare n=0 w=1, f=5 e=1
08:19:30.077: debug : virEventMakePollFDs:365 : Prepare n=1 w=2, f=8 e=0
08:19:30.077: debug : virEventMakePollFDs:365 : Prepare n=2 w=3, f=8 e=1
08:19:30.077: debug : virEventMakePollFDs:365 : Prepare n=3 w=4, f=9 e=1
08:19:30.077: debug : virEventMakePollFDs:365 : Prepare n=4 w=5, f=3 e=1
08:19:30.077: debug : virEventMakePollFDs:365 : Prepare n=5 w=6, f=11 e=25
08:19:30.077: debug : virEventMakePollFDs:365 : Prepare n=6 w=7, f=12 e=25
08:19:30.077: debug : virEventMakePollFDs:365 : Prepare n=7 w=8, f=14 e=25
08:19:30.077: debug : virEventMakePollFDs:365 : Prepare n=8 w=9, f=15 e=1
08:19:30.077: debug : virEventMakePollFDs:365 : Prepare n=9 w=11, f=16 e=5
08:19:30.077: debug : virEventMakePollFDs:365 : Prepare n=10 w=12, f=19 e=0
08:19:30.077: debug : virEventCalculateTimeout:313 : Calculate expiry of 3 timers
08:19:30.077: debug : virEventCalculateTimeout:343 : Timeout at 0 due in -1 ms
08:19:30.077: debug : virEventRunOnce:565 : Poll on 11 handles 0x2091480 timeout -1
08:19:30.077: debug : virEventRunOnce:567 : Poll got 2 event
08:19:30.077: debug : virEventDispatchHandles:450 : Dispatch n=0 f=5 w=1 e=1 (nil)
08:19:30.077: debug : virEventDispatchHandles:450 : Dispatch n=9 f=16 w=11 e=4 0x2058040
08:19:30.078: debug : virEventUpdateHandleImpl:146 : Update handle w=11 e=1
08:19:30.078: debug : virEventInterruptLocked:636 : Skip interrupt, 1 846931856
08:19:30.078: debug : virEventMakePollFDs:365 : Prepare n=0 w=1, f=5 e=1
08:19:30.078: debug : virEventMakePollFDs:365 : Prepare n=1 w=2, f=8 e=0
08:19:30.078: debug : virEventMakePollFDs:365 : Prepare n=2 w=3, f=8 e=1
08:19:30.078: debug : virEventMakePollFDs:365 : Prepare n=3 w=4, f=9 e=1
08:19:30.078: debug : virEventMakePollFDs:365 : Prepare n=4 w=5, f=3 e=1
08:19:30.078: debug : virEventMakePollFDs:365 : Prepare n=5 w=6, f=11 e=25
08:19:30.078: debug : virEventMakePollFDs:365 : Prepare n=6 w=7, f=12 e=25
08:19:30.078: debug : virEventMakePollFDs:365 : Prepare n=7 w=8, f=14 e=25
08:19:30.078: debug : virEventMakePollFDs:365 : Prepare n=8 w=9, f=15 e=1
08:19:30.078: debug : virEventMakePollFDs:365 : Prepare n=9 w=11, f=16 e=1
08:19:30.078: debug : virEventMakePollFDs:365 : Prepare n=10 w=12, f=19 e=0
08:19:30.078: debug : virEventCalculateTimeout:313 : Calculate expiry of 3 timers
08:19:30.078: debug : virEventCalculateTimeout:343 : Timeout at 0 due in -1 ms
08:19:30.078: debug : virEventRunOnce:565 : Poll on 11 handles 0x2091480 timeout -1
08:19:40.936: debug : virEventRunOnce:567 : Poll got 1 event
08:19:40.936: debug : virEventDispatchHandles:450 : Dispatch n=9 f=16 w=11 e=1 0x2058040
08:19:40.937: debug : virEventUpdateHandleImpl:146 : Update handle w=11 e=1
08:19:40.937: debug : virEventInterruptLocked:636 : Skip interrupt, 1 846931856
08:19:40.937: debug : virEventUpdateHandleImpl:146 : Update handle w=11 e=1
08:19:40.937: debug : virEventInterruptLocked:636 : Skip interrupt, 1 846931856
08:19:40.937: debug : virEventMakePollFDs:365 : Prepare n=0 w=1, f=5 e=1
08:19:40.937: debug : virEventMakePollFDs:365 : Prepare n=1 w=2, f=8 e=0
08:19:40.937: debug : virEventMakePollFDs:365 : Prepare n=2 w=3, f=8 e=1
08:19:40.937: debug : virEventMakePollFDs:365 : Prepare n=3 w=4, f=9 e=1
08:19:40.937: debug : virEventMakePollFDs:365 : Prepare n=4 w=5, f=3 e=1
08:19:40.937: debug : virEventMakePollFDs:365 : Prepare n=5 w=6, f=11 e=25
08:19:40.937: debug : virEventMakePollFDs:365 : Prepare n=6 w=7, f=12 e=25
08:19:40.937: debug : virEventMakePollFDs:365 : Prepare n=7 w=8, f=14 e=25
08:19:40.937: debug : virEventMakePollFDs:365 : Prepare n=8 w=9, f=15 e=1
08:19:40.937: debug : virEventMakePollFDs:365 : Prepare n=9 w=11, f=16 e=1
08:19:40.937: debug : virEventMakePollFDs:365 : Prepare n=10 w=12, f=19 e=0
08:19:40.937: debug : virEventCalculateTimeout:313 : Calculate expiry of 3 timers
08:19:40.937: debug : virEventCalculateTimeout:343 : Timeout at 0 due in -1 ms
08:19:40.937: debug : virEventRunOnce:565 : Poll on 11 handles 0x2091480 timeout -1
08:19:40.937: debug : virDomainMigrateFinish2:3281 : dconn=0x2096d50, dname=base32, cookie=(nil), cookielen=0, uri=tcp:vm2.cc.andrews.edu:49152, flags=1, retcode=0
08:19:40.938: debug : virGetDomain:298 : Existing hash entry 0x20941a0: refs now 2
08:19:40.938: debug : virEventUpdateTimeoutImpl:247 : Updating timer 1 timeout with 0 ms freq
08:19:40.938: debug : virEventInterruptLocked:640 : Interrupting
08:19:40.938: debug : virEventUpdateHandleImpl:146 : Update handle w=11 e=3
08:19:40.938: debug : virEventInterruptLocked:640 : Interrupting
The migration appears to have completed successfully, but the console
doesn't respond to anything and neither does the ethernet. Any ideas on
how to get past this last step?
--
Daniel R. Bidwell | bidwell(a)andrews.edu
Andrews University | Information Technology Services
If two always agree, one of them is unnecessary
"Friends don't let friends do DOS"
"In theory, theory and practice are the same.
In practice, however, they are not."
14 years, 8 months
[libvirt-users] ESX support
by Jonathan Kelley
Just curious but how long has ESX support been in libvirt?
Also I noticed this error when accessing one of my windows vms:
error: internal error Expecting VMX entry 'scsi0.virtualDev' to be
'buslogic' or 'lsilogic' but found 'lsisas1068'
Not sure whether this is an enhancement, defect, or not supported at this time.
Thanks.
-Jon
14 years, 8 months
[libvirt-users] unable to get domain list of KVM guests from libvirt as non-root user
by Tom Georgoulias
I have a python script that monitors the guest VMs on a servers running
Xen, but the script doesn't work properly on a server I just built with
KVM. The script runs as a non-root user (same on all servers) and
simply gathers some details on the status and names of the domains
running on the host.
The Xen and KVM servers are running CentOS 5.4 x86_64 and are using the
same version of libvirt:
libvirt-0.6.3-20.1.el5_4
libvirt-python-0.6.3-20.1.el5_4
Both Xen and KVM servers have the default libvirt.conf config file and
the following /var/run/libvirt permissions:
KVM:
[root@kvm ~]# ls -l /var/run/libvirt
total 16
srwx------ 1 root root 0 Mar 12 08:37 libvirt-sock
srwxrwxrwx 1 root root 0 Mar 12 08:37 libvirt-sock-ro
drwxr-xr-x 2 root root 4096 Mar 8 13:05 network
drwxr-xr-x 2 root root 4096 Mar 11 16:17 qemu
Xen:
[root@xen ~]# ls -l /var/run/libvirt
total 16
srwx------ 1 root root 0 Feb 5 08:53 libvirt-sock
srwxrwxrwx 1 root root 0 Feb 5 08:53 libvirt-sock-ro
drwxr-xr-x 2 root root 4096 Jan 21 14:38 network
drwxr-xr-x 2 root root 4096 Oct 20 18:50 qemu
Kernel/hypervisor versions of Xen and KVM servers:
kernel-xen-2.6.18-164.9.1.el5
xen-3.0.3-94.el5_4.2
kvm-83-105.el5_4.27
kvm-qemu-img-83-105.el5_4.27
kernel-2.6.18-164.11.1.el5
To troubleshoot, I've been running python interactively as the non-root
user. Here's how my Xen servers behave:
[testu@xen ~]$ python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> conn = libvirt.openReadOnly(None)
>>> domains = conn.listDomainsID()
>>> print domains
[0, 3, 15, 16, 21, 24, 26, 30, 32, 36, 38, 41, 43, 45, 47, 49, 51, 55,
63, 67]
>>>
When I try the same thing on the KVM server:
[testu@kvm ~]$ python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> conn = libvirt.openReadOnly(None)
14:33:07.303: error : No vport operation path found for host0
14:33:07.320: error : No vport operation path found for host4
14:33:07.325: error : No vport operation path found for host3
14:33:07.367: error : No vport operation path found for host1
14:33:07.368: error : No vport operation path found for host2
>>> domains = conn.listDomainsID()
>>> print domains
[]
>>>
However, when logged in as root on the KVM server, it works just like my
Xen servers:
[root@kvm ~]# python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> conn = libvirt.openReadOnly(None)
>>> domains = conn.listDomainsID()
>>> print domains
[1]
As an experiment suggested by a someone on the centos-virt list, I
modified the ownership and permissions of the socket files in
/etc/libvirt/libvirtd.conf to use the same user running the python
script. That didn't make a difference.
[testu@kvm ~]$ ls -l /var/run/libvirt
total 16
srwxrwx--- 1 root testu 0 Mar 12 07:45 libvirt-sock
srwxrwxrwx 1 root testu 0 Mar 12 07:45 libvirt-sock-ro
drwxr-xr-x 2 root root 4096 Mar 8 13:05 network
drwxr-xr-x 2 root root 4096 Mar 11 16:17 qemu
[testu@kvm ~]$ python
Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import libvirt
>>> conn = libvirt.openReadOnly(None)
07:45:56.893: error : No vport operation path found for host0
07:45:56.912: error : No vport operation path found for host4
07:45:56.919: error : No vport operation path found for host3
07:45:56.967: error : No vport operation path found for host1
07:45:56.968: error : No vport operation path found for host2
>>> domains = conn.listDomainsID()
>>> print domains
[]
>>>
Can someone give me some pointers on what to check next? I'm running
out of ideas.
Thanks,
Tom
14 years, 8 months
[libvirt-users] Problems with a logical pool creation
by Rubén Vejabalbán
Hi all,
I am new in virtualization so forgive me any evidence.
After pool definition, when I try to create a logical pool I obtain the
following error:
# virsh pool-define vms.pool.xml
> Pool vms.pool defined from vms.pool.xml
>
> # virsh pool-start vms.pool
> error: Failed to start pool vms.pool
> error: internal error '/sbin/vgchange -ay vms.pool' exited with non-zero
> status 5 and signal 0: Volume group "vms.pool" not found
>
Is anything wrong with my xml file?
<pool type="logical">
> <name>vms.pool</name>
>
<source>
> <device path="/dev/sda2"/>
> </source>
> <target>
> <path>/var/lib/virt/images</path>
> </target>
> </pool>
>
Are pools created in this way permanent?
Thank you!
Jenaro Percal
14 years, 8 months
[libvirt-users] LXC: unable to configure networking for LXC
by Avi Weit
Hello,
I would like to set up sshd under an LXC application container and to be
able to connect into it from the host. I was able to achieve that with LXC
tools CLI after setting up a bridge via brctl and creating a proper
lxc.conf file for lxc-execute to use. However, I am unable to do so via
libvirt. I am using libvirt version 0.7.1 installed on fedora 12.
I first verified that the default network is up
[root@enc12 avi]# virsh net-list --all
Name State Autostart
-----------------------------------------
default active yes
and that the bridge exists
[root@enc12 avi]# brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.000000000000 yes
I then went over the explanations under
http://www.libvirt.org/formatdomain.html#elementsNICS and
http://wiki.libvirt.org/page/Networking
and made sure net.ipv4.ip_forward = 1 under file /etc/sysctl.conf on the
host
after that, I created a container with the following xml specification:
<domain type='lxc'>
<name>ssh9</name>
<memory>500000</memory>
<os>
<type>exe</type>
<init>/usr/sbin/sshd</init>
</os>
<vcpu>1</vcpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/libvirt_lxc</emulator>
<interface type='network'>
<source network='default'/>
</interface>
<console type='pty' />
</devices>
</domain>
Below is the command that verifies LXC is running followed by dumpxml:
[root@enc12 avi]# virsh -c lxc:/// list --all
Id Name State
----------------------------------
1551 ssh9 running
<domain type='lxc' id='1551'>
<name>ssh9</name>
<uuid>ead3dc4f-9b3f-eec0-e83a-1d87e0ffb1eb</uuid>
<memory>500000</memory>
<currentMemory>500000</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686'>exe</type>
<init>/usr/sbin/sshd</init>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/libvirt_lxc</emulator>
<interface type='network'>
<mac address='52:54:00:e8:e3:dd'/>
<source network='default'/>
<target dev='veth0'/>
</interface>
<console type='pty' tty='/dev/pts/1'>
<source path='/dev/pts/1'/>
<target port='0'/>
</console>
</devices>
</domain>
However, I can not see the IP address of the container so was not able to
connect it. I can also see that the routing table configured on the host -
routes any address destined to network 192.168.122 - into the bridge and I
understood that the container should have constructed with one of the IPs
in the range of 192.168.122.2 to 192.168.122.254 (as defined in dhcp tag
under default network) but it did not happen.
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
9.148.28.32 * 255.255.255.240 U 1 0 0
eth0
192.168.122.0 * 255.255.255.0 U 0 0 0
virbr0
default 9.148.28.33 0.0.0.0 UG 0 0 0
eth0
I wonder what am I missing here.
Thanks,
- Avi
14 years, 8 months