[libvirt-users] some problem with snapshot by libvirt
by xingxing gao
Hi,all,i am using libvirt to manage my vm,in these days i am testing
the libvirt snapshot ,but meet some problem:
the snapshot was created from this command:
snapshot-create-as win7 --disk-only --diskspec
vda,snapshot=external --diskspec hda,snapshot=no
but when i tried to revert from the snapshot which created from the
above command ,i got error below:
virsh # snapshot-revert win7 1338041515 --force
error: unsupported configuration: revert to external disk snapshot not
supported yet
version:
virsh # version
Compiled against library: libvir 0.9.4
Using library: libvir 0.9.4
Using API: QEMU 0.9.4
Running hypervisor: QEMU 1.0.93
10 years
[libvirt-users] virsh list not working with xen 4
by Rogério Vinhal Nunes
Hi, I'm having some trouble to get libvirt to show the correct power state
of my virtual machines. I'm using Ubuntu 10.04 + Xen 4.1.1 + libvirt 0.8.8.
virsh list --all only shows turned off machines registered in xend. If I
turn them on, they just "disappear", and when I start machines directly from
xml, they just doesn't appear at all.
Libvirt is correctly connecting to xen as I can use the other commands fine,
just the list option doesn't seem to work at all. What can I do to change
that?
# virsh version
Compiled against library: libvir 0.8.8
Using library: libvir 0.8.8
Using API: Xen 3.0.1
Running hypervisor: Xen 4.1.0
12 years, 2 months
[libvirt-users] Live Block Migration with additional attached storage
by Chun-Hung Chen
Dear all,
I am planning to use live block migration with one VM running on local disk
and also attached additional disk from iSCSI or other shared storage.
When block migration, not only local VM disk is copied to the destination
but also the attached additional disk from shared storage. It is not
desired in this situation.
I just want the local VM disk is copied. Is there anyway to do this
scenario? Does the concept of storage pool help this? I browse the source
code but don't find hints right now.
Thanks.
Regards,
Arnose
12 years, 2 months
[libvirt-users] virDomainMemoryPeek: bad behavior under workload
by NoxDaFox
Greetings,
I am working on a platform for analysis automation.
I need to run several Virtual Environments concurrently and record
information about their behavior.
I wrote some months ago about the capability of reading the Memory
during the Environment's execution (in paused state).
What do I need is the complete linear memory image, byte per byte,
nothing special; I will give this output to tools and parsers like
Volatility to get the value from it.
I looked around and the only way to get the memory in such a way is
using the QEMU monitor command `pmemsave`.
I am using libvirt through its Python bindings and the
virDomainQemuMonitorCommand seems not to be exposed by the API so, as
suggested in some mails I read into the mailig list, I switched to
virDomainMemoryPeek.
Using this function keeps up to 14-16 seconds to read 512Mb of memory
with the 64Kb limitation and 2-3 seconds with the 1Mb one; but the
most annoying thing is that I can't run several environment
concurrently as the function keeps failing.
Here's the typical output:
File "/home/nox/workspace/NOX/src/NOX/hooks.py", line 134, in trigger
hook.trigger(event)
File "/home/nox/workspace/NOX/src/NOX/hooks.py", line 33, in trigger
self.handlers[event]()
File "/home/nox/workspace/NOX/hooks/volatility.py", line 81, in memory_dump
for block in Memory(self.ctx):
File "/home/see/workspace/NOX/src/NOX/lib/libtools.py", line 179, in next
libvirt.VIR_MEMORY_PHYSICAL)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 1759, in memoryPeek
ret = libvirtmod.virDomainMemoryPeek(self._o, start, size, flags)
SystemError: error return without exception set
I can't run more than 3 environments concurrently on a Xeon Quad with
8Gb of memory.
I guess the RPC reply goes in timeout because the system is under
heavy load but I'm not sure as the error output is quite obscure.
Is there any solution to this issue? Is it possible to raise the RPC
reply timeout value so that, even if slowly, I eventually get the
memory dump?
If through virsh I use the QEMU `pmemsave` command, I get the memory
dump in less than one second; is there any way to obtain the same
performance?
Thanks anyway for making libvirt the great tool it is!
NoxDaFox
12 years, 2 months
[libvirt-users] Libvirt daemon segfaults when run as root
by Shawn Furrow
Hi all,
For some reason when I run "libvirtd -d" as root it seems to not start. I
investigate by running "libvirtd -v" as root and I get a segfault. Here is
the output:
2012-08-23 19:01:23.237+0000: 27464: info : libvirt version: 0.10.0
> 2012-08-23 19:01:23.237+0000: 27464: error : virDriverLoadModule:78 :
> failed to load module
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so: undefined
> symbol: virSecurityManagerGetProcessLabel
> 2012-08-23 19:01:23.238+0000: 27464: error : virDriverLoadModule:78 :
> failed to load module
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_lxc.so
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_lxc.so: undefined
> symbol: virSecurityManagerGetProcessLabel
> Caught Segmentation violation dumping internal log buffer:
>
> ====== start of log =====
> 2012-08-23 19:01:23.235+000027464: debug : main:1120 : Decided on pid file
> path '/usr/local/var/run/libvirtd.pid'
> 2012-08-23 19:01:23.235+000027464: debug : main:1130 : Decided on socket
> paths '/usr/local/var/run/libvirt/libvirt-sock' and
> '/usr/local/var/run/libvirt/libvirt-sock-ro'
> 2012-08-23 19:01:23.235+000027464: debug : main:1168 : Ensuring run dir
> '/usr/local/var/run/libvirt' exists
> 2012-08-23 19:01:23.235+000027464: debug : virEventRegisterDefaultImpl:204
> : registering default event implementation
> 2012-08-23 19:01:23.235+000027464: debug : virEventPollAddHandle:111 :
> Used 0 handle slots, adding at least 10 more
> 2012-08-23 19:01:23.235+000027464: debug : virEventPollInterruptLocked:697
> : Skip interrupt, 0 0
> 2012-08-23 19:01:23.236+000027464: debug : virEventPollAddHandle:136 :
> EVENT_POLL_ADD_HANDLE: watch=1 fd=5 events=1 cb=0x7f323cd415a0 opaque=(nil)
> ff=(nil)
> 2012-08-23 19:01:23.236+000027464: debug : virEventRegisterImpl:177 :
> addHandle=0x7f323cd423d0 updateHandle=0x7f323cd414a0
> removeHandle=0x7f323cd41360 addTimeout=0x7f323cd42220
> updateTimeout=0x7f323cd415e0 removeTimeout=0x7f323cd41260
> 2012-08-23 19:01:23.236+000027464: debug : virNetServerNew:407 :
> srv=0xdd8890 refs=1
> 2012-08-23 19:01:23.236+000027464: debug : main:1206 : Dropping privileges
> (if required)
> 2012-08-23 19:01:23.236+000027464: debug : virDriverModuleInitialize:53 :
> Module dir /usr/local/lib/libvirt/connection-driver
> 2012-08-23 19:01:23.236+000027464: debug : virDriverLoadModule:66 : Module
> load network
> 2012-08-23 19:01:23.236+000027464: debug : virRegisterNetworkDriver:564 :
> registering Network as network driver 4
> 2012-08-23 19:01:23.236+000027464: debug : virDriverLoadModule:66 : Module
> load storage
> 2012-08-23 19:01:23.236+000027464: debug : virRegisterStorageDriver:624 :
> registering storage as storage driver 4
> 2012-08-23 19:01:23.236+000027464: debug : virDriverLoadModule:66 : Module
> load secret
> 2012-08-23 19:01:23.237+000027464: debug : virRegisterSecretDriver:684 :
> registering secret as secret driver 3
> 2012-08-23 19:01:23.237+000027464: debug : virDriverLoadModule:66 : Module
> load nwfilter
> 2012-08-23 19:01:23.237+000027464: debug : virRegisterNWFilterDriver:714 :
> registering nwfilter as network filter driver 3
> 2012-08-23 19:01:23.237+000027464: debug : virDriverLoadModule:66 : Module
> load qemu
> 2012-08-23 19:01:23.237+000027464: error : virDriverLoadModule:78 : failed
> to load module
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so: undefined
> symbol: virSecurityManagerGetProcessLabel
> 2012-08-23 19:01:23.238+000027464: debug : virDriverLoadModule:66 : Module
> load lxc
> 2012-08-23 19:01:23.238+000027464: error : virDriverLoadModule:78 : failed
> to load module
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_lxc.so
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_lxc.so: undefined
> symbol: virSecurityManagerGetProcessLabel
> 2012-08-23 19:01:23.238+000027464: debug : virDriverLoadModule:66 : Module
> load uml
> 2012-08-23 19:01:23.238+000027464: debug : virRegisterDriver:732 :
> driver=0x7f3232ec7760 name=UML
> 2012-08-23 19:01:23.238+000027464: debug : virRegisterDriver:747 :
> registering UML as driver 6
> 2012-08-23 19:01:23.238+000027464: debug : virDriverLoadModule:66 : Module
> load xen
> 2012-08-23 19:01:23.239+000027464: debug : virRegisterDriver:732 :
> driver=0x7f3232caad00 name=Xen
> 2012-08-23 19:01:23.239+000027464: debug : virRegisterDriver:747 :
> registering Xen as driver 7
> 2012-08-23 19:01:23.239+000027464: debug : virNetServerProgramNew:63 :
> prog=0xddca40 refs=1
> 2012-08-23 19:01:23.239+000027464: debug : virNetServerProgramRef:84 :
> prog=0xddca40 refs=2
> 2012-08-23 19:01:23.239+000027464: debug : virNetServerProgramNew:63 :
> prog=0xddcbc0 refs=1
> 2012-08-23 19:01:23.239+000027464: debug : virNetServerProgramRef:84 :
> prog=0xddcbc0 refs=2
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollInterruptLocked:697
> : Skip interrupt, 0 0
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollAddHandle:136 :
> EVENT_POLL_ADD_HANDLE: watch=2 fd=7 events=1 cb=0x7f323ce241e0
> opaque=0xdd8890 ff=(nil)
> 2012-08-23 19:01:23.239+000027464: debug : main:1257 : Attempting to
> configure auditing subsystem
> 2012-08-23 19:01:23.239+000027464: debug : main:1263 : Proceeding without
> auditing
> 2012-08-23 19:01:23.239+000027464: debug : virHookCheck:119 : No hook
> script /usr/local/etc/libvirt/hooks/daemon
> 2012-08-23 19:01:23.239+000027464: debug : virHookCheck:119 : No hook
> script /usr/local/etc/libvirt/hooks/qemu
> 2012-08-23 19:01:23.239+000027464: debug : virHookCheck:119 : No hook
> script /usr/local/etc/libvirt/hooks/lxc
> 2012-08-23 19:01:23.239+000027464: debug : daemonSetupNetworking:464 :
> Registering unix socket /usr/local/var/run/libvirt/libvirt-sock
> 2012-08-23 19:01:23.239+000027464: debug : virNetSocketNew:119 :
> localAddr=0x7fff419bf530 remoteAddr=(nil) fd=9 errfd=-1 pid=0
> 2012-08-23 19:01:23.239+000027464: debug : virNetSocketNew:179 :
> RPC_SOCKET_NEW: sock=0xddcbf0 refs=1 fd=9 errfd=-1 pid=0
> localAddr=127.0.0.1;0, remoteAddr=(null)
> 2012-08-23 19:01:23.239+000027464: debug : virNetSocketRef:713 :
> RPC_SOCKET_REF: sock=0xddcbf0 refs=2
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollInterruptLocked:697
> : Skip interrupt, 0 0
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollAddHandle:136 :
> EVENT_POLL_ADD_HANDLE: watch=3 fd=9 events=0 cb=0x7f323ce2ab10
> opaque=0xddcbf0 ff=0x7f323ce2ba60
> 2012-08-23 19:01:23.239+000027464: debug : daemonSetupNetworking:474 :
> Registering unix socket /usr/local/var/run/libvirt/libvirt-sock-ro
> 2012-08-23 19:01:23.239+000027464: debug : virNetSocketNew:119 :
> localAddr=0x7fff419bf530 remoteAddr=(nil) fd=10 errfd=-1 pid=0
> 2012-08-23 19:01:23.239+000027464: debug : virNetSocketNew:179 :
> RPC_SOCKET_NEW: sock=0xddd430 refs=1 fd=10 errfd=-1 pid=0
> localAddr=127.0.0.1;0, remoteAddr=(null)
> 2012-08-23 19:01:23.239+000027464: debug : virNetSocketRef:713 :
> RPC_SOCKET_REF: sock=0xddd430 refs=2
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollInterruptLocked:697
> : Skip interrupt, 0 0
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollAddHandle:136 :
> EVENT_POLL_ADD_HANDLE: watch=4 fd=10 events=0 cb=0x7f323ce2ab10
> opaque=0xddd430 ff=0x7f323ce2ba60
> 2012-08-23 19:01:23.239+000027464: debug : virNetServerRef:420 :
> srv=0xdd8890 refs=2
> 2012-08-23 19:01:23.239+000027464: debug : virNetlinkEventServiceStart:656
> : libnl was not available at build time
> 2012-08-23 19:01:23.239+000027464: debug : virNetServerRun:714 :
> srv=0xdd8890 quit=0
> 2012-08-23 19:01:23.239+000027464: debug : virEventRunDefaultImpl:244 :
> running default event implementation
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollCleanupTimeouts:501
> : Cleanup 0
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollCleanupTimeouts:537
> : Found 0 out of 0 timeout slots used, releasing 0
> 2012-08-23 19:01:23.239+000027464: debug : virEventPollCleanupHandles:549
> : Cleanup 4
> 2012-08-23 19:01:23.240+000027464: debug : virEventPollMakePollFDs:378 :
> Prepare n=0 w=1, f=5 e=1 d=0
> 2012-08-23 19:01:23.240+000027475: debug : virStateInitialize:798 :
> Running global init for Remote state driver
> 2012-08-23 19:01:23.240+000027475: debug : virStateInitialize:798 :
> Running global init for Network state driver
> 2012-08-23 19:01:23.240+000027464: debug : virEventPollMakePollFDs:378 :
> Prepare n=1 w=2, f=7 e=1 d=0
> 2012-08-23 19:01:23.240+000027464: debug : virEventPollMakePollFDs:378 :
> Prepare n=2 w=3, f=9 e=0 d=0
> 2012-08-23 19:01:23.240+000027464: debug : virEventPollMakePollFDs:378 :
> Prepare n=3 w=4, f=10 e=0 d=0
> 2012-08-23 19:01:23.240+000027464: debug :
> virEventPollCalculateTimeout:320 : Calculate expiry of 0 timers
> 2012-08-23 19:01:23.240+000027464: debug :
> virEventPollCalculateTimeout:346 : Timeout at 0 due in -1 ms
> 2012-08-23 19:01:23.240+000027464: debug : virEventPollRunOnce:614 :
> EVENT_POLL_RUN: nhandles=2 timeout=-1
>
> ====== end of log =====
> Segmentation fault/
However, when I run "libvirtd -d" as me, it does not segfault and continues
running. However I cannot connect to the libvirt-sock because it gets
created at "$HOME/.cache/libvirt/libvirt-sock" but virsh looks for it at
"/usr/local/var/run/libvirt-sock".
Here is what I get when I run "libvirtd -v" as me:
2012-08-23 19:02:15.145+0000: 27483: info : libvirt version: 0.10.0
> 2012-08-23 19:02:15.145+0000: 27483: error : virDriverLoadModule:78 :
> failed to load module
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so: undefined
> symbol: virSecurityManagerGetProcessLabel
> 2012-08-23 19:02:15.145+0000: 27483: error : virDriverLoadModule:78 :
> failed to load module
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_lxc.so
> /usr/local/lib/libvirt/connection-driver/libvirt_driver_lxc.so: undefined
> symbol: virSecurityManagerGetProcessLabel
Any ideas why this is happening? I am on Ubuntu 10.04 running libvirt
0.10.0 with qemu-kvm 1.1
Thanks,
Shawn
--
Virginia Tech
Bradley Department of Electrical and Computer Engineering
B.S. Electrical Engineering
B.S. Computer Engineering
12 years, 2 months
[libvirt-users] Fwd: vm pxe fail
by Alex Jia
----- Forwarded Message -----
From: "Alex Jia" <ajia(a)redhat.com>
To: "Andrew Holway" <a.holway(a)syseleven.de>
Cc: kvm(a)vger.kernel.org
Sent: Friday, August 31, 2012 10:37:23 PM
Subject: Re: [libvirt-users] vm pxe fail
Hi Andrew,
Great, BTW, in fact, you may pxe boot via VF of Intel82576, however, Intel82576 SR-IOV network adapters
don't provide a ROM BIOS for the cards virtual functions (VF), but an image of such a ROM is available,
and with this ROM visible to the guest, it can PXE boot.
In libvirt's xml, you need to configure guest XML like this:
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address bus='XX' slot='XX' function='XX'/>
</source>
<boot order='1'/>
<rom bar='on' file='/xxxx/ipxe-808610ca.rom'/>
</hostdev>
You need to build a ipxe-808610ca.rom by yourself, if you're interested in this,
please refer to http://ipxe.org/.
--
Regards,
Alex
----- Original Message -----
From: "Andrew Holway" <a.holway(a)syseleven.de>
To: "Alex Jia" <ajia(a)redhat.com>
Cc: kvm(a)vger.kernel.org
Sent: Friday, August 31, 2012 9:32:24 PM
Subject: Re: [libvirt-users] vm pxe fail
Hi,
In the end the problem was SR-IOV enabled on the cards. I turned this off and everything worked ok.
Im using HP 10G cards which are rebranded emulex.
0a:00.0 Ethernet controller: Emulex Corporation OneConnect 10Gb NIC (be3) (rev 01)
Thanks,
Andrew
On Aug 17, 2012, at 4:34 AM, Alex Jia wrote:
> Hi Andrew,
> I can't confirm a root reason based on your information, perhaps you may
> try to find a reason by yourself via the following docs:
>
> http://wiki.libvirt.org/page/PXE_boot_%28or_dhcp%29_on_guest_failed (Troubleshooting)
> http://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/s... (User Guide)
>
> If can't, please provide your version of kvm, libvirt, tftp, etc, and run 'virsh net-dumpxml br0' to dump your
> network bridge XML configuration, and run 'cat pxelinux.cfg' to show your pxelinux configuration, thanks.
>
> --
> Regards,
> Alex
>
>
> ----- Original Message -----
> From: "Andrew Holway" <a.holway(a)syseleven.de>
> To: kvm(a)vger.kernel.org
> Sent: Thursday, August 16, 2012 8:25:35 PM
> Subject: [libvirt-users] vm pxe fail
>
> Hallo
>
> I have a kvm vm that I am attempting to boot from pxe. The dhcp works perfectly and I can see the VM in the pxe server arp. but the tftp just times out. I don't see any tftp traffic on either the physical host or on the pie server. I am using a bridged interface. I have tried using several virtual nic drivers, several different mac addresses and several different ips. on the physical host I can get the pxelinux.0 file from the pxe server via tftp and can clearly see that traffic with tcpdump.
>
> Ive tried using various virtual interfaces.
>
> I can pxe boot my physical hosts with no problems.
>
> I can tftp fine from the physical host and see the traffic with ethdump
>
> Here is the terminal output from the VM: https://dl.dropbox.com/u/98200887/Screen%20Shot%202012-08-15%20at%206.41....
>
> Thanks,
>
> Andrew
>
> [root@node002 ~]# yum list | grep qemu
> gpxe-roms-qemu.noarch 0.9.7-6.9.el6 @base
> qemu-img.x86_64 2:0.12.1.2-2.295.el6_3.1 @updates
> qemu-kvm.x86_64 2:0.12.1.2-2.295.el6_3.1 @updates
> qemu-guest-agent.x86_64 2:0.12.1.2-2.295.el6_3.1 updates
> qemu-kvm-tools.x86_64 2:0.12.1.2-2.295.el6_3.1 updates
>
> [root@node002 ~]# ethtool eth0
> Settings for eth0:
> Supported ports: [ TP ]
> Supported link modes: 10000baseT/Full
> Supports auto-negotiation: No
> Advertised link modes: 10000baseT/Full
> Advertised pause frame use: No
> Advertised auto-negotiation: No
> Speed: Unknown!
> Duplex: Unknown! (255)
> Port: Twisted Pair
> PHYAD: 0
> Transceiver: internal
> Auto-negotiation: off
> MDI-X: Unknown
> Supports Wake-on: g
> Wake-on: g
> Current message level: 0x00000014 (20)
> Link detected: no
>
> [root@node002 ~]# brctl show
> bridge name bridge id STP enabled interfaces
> br0 8000.009c02241ae0 no eth1
> vnet0
> virbr0 8000.525400a6d5aa yes virbr0-nic
>
> [root@node002 ~]# ethtool vnet0
> Settings for vnet0:
> Supported ports: [ ]
> Supported link modes:
> Supports auto-negotiation: No
> Advertised link modes: Not reported
> Advertised pause frame use: No
> Advertised auto-negotiation: No
> Speed: 10Mb/s
> Duplex: Full
> Port: Twisted Pair
> PHYAD: 0
> Transceiver: internal
> Auto-negotiation: off
> MDI-X: Unknown
> Current message level: 0xffffffa1 (-95)
> Link detected: yes
>
> <domain type='kvm'>
> <name>vm004</name>
> <uuid>4f03b09b-e834-bbf3-a6c2-1689f3156ef2</uuid>
> <memory unit='KiB'>2097152</memory>
> <currentMemory unit='KiB'>2097152</currentMemory>
> <vcpu placement='static'>2</vcpu>
> <os>
> <type arch='x86_64' machine='rhel6.3.0'>hvm</type>
> <boot dev='hd'/>
> </os>
> <features>
> <acpi/>
> <apic/>
> <pae/>
> </features>
> <clock offset='utc'/>
> <on_poweroff>destroy</on_poweroff>
> <on_reboot>restart</on_reboot>
> <on_crash>restart</on_crash>
> <devices>
> <emulator>/usr/libexec/qemu-kvm</emulator>
> <disk type='file' device='disk'>
> <driver name='qemu' type='raw' cache='none'/>
> <source file='/cm/shared/vm/vm004.img'/>
> <target dev='hda' bus='ide'/>
> <address type='drive' controller='0' bus='0' target='0' unit='0'/>
> </disk>
> <disk type='block' device='cdrom'>
> <driver name='qemu' type='raw'/>
> <target dev='hdc' bus='ide'/>
> <readonly/>
> <address type='drive' controller='0' bus='1' target='0' unit='0'/>
> </disk>
> <controller type='usb' index='0'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
> </controller>
> <controller type='ide' index='0'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
> </controller>
> <interface type='bridge'>
> <mac address='00:00:00:00:00:0d'/>
> <source bridge='br0'/>
> <model type='rtl8139'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
> </interface>
> <serial type='pty'>
> <target port='0'/>
> </serial>
> <console type='pty'>
> <target type='serial' port='0'/>
> </console>
> <input type='mouse' bus='ps2'/>
> <graphics type='vnc' port='-1' autoport='yes'/>
> <video>
> <model type='cirrus' vram='9216' heads='1'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
> </video>
> <memballoon model='virtio'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
> </memballoon>
> </devices>
> </domain>
>
>
>
> _______________________________________________
> libvirt-users mailing list
> libvirt-users(a)redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-users
12 years, 2 months
[libvirt-users] Running VirtualBox headless
by Dmitry Mikhin
Hello everyone,
I'm trying to run a VirtualBox-based VM in headless mode, but
apparently running out of luck.
So far:
- Fedora 14 host
- libvirt 0.9.8 manually built from libvirt-0.9.8-1.fc14.src.rpm
(later tested with 0.10.0 built from libvirt-0.10.0-1.fc17.src.rpm to
the same effect)
- I have a VBox 4.1.20 installed with extension pack
- a virtual Windows XP guest
- can start this machine from VirtualBox GUI
- can start from "virsh -c vbox:///session start"
- VRDP enabled in VirtualBox GUI
The relevant entries in "virsh dumpxml" output are:
<graphics type='desktop' display=':0.0'/>
<graphics type='rdp' port='3388' multiUser='yes'/>
- can connect to the running XP from rdesktop
- can start the same machine using VBoxHeadless and connect from rdesktop
- can start from virsh and connect from rdesktop
All the above can be performed as a "su - otheruser", where otheruser
has been added to vboxusers group, AND with access to X display (of
the main, logged user) enabled by "xauth add ..."
However, when no xauth access is enabled, "virsh start" fails:
$ virsh --connect vbox:///session start vbox-windows-xp-32
error: Failed to start domain vbox-windows-xp-32
error: An error occurred, but the cause is unknown
And I cannot remove the desktop graphics from the xml (edit as shown
below, in vi remove the <graphics type='desktop'...> line, save,
quit):
$ virsh --connect vbox:///session edit vbox-windows-xp-32
error: internal error could not define a domain, rc=80bb0004
I set
export VIRSH_DEBUG=0
export VIRSH_LOG_FILE="virsh.log"
export LIBVIRT_DEBUG=1
export LIBVIRT_LOG_OUTPUTS="1:file:libvirt.log"
and collected two log-files (tarball attached; this has been done
using the older libvirt 0.9.8; upgrade to 0.10.0 did not solve the
issue).
Also, related or not, "virsh dumpxml" produces an xml file that is
rejected by virt-xml-validate (with or without the graphics line):
$ virsh --connect vbox:///session dumpxml vbox-windows-xp-32 >
vbox-windows-xp-32.xml
$ virt-xml-validate vbox-windows-xp-32.xml
Relax-NG validity error : Extra element devices in interleave
vbox-windows-xp-32.xml:20: element devices: Relax-NG validity error :
Element domain failed to validate content
vbox-windows-xp-32.xml fails to validate
When the second user is allowed access to my display:
$ xhost +SI:localuser:buildmaster
all starts to work (and the Windows XP window pops up on my display
whenever it wants).
Any ideas how to make it work on the background?
Many thanks for the wonderful and very useful library,
Dmitry
12 years, 2 months
[libvirt-users] network settings for an isolated network
by Christian Schmidt
Hi,
I try to configure a kvm with a NIC, but no attached network to this
NIC.
I tried following methods:
1. Create a generic ethernet connection
I configured the VM with following interface section:
<interface type='ethernet'>
<script path='/root/noscript.sh'/>
<target dev='myvm_nic0'/>
<interface/>
The script /root/noscript.sh exists and is executable and has only an
exit 0 statement. When I try to start the VM, virsh aborts with
following error:
error: Failed to start domain myvm
error: internal error process exited while connecting to monitor:
qemu-kvm: -netdev tap,script=/root/noscript.sh,id=hostnet1: could not
configure /dev/net/tun (tap%d): Operation not permitted
qemu-kvm: -netdev tap,script=/root/noscript.sh,id=hostnet1: Device 'tap'
could not be initialized
The tun module is loaded and I can create tap devices with tunctl. So
there might be no problem...
2. I configurerd a network with no forward element.
I've defined and started following network on the host with virsh
net-define / net-start
<network>
<name>myvm_isolated</name>
<bridge name='virbr_myvm_1' />
</network>
The documentation says: "If there is no forward element, the network
will be isolated from any other network (unless a guest connected to
that network is acting as a router, of course)."
The interface configuration of the domain was this:
<interface type='network'>
<mac address='00:12:67:bb:bb:11'/>
<source network='myvm_isolated'/>
<model type='e1000'/>
</interface>
The VM starts as expected. But the interface is connected to an host
bridge like a NAT interface. There is a DHCP server in the network and
the VM gets an IP Address and can ping and ssh to the VM-Server...
I used following version of libvirt and qemu on SuSE Enterprise Linux
Server SP2:
# virsh version
Compiled against library: libvir 0.9.6
Using library: libvir 0.9.6
Using API: QEMU 0.9.6
Running hypervisor: QEMU 0.15.1
Can you please tell me how to configure a not connected (isolated)
network interface card for my VM?
Regards,
Christian
12 years, 2 months