[libvirt-users] [Problem] C# virDomainShutdown
by Danny Fonk
Hey there,
im using libvirt since 2 weeks now and there are still some issues im confronted with. I use libvirt in C# and I'm running a 32-bit machine on Windows 7. Actually my worst problem is, is that I'm not able to Shutdown on machine no matter which command I'm using. virDomainShutdown isn't working nor virDomainDestroy. Basically I use the virConnectOpenAuth example to make a test on this. You'll find a code-excerpt in the attachment. Everything else is working. Like Domain.GetName etc. - i just can't figure out the failure and I wanted to ask if the mistake is in the API since it's not tested on a 32-bit Windows. Already thanks for the support.
Best regards,
D. Fonk
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
12 years, 10 months
[libvirt-users] Question about libvirt / LXC
by Samuel Hassine
Hi there,
I have a small simple question about libvirt and LXC containers. I know
how to activate /dev/net/tun in an LXC container:
#tun
lxc.cgroup.devices.allow = c 10:200 rwm
in the LXC config file.
But, how to do that in a libvirt XML file? I just need to activate the
/dev/net/tun device in an LXC container using libvirt.
Thanks for your answers!
Best regards.
Sam
12 years, 10 months
[libvirt-users] oVirt setup issues
by Christian Parpart
Hi all,
as suggested in a prior mail, I was now trying out oVirt - however, on
a non-Redhat/Debian system -
and ran into huge issues primary due to the lag of information / documenation.
So here my assumptions:
* oVirt is a web application based on JBoss application server.
* VDSM is an agent to run on every hypervisor (or also VM?)
* nothing else needed? (despite jboss, java-jdk-1.6, python-2.7, maven-2.2)
I tried following the install-from-source guides for oVirt and failed at
a compilation error.
# cd $OVIRT_ENGINE_SRCDIR
# make
[.....]
[INFO] Compiling 186 source files to
/opt/ovirt/src/ovirt-engine/backend/manager/modules/dal/target/classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
/opt/ovirt/src/ovirt-engine/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/PGHack.java:[9,7]
error: PGHack is not abstract and does not override abstract method
getParentLogger() in CommonDataSource
[...]
There are no remote branches nor tags that looked like "stable" that I
could test on, too.
So finally (the not favoured version), I tried putting a Fedora 16
netinstall into a KVM on my hypervisor-test-node
and installed everything in there, again, following some guide from
the upstream site.
Since it did not compile anything, the install worked well, but I
could not add my hypervisor node
as a host, in fact, it complained about some tools not being able to
be installed.
What tools? VDSM? how am I supposed to "cleanly" install it if not as
promoted on the install guide? :(
In the end, I am having nothing working, feeling a little bit sad
about the possibly wasted time,
so I hope you guys can give me a hint on how to deal with VDSM (if
that's what I am missing here)
and how to deal with the compile error when installing from source.
Best regards,
Christian Parpart.
12 years, 10 months
[libvirt-users] gPXE fails automatically, succeeds with manual autoboot
by Paul Lussier
Hi Folks,
I'm trying to auto-create a VM using a kickstart server and gPXE with
my VMs. The underlying physical host is CentOS 6.0 running
libvirt-0.8.1-27, and libvirt-python 0.8.1-27, virt-manager 0.8.4-8.
The underlying network config on the physical host is:
# ip -o -4 addr show
1: lo inet 127.0.0.1/8 scope host lo
6: vnet0 inet 10.8.31.61/23 brd 10.8.31.255 scope global vnet0
7: vnet1 inet 10.0.4.249/24 brd 10.0.4.255 scope global vnet1
8: virbr0 inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
I'm attempting to create the new VM with the following command-line:
# /usr/bin/virt-install -n test -r 2048 --vcpus=2 --disk
path=/var/lib/libvirt/images/test.img,size=25 --pxe --os-type=linux
--os-variant=rhel6 --network bridge=vnet0,mac=52:54:00:07:51:1e
--autostart
So, I'm trying to create the VM with one NIC, bound to the vnet0
interface on the physical host. The physical host is both the
PXE/DHCP server (using cobbler) and the kickstart server.
When I run the above virt-install command, while simultaneously
running 'tcpdump -i vnet0 -n port 67 or port 68' on the physical host,
the VM powers on, boots up, and attempts to PXE boot. However, I
never see any traffic on the physical host's vnet0 interface, nor does
the DHCP server log any requests. If I boot the VM, then hit Ctrl-B
to drop into gPXE's prompt and type autoboot, the first invocation
fails, but the second one succeeds.
Has anyone seen this kind of behavior ? Is this indicative of a
configuration issue on the physical host? An underlying network
problem ? Or am I missing an option on my command-line ?
I'm a little stumped here, and hoping someone can point me in the
right direction. I'm more than happy to RTFM if someone can tell me
which M to F'ing R :)
--
Thanks
Paul
12 years, 10 months
[libvirt-users] libvirt 0.9.9: could not open /dev/net/tun: Operation not permitted
by Fischer, Anna
Hi, I'm running the latest libvirt 0.9.9.
I'm trying to start a VIF of type "Ethernet". I know there are problems with that because you need to be root in order to control the tun/tap driver.
I changed my qemu.conf file to
user = "root"
group = "root"
clear_emulator_capabilities = 0
However, I still get an error when trying to start my VM:
[root]# virsh start vm-0-3
error: Failed to start domain vm-0-3
error: internal error process exited while connecting to monitor: qemu-system-x86_64: -net tap,ifname=vif-0-3,script=/etc/libvirt/qemu/vif-vnet-up,vlan=0,name=hostnet0: could not open /dev/net/tun: Operation not permitted
qemu-system-x86_64: -net tap,ifname=vif-0-3,script=/etc/libvirt/qemu/vif-vnet-up,vlan=0,name=hostnet0: Device 'tap' could not be initialized
I run the latest qemu-kvm.
The permissions on the tun device are set to default settings and my scripts are executable by anyone:
[root ~]# ll /dev/net/tun
crw-rw---- 1 root root 10, 200 Jan 20 15:39 /dev/net/tun
[root ~]# ll /etc/libvirt/qemu/vif-vnet-*
-rwxrwxrwx 1 root root 150 Jan 17 15:52 /etc/libvirt/qemu/vif-vnet-down
-rwxrwxrwx 1 root root 137 Jan 19 17:51 /etc/libvirt/qemu/vif-vnet-up
Any idea what I'm doing wrong here? I have actually also compiled libvirt with --without capng, so it should not drop capabilities anyway. Why does it not run as root?
Thanks,
Anna
12 years, 10 months
[libvirt-users] span port from cisco switch to host to guest using kvm
by nemus@grayhatlabs.com
I am trying to get the equivalent of promisc mode to pass all received
traffic to a kvm guest that is running snort.
So I have a cisco switch with span port plugged into eh2 on my kvm host
which is centos.
I want the kvm host to forward all promisc traffic from the span port to
the guest running snort of tcpdump.
What would be the best way to do this?
12 years, 10 months
[libvirt-users] Kickstart file doesn't work
by Sarath P R
I am starting an instance passing xml configuration like this. Contents
inside my kickstart file is this *apt-get install vim --assume-yes* . But I
think kickstart is not considered while booting instance though I am able
to start instance. Please help. Thanks in advance
"<domain type='xen'>"
+ " <name>testVM-server</name>"
+" <description></description>"
+" <memory>524288</memory>"
+" <currentMemory>524288</currentMemory>"
+" <vcpu>1</vcpu>"
+ " <os>"
* + " <type>hvm</type**>"
+ " <kernel>/home/x**entest/Desktop/**vmlinuz</kernel**>"
+ " <initrd>/home/x**entest/Desktop/**initrd</initrd>**"
+ " <loader>/usr/li**b/xen-4.1/boot/**hvmloader</load**
er>"
+ " <boot dev='hd'/>"
+ " <cmdline>ks=http://10.30.6.3/testVM-server.cfg
</cmdline>"
+ " </os>"*
+ " <on_poweroff>destroy</on_poweroff>"
+ " <on_reboot>destroy</on_reboot>"
+ " <on_crash>destroy</on_crash>"
+ " <devices>"
+ " <emulator>/usr/lib64/xen/bin/qemu-dm</emulator>"
+ " <disk type='file' device='disk'>"
+ " <driver name='tap' type='aio'/>"
+ " <source
file='/home/xentest/Desktop/ubuntu-server.img'/>"
+ " <target dev='xvda'/>"
+ " </disk>"
+ " <interface type='bridge'>"
+ " <source bridge='br0'/>"
+ " <script path='/etc/xen/scripts/vif-bridge'/>"
+ " </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='5900' autoport='yes'
keymap='en-us'/>"
+ " <sound model='es1370'/>"
+ " </devices>"
+ "</domain>";
--
Thank You
Sarath P R | cell +91.999.502.4287
12 years, 10 months
[libvirt-users] unable to get libvirt work with libxenlight
by 杨镭
Hi all:
I am having problem with libxenlight as the underlying xen drive. I
compiled libvirt with configure flag: "--with-libxl". However, the output
of command: ldd libvirt.so did not show a symbol link to libxenlight.so. I
assume it should link to it, but I could be wrong.
To verify libxenlight is working, I then stopped xend. After this, virsh -c
xen:/// list can not list Domain-0 anymore. Only start xend can it display
correct Domain-0 and DomU information.
My libvirt version 0.9.9, Xen is 4.1.2. BTW, the xl command itself is ok
after turning off xend.
--
lei yang
12 years, 10 months
[libvirt-users] libvirt with sasl shadow backend
by Robyn Bachofer
Hi list,
i have a problem with virt-manager authentication over tcp.
I tried it with virt-manager over non-TLS "TCP (SASL/Kerberos)" auth. and
the sasl mechanism "shadow".
The user (tested with unprivileged user and root) is allready in the group
libvirt(d) and the process is running as root.
The result on host:
Jan 18 21:05:31 host libvirtd: 21:05:31.620: error :
remoteDispatchAuthSaslStep:3691 : sasl step failed -20 (SASL(-13): user not
found: no secret in database)
on client (virt-manager gui):
...
('virtConnectOpenAuth() faild')
..
I have tested it with tool "testsaslauthd" and their result:
e.g.: # testsaslauthd -u root -p root
0: OK "Success."
When i set it manually with saslpasswd:
# saslpasswd2 -a libvirt root -p
it works.
Although I use, in the configuration of sasl, shadow, libvirt does not use
it (i think so).
Host:
debian6.0.3 (squeez)
libvirt 0.8.3 (deb)
sasl2.1.23 (deb)
:-)
Best regards,
Robyn
12 years, 10 months