[libvirt-users] Non-Root not able to use openReadOnly()
by vipul borikar
Hi,
I have a code :
import libvirt
con = libvirt.openReadOnly(None)
print con.listDomainsID()
When i run the above code using root i get the proper output... but when i
use non-root user it givers be a empty list [ ]
If i change the 2nd line to
con = libvirt.open(qemu:///system)
It works.
I am using RHEL 6.1 with default kvm and libvirt.
unix_sock_group = "virt" in libvirtd.conf where virt is a group of
non-root user
group = "virt" in qemu.conf is set.
Any Ideas????
--
Thanks
Vipul Borikar
"Our task must be to free ourselves...by widening our circle of compassion
to embrace all living creatures and the whole of nature and its beauty."
12 years, 8 months
[libvirt-users] Creating Domain and moving a kvm disk under libvirt control
by James Allsopp
Hi,
I'm trying to start using libvirt on my debian machine, but am having
some issues. Regardless of using command-line or gui interface with
virt-manager, building the virtual machine stalls on 0 with no
indication of why it has stopped working. How do I go about fixing this
or diagnosing this problem.
Also I've a .img file that work s with KVM, would there be anyway to
import it for use with libvirt?
Thanks
James
12 years, 8 months
[libvirt-users] Using Sys::Virt with Libvirt
by John Wayne
Anyone using Sys::Virt CPAN Perl Module with Libvirt?
I am unable to install Sys::Virt using cpan, Sys::Virt cannot find Libvirt, even though I have it installed.
I tried setting LD_LIBRARY_PATH and also PKG_CONFIG_PATH to point to Libvirt, and in both case Sys::Virt was not able to find Libvirt.
During installation Sys::Virt times out with :
Sys-Virt-0.9.4/INSTALL
CPAN: File::Temp loaded ok (v0.22)
CPAN.pm: Going to build D/DA/DANBERR/Sys-Virt-0.9.4.tar.gz
libvirt >= 0.9.4 is required
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
Warning (usually harmless): 'YAML' not installed, will not store persistent state
DANBERR/Sys-Virt-0.9.4.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Could not read '/root/.cpan/build/Sys-Virt-0.9.4-DiRtOZ/META.yml'. Falling back to other methods to determine prerequisites
Failed during this command:
DANBERR/Sys-Virt-0.9.4.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 256
I have tried with both Libvirt 0.9.11 and Sys::Virt 0.9.11 in addition to Libvirt 0.9.4 with Sys::Virt 0.9.4.
Thanks
12 years, 8 months
[libvirt-users] Error on running libvirt (dnsmasq)
by John Wayne
Hi,
I am running libvirt on RHEL 6.2 and getting this below error when I start the daemon:
/usr/sbin/libvirtd --verbose
2012-04-20 06:00:13.366+0000: 26900: info : libvirt version: 0.9.11
2012-04-20 06:00:13.366+0000: 26900: error : virExecWithHook:424 : Cannot find 'dnsmasq' in path: No such file or directory
2012-04-20 06:00:13.405+0000: 26900: warning : ebiptablesDriverInit:4066 : Could not find 'ebtables' executable
2012-04-20 06:00:13.419+0000: 26900: error : virCommandWait:2306 : internal error Child process (/bin/sh -c IPT=/sbin/ip6tables
cmd='$IPT -n -L FORWARD'
eval res=\$\("${cmd} 2>&1"\)
if [ $? -ne 0 ]; then echo "Failure to execute command '${cmd}' : '${res}'."; exit 1;fi
) status unexpected: exit status 1
2012-04-20 06:00:13.419+0000: 26900: error : ebiptablesDriverInit:4101 : Testing of ip6tables command failed: Failure to execute command '$IPT -n -L FORWARD' : 'WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
ip6tables v1.4.7: can't initialize ip6tables table `filter': Address family not supported by protocol
Perhaps ip6tables or your kernel needs to be upgraded.'.
I compiled libvirt from the source, do I really need dnsmasq?
Thanks
12 years, 8 months
[libvirt-users] Building an RPM
by John Wayne
Hi,
I have downloaded libvirt-0.9.11 and compiled it on my RHEL 6.2 system.
I am trying to build a binary RPM for distribution, I am not sure what the best way to go about doing this is.
http://libvirt.org/FAQ.html suggests that I try 'make rpm', however that ends in the below error:
missing XHTML1 DTD
cp: cannot stat `./api.html': No such file or directory
make[2]: *** [distdir] Error 1
rm news.html.tmp goals.html.tmp archnetwork.html.tmp formatsecret.html.tmp drvopenvz.html.tmp windows.html.tmp testtck.html.tmp drvlxc.html.tmp apps.html.tmp docs.html.tmp formatstorageencryption.html.tmp drvvbox.html.tmp formatdomain.html.tmp php.html.tmp drvhyperv.html.tmp errors.html.tmp hacking.html.tmp format.html.tmp hooks.html.tmp api.html.tmp storage.html.tmp formatcaps.html.tmp relatedlinks.html.tmp compiling.html.tmp index.html.tmp archdomain.html.tmp downloads.html.tmp auth.html.tmp archnode.html.tmp hvsupport.html.tmp bugs.html.tmp java.html.tmp locking.html.tmp logging.html.tmp testapi.html.tmp formatnetwork.html.tmp bindings.html.tmp uri.html.tmp drvtest.html.tmp sitemap.html.tmp drvqemu.html.tmp contact.html.tmp formatnwfilter.html.tmp intro.html.tmp drvxen.html.tmp drvesx.html.tmp drvvmware.html.tmp testsuites.html.tmp devguide.html.tmp firewall.html.tmp architecture.html.tmp migration.html.tmp todo.html.tmp formatsnapshot.html.tmp
formatstorage.html.tmp internals.html.tmp deployment.html.tmp api_extension.html.tmp drvuml.html.tmp virshcmdref.html.tmp csharp.html.tmp python.html.tmp drvremote.html.tmp archstorage.html.tmp remote.html.tmp drivers.html.tmp formatnode.html.tmp
make[2]: Leaving directory `/home/user/libvirt-0.9.11/docs'
make[1]: *** [distdir] Error 1
make[1]: Leaving directory `/home/user/libvirt-0.9.11'
make: *** [rpm] Error 2
Any clue on how to proceed? I am not sure why api.html is missing, since this is a clean untar of the 0.9.11 tar file, and './configure;make;make install' all worked without any issues.
Thanks!
12 years, 8 months
[libvirt-users] Thread-safety issues with vbox driver ?
by Jean-Baptiste Rouault
Hi,
I'm experiencing weird things with the vbox driver when using multiple threads.
Following is the snippet of code I experience problems with
/*****************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <libvirt/libvirt.h>
void *create_and_destroy(void *arg)
{
virDomainPtr dom = (virDomainPtr)arg;
char buf[VIR_UUID_STRING_BUFLEN];
virDomainGetUUIDString(dom, buf);
if (virDomainCreate(dom) != 0) {
printf("failed to start %s\n", buf);
goto end;
}
printf("%s started\n", buf);
if (virDomainDestroy(dom) != 0) {
printf("failed to destroy %s\n", buf);
}
printf("%s destroyed\n", buf);
end:
virDomainFree(dom);
pthread_exit(NULL);
}
int main(int argc, char **argv)
{
virConnectPtr conn = virConnectOpen("vbox:///session");
int i;
int count = virConnectNumOfDefinedDomains(conn);
char **names = malloc(count * sizeof(char *));
virConnectListDefinedDomains(conn, names, count);
virDomainPtr *doms = malloc(count * sizeof(virDomainPtr));
for (i = 0 ; i < count ; ++i) {
doms[i] = virDomainLookupByName(conn, names[i]);
}
pthread_t *threads = malloc(count * sizeof(pthread_t));
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
for (i = 0 ; i < count ; ++i) {
pthread_create(&threads[i], &attr, create_and_destroy, (void *)doms[i]);
}
pthread_attr_destroy(&attr);
for (i = 0 ; i < count ; ++i) {
pthread_join(threads[i], NULL);
}
virConnectClose(conn);
pthread_exit(NULL);
}
/************************************************/
Here is the output of the program with 2 defined domains:
> libvir: VBOX error : operation failed: OpenRemoteSession/LaunchVMProcess failed, domain can't be started
> failed to start c538c89a-70da-42ab-a88a-5aeb15698c12
> 034cf837-abe7-4c48-8373-0ddcf480d416 started
> 034cf837-abe7-4c48-8373-0ddcf480d416 destroyed
Sometimes the first domain really fails to start, but sometimes it starts correctly but libvirt reports
an error. Sometimes domains aren't destroyed but libvirt reports no error at all.
If there is only one domain, no problem occurs at all. I also tried the same code (ie with multiple domains)
but with only one thread and it works well.
I managed to reproduce these issues with libvirt 0.9.4, 0.9.7, using VirtualBox 4.0 and 4.1.
--
Jean-Baptiste ROUAULT
Ingénieur R&D - diateam : Architectes de l'information
Phone : +33 (0)9 53 16 02 70 Fax : +33 (0)2 98 050 051
12 years, 8 months
[libvirt-users] USB Passthrough of two identical devices
by Hendrik Friedel
Hello,
I re-post my question from some days ago, as I got no reply..
Please let me know, if my question is unclear, or if I can do anything
to make answering it easier.
I appreciate your help.
Greetings,
Hendrik
Hello,
I'd like to pass throug two identical devices to my VM. (using libvirt,
guest is debian). For one device, it works like this:
<hostdev mode='subsystem' type='usb'>
<source>
<vendor id='0x4fa'/>
<product id='0x2490'/>
</source>
<boot order='2'/>
</hostdev>
But now, I have another device just like this one:
Bus 001 Device 007: ID 04fa:2490 Dallas Semiconductor DS1490F 2-in-1
Fob, 1-Wire adapter
Bus 001 Device 005: ID 04fa:2490 Dallas Semiconductor DS1490F 2-in-1
Fob, 1-Wire adapter
Unfortunately, only one of these two devices appears for the Guest, even
if I duplicate the above entry.
Now, there's this option to pass devices:
<address bus='0x06' device='0x02''/>
But the Bus/Device can/might change... Maybe this can be overcome by
udev (and maybe this is the default in ubuntu? can someone confirm?)
I have tried the latter syntax aswell. Here the log-file:
Code:
LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
QEMU_AUDIO_DRV=none /usr/bin/kvm -S -M pc -cpu qemu32 -enable-kvm -m 256
-smp 1 -name WG -uuid fd90f0d6-122c-992f-a399-4105ee30d6e3 -chardev
socket,id=monitor,path=/var/lib/libvirt/qemu/WG.monitor,server,nowait
-monitor chardev:monitor -boot c -drive
file=/var/lib/zentyal/machines/WG/WG-Test.qcow2,if=scsi,index=0,boot=on,format=qcow2
-net nic,macaddr=00:16:3e:5d:c7:9e,vlan=0,name=nic.0 -net
tap,fd=29,vlan=0,name=tap.0 -serial none -parallel none -usb -usbdevice
mouse -vnc 0.0.0.0:0,password -k de -vga cirrus -usbdevice
host:04fa:2490 -usbdevice host:04fa:2490
usb_create: no bus specified, using "usb.0" for "usb-host"
husb: open device 1.5
husb: config #1 need -1
husb: 1 interfaces claimed for configuration 1
husb: grabbed usb device 1.5
usb_create: no bus specified, using "usb.0" for "usb-host"
What's odd in this:
-usbdevice host:04fa:2490 -usbdevice host:04fa:2490
And this, although I had used the bus/device syntax...
So, what would you recommend?
Regards,
Hendrik
12 years, 8 months
[libvirt-users] CfP 7th Workshop on Virtualization in High-Performance Cloud Computing (VHPC'12)
by VHPC 12
we apologize if you receive multiple copies of this CFP.
===================================================================
CALL FOR PAPERS
7th Workshop on
Virtualization in High-Performance Cloud Computing
VHPC '12
as part of Euro-Par 2012, Rhodes Island, Greece
===================================================================
Date: August 28, 2012
Workshop URL: http://vhpc.org
SUBMISSION DEADLINE:
Rolling abstract submission
June 4, 2012 - Full paper submission
SCOPE:
Virtualization has become a common abstraction layer in modern
data centers, enabling resource owners to manage complex
infrastructure independently of their applications. Conjointly,
virtualization is becoming a driving technology for a manifold of
industry grade IT services. The cloud concept includes the notion
of a separation between resource owners and users, adding services
such as hosted application frameworks and queueing. Utilizing the
same infrastructure, clouds carry significant potential for use in
high-performance scientific computing. The ability of clouds to provide
for requests and releases of vast computing resources dynamically and
close to the marginal cost of providing the services is unprecedented in
the history of scientific and commercial computing.
Distributed computing concepts that leverage federated resource
access are popular within the grid community, but have not seen
previously desired deployed levels so far. Also, many of the scientific
data centers have not adopted virtualization or cloud concepts yet.
This workshop aims to bring together industrial providers with the
scientific community in order to foster discussion, collaboration
and mutual exchange of knowledge and experience.
The workshop will be one day in length, composed of 20 min
paper presentations, each followed by 10 min discussion sections.
Presentations may be accompanied by interactive demonstrations.
TOPICS
Topics of interest include, but are not limited to:
Higher-level cloud architectures, focusing on issues such as:
- Languages for describing highly-distributed compute jobs
- Workload characterization for VM-based environments
- Optimized communication libraries/protocols in the cloud
- Cross-layer optimization of numeric algorithms on VM infrastructure
- System and process/bytecode VM convergence
- Cloud frameworks and API sets
- Checkpointing/migration of large compute jobs
- Instrumentation interfaces and languages
- VMM performance (auto-)tuning on various load types
- Cloud reliability, fault-tolerance, and security
- Software as a Service (SaaS) architectures
- Research and education use cases
- Virtualization in cloud, cluster and grid environments
- Cross-layer VM optimizations
- Cloud use cases including optimizations
- VM-based cloud performance modelling
- Performance and cost modelling
Lower-level design challenges for Hypervisors, VM-aware I/O devices,
hardware accelerators or filesystems in VM environments, especially:
- Cloud, grid and distributed filesystems
- Hardware for I/O virtualization (storage/network/accelerators)
- Storage and network I/O subsystems in virtualized environments
- Novel software approaches to I/O virtualization
- Paravirtualized I/O subsystems for modified/unmodified guests
- Virtualization-aware cluster interconnects
- Direct device assignment
- NUMA-aware subsystems in virtualized environments
- Hardware Accelerators in virtualization (GPUs/FPGAs)
- Hardware extensions for virtualization
- VMMs/Hypervisors for embedded systems
Data Center management methods, including:
- QoS and and service levels
- VM cloud and cluster distribution algorithms
- VM load-balancing in Clouds
- Hypervisor extensions and tools for cluster and grid computing
- Fault tolerant VM environments
- Virtual machine monitor platforms
- Management, deployment and monitoring of VM-based environments
- Cluster provisioning in the Cloud
PAPER SUBMISSION
Papers submitted to the workshop will be reviewed by at least two
members of the program committee and external reviewers. Submissions
should include abstract, key words, the e-mail address of the
corresponding author, and must not exceed 10 pages, including tables
and figures at a main font size no smaller than 11 point. Submission
of a paper should be regarded as a commitment that, should the paper
be accepted, at least one of the authors will register and attend the
conference to present the work.
Accepted papers will be published in the Springer LNCS series - the
format must be according to the Springer LNCS Style. Initial
submissions are in PDF; authors of accepted papers will be requested
to provide source files.
Format Guidelines: http://www.springer.de/comp/lncs/authors.html
Style template:
ftp://ftp.springer.de/pub/tex/latex/llncs/latex2e/llncs2e.zip
Abstract Submission Link: http://edas.info/newPaper.php?c=11943
IMPORTANT DATES
Rolling abstract submission
June 4, 2012 - Full paper submission
June 29, 2012 - Acceptance notification
July 20, 2012 - Camera-ready version due
August 28, 2012 - Workshop Date
CHAIR
Michael Alexander (chair), TU Wien, Austria
Gianluigi Zanetti (co-chair), CRS4, Italy
Anastassios Nanos (co-chair), NTUA, Greece
PROGRAM COMMITTEE
Paolo Anedda, CRS4, Italy
Giovanni Busonera, CRS4, Italy
Brad Calder, Microsoft, USA
Roberto Canonico, University of Napoli Federico II, Italy
Tommaso Cucinotta, Alcatel-Lucent Bell Labs, Ireland
Werner Fischer, Thomas-Krenn AG, Germany
William Gardner, University of Guelph, USA
Marcus Hardt, Forschungszentrum Karlsruhe, Germany
Sverre Jarp, CERN, Switzerland
Shantenu Jha, Louisiana State University, USA
Xuxian Jiang, NC State, USA
Nectarios Koziris, National Technical University of Athens, Greece
Simone Leo, CRS4, Italy
Ignacio Llorente, Universidad Complutense de Madrid, Spain
Naoya Maruyama, Tokyo Institute of Technology, Japan
Jean-Marc Menaud, Ecole des Mines de Nantes, France
Dimitrios Nikolopoulos, Foundation for Research&Technology Hellas, Greece
Jose Renato Santos, HP Labs, USA
Walter Schwaiger, TU Wien, Austria
Yoshio Turner, HP Labs, USA
Kurt Tutschku, University of Vienna, Austria
Lizhe Wang, Indiana University, USA
Chao-Tung Yang, Tunghai University, Taiwan
DURATION: Workshop Duration is one day.
GENERAL INFORMATION
The workshop will be held as part of Euro-Par 2012.
Euro-Par 2012: http://europar2012.cti.gr/
12 years, 8 months
[libvirt-users] Problems using latest qemu-kvm and latest libvirt ( hvm missing )
by Bhasker C V
Hi all
I have faced this issue already and the solution was to go back to a
old version of qemu-kvm and/or libvirt and things start falling into
place but this time I would want to solve this.
I have used these versions as per the o/p of the commands below. To
jumpstart a new machine which is libvirt capable, it always is a hastle
to find out which of the version combination of libvirt,qemu-kvm will work.
Just by picking the latest of the two versions does not help and ends up
not supporting hvm at all
$ sudo virsh capabilities
<capabilities>
<host>
<uuid>34373030-3635-435a-4a32-313230485156</uuid>
<cpu>
<arch>x86_64</arch>
<model>Westmere</model>
<vendor>Intel</vendor>
<topology sockets='2' cores='4' threads='2'/>
<feature name='rdtscp'/>
<feature name='pdpe1gb'/>
<feature name='dca'/>
<feature name='pdcm'/>
<feature name='xtpr'/>
<feature name='tm2'/>
<feature name='est'/>
<feature name='smx'/>
<feature name='vmx'/>
<feature name='ds_cpl'/>
<feature name='monitor'/>
<feature name='dtes64'/>
<feature name='pclmuldq'/>
<feature name='pbe'/>
<feature name='tm'/>
<feature name='ht'/>
<feature name='ss'/>
<feature name='acpi'/>
<feature name='ds'/>
<feature name='vme'/>
</cpu>
<power_management/>
<migration_features>
<live/>
<uri_transports>
<uri_transport>tcp</uri_transport>
</uri_transports>
</migration_features>
</host>
</capabilities>
$ virsh --version
0.9.11
$ qemu-system-x86_64 --version
QEMU emulator version 1.0,1 (qemu-kvm-1.0.1), Copyright (c) 2003-2008
Fabrice Bellard
$ sudo virsh uri
qemu:///system
$ sudo virsh version
Compiled against library: libvir 0.9.11
Using library: libvir 0.9.11
Using API: QEMU 0.9.11
error: failed to get the hypervisor version
error: internal error Cannot find suitable emulator for x86_64
$ which kvm
/usr/local/bin/kvm
Can someone tell me, please, what is the version of qemu-kvm which will
work well with the latest libvirt 0.9.11 ? since clearly the latest
versions of qemu-kvm and libvirt are not compatible fully (atleast not hvm).
Even better if this is documented somewhere visible so that a lot of
time can be saved in iterating through the versions of qemu-kvm to find
out which one will work.
--
Bhasker C V
Secure Mails:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x4D05FEEC54E47413
12 years, 8 months
[libvirt-users] [API reference] Are there XML-handling API to retrieve info directly from xml configure file
by Zhihua Che
Hi, everyone
I'm writing a application using libvirt and need to query guest
os's virtual network interface usage, like bytes read or written
through a given interface. I know int
virDomainInterfaceStats(virDomainPtr dom, const char * path,
virDomainInterfaceStatsPtr stats, size_t size) is designed for my
purpose but I 'm not sure how I determine the second parameter path.
I'm now think of determining the virtual interface by parsing the
domain's xml configure file.
But I don't find that libvirt supply such functions, that means, I
have to resort to other library lik libxml?
thanks
12 years, 8 months