[libvirt-users] libvirt and glusterfs integrate problem
by lyz_pro
Hi everyone
I have a problem when use libvirt and glusterfs.
When I use libvirt to start a vm with glusterfs disk. the operation will block.
after I `CTL + c` the 'virsh start domainxx' comand ,
I use `virsh list` will find the vm in a strange state, kind like follow:
Id Name State
----------------------------------------------------
20 vm10 shut off
and I when I start the vm again, It will promote the vm is in active.
the xml as follow (172.16.32.16 is a glusterfs node):
<domain type='kvm' id='20'>
<name>vm10</name>
<uuid>12208c14-3990-c134-2653-8a828ff1eb1d</uuid>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>4</vcpu>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64' machine='rhel6.5.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='localtime'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='network' device='disk'>
<driver name='qemu' type='qcow2'/>
<source protocol='gluster' name='h2216v5/tmp/vm10.img'>
<host name='172.16.32.16'/>
</source>
<target dev='hda' bus='ide'/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0'>
<alias name='usb0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='ide' index='0'>
<alias name='ide0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
<alias name='pci.0'/>
</controller>
<interface type='bridge'>
<mac address='00:0c:29:2f:aa:b1'/>
<source bridge='virbr0'/>
<target dev='vnet91'/>
<model type='rtl8139'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5991' autoport='yes' listen='172.16.32.3' keymap='en-us'>
<listen type='address' address='172.16.32.3'/>
</graphics>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</memballoon>
</devices>
<seclabel type='none'/>
</domain>
Also:
I can use `qemu-kvm` command to start vm successful with gluster://172.16.32.16
I have stop both nodes' iptables. and my libvirt and qemu version is :
Compiled against library: libvirt 1.1.4
Using library: libvirt 1.1.4
Using API: QEMU 1.1.4
Running hypervisor: QEMU 1.6.2
glusterfs-3.4.1-3.el6.x86_64
--------------
lyz_pro
2014-04-14
10 years, 8 months
[libvirt-users] libvirt Java - vmware (esx driver)
by Mihai Cazacu
Hi,
I'm trying to connect to a VMware vCenter Server (Version 5.0.0 Build
1300600) using this code:
class CustomConnectAuth extends ConnectAuth {
> CustomConnectAuth() {
>
// credType = ...
// ...
> }
> @Override
> int callback(Credential[] cred) {
> // ...
> return 0
> }
> }
>
ConnectAuth auth = new CustomConnectAuth()
> Connect conn = new Connect("esx://USERNAME@HOSTNAME/sdk?no_verify=1",
> auth, 0)
and I've got this error message:
libvirt: error : unsupported configuration: *libvirt was built without the
> 'esx' driver*
If I use the vijava client, the connection works fine.
ServiceInstance serviceInstance = new ServiceInstance(new URL("
> https://HOSTNAME/sdk"), USERNAME, PASSWORD, true)
...
Some environment info:
os: Ubuntu 13.10
> jdk: 1.7.0_51-b13
> Java client: org.libvirt:libvirt:0.5.1
Can you help, please?
Thanks,
Mihai
--
Mihai Cazacu
Software Engineer
E-mail: cazacugmihai(a)gmail.com
Mobile: +40 745 254 657
Linkedin: cazacugmihai <http://www.linkedin.com/in/cazacugmihai>
Skype: cazacugmihai
Twitter: cazacugmihai
10 years, 8 months
[libvirt-users] Setting elevator=noop in the guest necessary?
by Johannes Kastl
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi everyone,
I found an article about libvirt, and one thing that I have not seen
anywhere else:
> IMPORTANT: If you boot a Linux VM, you might want to add
> “elevator=noop” to your Linux boot command line to force the disk
> scheduler to let the host machine handle the disk writes
> reorganisations (like tunnelling tcp over tcp, it is bad to have
> two schedulers trying to do each other’s job). For example, on
> GRUB2 on Debian, you have to append “elevator=noop” after
> GRUB_CMDLINE_LINUX in /etc/default/grub.
(from
http://blog.normation.com/en/2012/03/09/a-guide-to-the-everyday-use-of-li...)
Is this necessary? Or is this even a good idea? Is this outdated? Or
does it depend on the kind of hypervisor (XEN, KVM,...)?
The few qemu/KVM-machines I have tested did work fine without this,
although at this point I just set them up and did a few program
installations, no real 'workload'.
Thanks in advance.
Regards,
Johannes
- --
...Unix, MS-DOS, and Windows NT (also known as the Good, the Bad, and
the Ugly).
(Matt Welsh)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/
iEYEARECAAYFAlNK5UUACgkQzi3gQ/xETbK9jQCePXXY87HpDrufk8tKvaI+JhR9
uGQAoJjxU/B8Z8sGvQS/iPUZNsQtM/Il
=sjGR
-----END PGP SIGNATURE-----
10 years, 8 months
[libvirt-users] libvirt: error : internal error: cannot apply process capabilities -1
by Santhosh Kokala
Hi All,
I am running libvirt-1.1.2 on Scientific Linux release 6.1 (Carbon). I compiled the libvirtd rpms and installed them on to my system. I see this error
2014-04-11 05:37:42.351+0000: 12378: error : virCommandWait:2348 : internal error: Child process (LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin /usr/libexec/qemu-kvm -help) unexpected exit status 1: libvirt: error : internal error: cannot apply process capabilities -1
Whenever libvirtd restarts. Because of this error I also cannot create a domain with os_type set to "hvm". Virsh capabilities also does not list this os_type.
Can someone let me if I am missing something obvious?
Santhosh
10 years, 8 months
[libvirt-users] Help with understanding and solving snapshot problem
by rolf
Hello
Fairly new to libvirt. I’m hoping to both solve a problem with this question as well as learn more detail about how libvirt works.
Using RHEL 6.4 and libvirt version is 0.10.2 and qemu-img version is 0.12.1.2
Using virt-manager I created a VM. Nothing unusual as far as I can see. I then added a disk. So I have a second virtio based volume which the guest then mounts as a separate filesystem. At some stage after that I created a snapshot of the system.
I can’t delete the snapshot. The end result is I’d like to create a snapshot that excludes the second (much larger) disk - that is backed up via conventional backup systems. But the issue is first deleting the snapshot and my understanding of what its saying.
So here is some basic info:
# virsh snapshot-list host1
Name Creation Time State
------------------------------------------------------------
snap1-host1 2014-01-19 16:59:10 +1100 shutoff
#
# virsh snapshot-info host1 --current
Name: snap1-host1
Domain: host1
Current: yes
State: shutoff
Location: internal
Parent: -
Children: 0
Descendants: 0
Metadata: yes
So I try and delete it:
# virsh snapshot-delete host1 --current
error: Failed to delete snapshot snap1-host1
error: unsupported configuration: deletion of 1 external disk snapshots not supported yet
Why does it say “external” in the above error, when the snapshot-info says its Location is internal? Are they not related ideas?
The img file /var/lib/libvirt/images/host1.img is not being used by KVM. the snapshot files are in use instead:
# virsh domblklist host1
Target Source
------------------------------------------------
vda /var/lib/libvirt/snap1-host1.qcow2
vdb /var/lib/libvirt/snap1-host1-db.qcow2
hdc -
Querying them:
# qemu-img info /var/lib/libvirt/snap1-host1.qcow2
image: /var/lib/libvirt/snap1-host1.qcow2
file format: qcow2
virtual size: 24G (25769803776 bytes)
disk size: 3.5G
cluster_size: 65536
[root@cocoa libvirt]# qemu-img info /var/lib/libvirt/snap1-host1-db.qcow2
image: /var/lib/libvirt/snap1-host1-db.qcow2
file format: qcow2
virtual size: 1.6T (1800279089664 bytes)
disk size: 325G
cluster_size: 65536
What have I done wrong and how can I correct this so I can discard the existing snapshot and have a snapshot of the system excluding the second disk (and optionally which I can re-take at intervals and discard old ones)?
Many thanks,
rolf.
10 years, 8 months
[libvirt-users] Windows 2008r2 guest tcp retransmit hangs
by Dennis Jacobfeuerborn
Hi,
I'm currently investigating a problem with our windows 2008r2 guest on
centos 6 hosts. The issue is that the windows system sometimes sees a
SYN packet for a tcp connection but doesn't respond. Three seconds later
the retransmitted packet arrives and this time windows decides to
proceed normally with the connection.
This is with the virtio drivers but I have now switched to the e1000
driver where the problem also occurs but not quite as badly as with
virtio which leads me to speculate that the driver isn't really the
problem but only affects whatever the real issue is.
Also this does not happen when the systems primary IP is addressed
directly but only when an IP on the loopback device is addressed through
a load-balancer.
I've also provisioned a linux guest on the same host and put that into
the load balancer as well but there everything is fine.
Has anyone run into this and can provide a pointer in the right direction?
Regards,
Dennis
10 years, 8 months
[libvirt-users] passthrough filesystem (9p) permissions issues on Fedora 20
by David Mansfield
Hello All:
I've gotten a passthrough filesystem to work (as in, to mount) in my vm
(guest F20, host F20), but due to the fact that the qemu-kvm process
runs as "qemu" user, I cannot access "my" files from the share. Both
the guest and the host are running SSSD so the user/group mapping is
identical.
Other than putting 'user = "root"' it /etc/libvirt/qemu.conf, is there a
way to get this to work without trashing all of the file permissions on
the directory?
Even if I do put the user=root, I imagine selinux will become a major
headache anyway.
So is there a roadmap for how to get this working?
--
Thanks,
David Mansfield
Cobite, INC.
10 years, 8 months
[libvirt-users] Passing non-standard Options through Libvirt to QEMU
by Asadullah Hussain
Hello, I have a custom QEMU which requires some non-standard command line
arguments to launch a VM. e.g., "--proc-type=secondary" option is always
required to launch a QEMU VM.
To launch the VM through libvirt (virsh) "How do I specify these
non-standard options in XML?
OR if thats not possible ,Can you guide me at which point (code file)
libvirt converts the XML to QEMU command (so that I can insert the option
there).
Regards
--
Asadullah Hussain
10 years, 8 months