[libvirt-users] Reg: Packaging format for LIBIVRT
by Alphonse Hansel Anthony
Hi,
I am looking for an available Open Source Packaging model for Libvirt,
similar to
OVF/OVA supported by Vmware.
The OVA model uses the manifest to define the resource requirements for the
virtual appliance
and the XML schema follows OVF.
Are there similar specification to include libvirt XML in a package along
with disk images/ISO... etc?
Any pointers in this regard would be useful.
Thanks,
Alphonse
13 years, 3 months
[libvirt-users] Using libvirt with a preexisting network infrastructure
by Vegard Vesterheim
I have a server running Ubuntu natty (libvirt 0.8.8) with separate
ethernet interfaces. I have created an unnumbered bridge for each
interface, these are connected to an already established network
infrastructure, with preexisting DHCP and DNS services.
I would like to handle *establishment* of these bridges outside libvirt
(via /etc/network/interfaces), but still have them defined as networks
within libvirt. So, libvirt shall not *configure* the bridges, just be
aware of their existence and connect each VM to its configured
bridge. This way I can use virt-manager/libvirt to connect my virtual
hosts to the correct network. The libvirt commands net-start,
net-destroy would become no-ops. It seems that libvirt is geared towards
handling all network configuration itself, but I do not need help from
libvirt for establishing the bridges, DHCP and DNS.
I know that I can edit the <interface> element in the VM XML-files
after creation, to assign a virtual host to a bridge, like
this:
<interface type='bridge'>
<source bridge='br22'/>
....
</interface>
This works, but I would like to do this with libvirt mechanisms. Is this
possible?
- Vegard V -
13 years, 3 months
[libvirt-users] Custom storage pools/volumes
by Mohammed Naser
Hello everyone,
We're currently working with using libvirt as an abstract API to make our dealings with other hypervisors far easier and faster, however, we have our own storage API that connects/disconnects and makes LUNs available over iSCSI with iSER.
We would have loved to use a storage pool however our system implements a one target per LUN/VDI, therefore, we'd have to create a pool for each server.
We really would like to utilize the virStorageVolDownload / virStorageVolUpload API calls, however, it seems that those would only work if the storage volume is within a pool.
Is there a way we could possibly define a storage volume without a pool or will we have to create a storage pool for each individual volume?
Thank you,
Mohammed Naser
http://vexxhost.com
13 years, 3 months
Re: [libvirt-users] Associating a statefile with an image
by Eric Blake
[re-adding the list]
On 08/02/2011 03:18 PM, sethuraman subbiah wrote:
>> Libvirt shoots for monthly releases; the current schedule is feature freeze this weekend, then a release around the first of August.
>>
>> The new API will allow you do to either:
>>
>> virsh dumpxml --inactive --dom> file.xml
>> edit file.xml
>> virsh save dom dom.save --xml file.xml
>> virsh restore file.save
>>
>> or:
>>
>> virsh dumpxml --inactive --dom> file.xml
Using --inactive here only works if you haven't made any changes to the
inactive configuration that differs from the currently running domain.
I'd amend this step to 'virsh dumpxml dom > file.xml' for both of these
examples.
>> virsh save dom dom.save
>> edit file.xml
>> virsh restore file.save --xml file.xml
These two examples will be supported in 0.9.4. Additionally, I added:
virsh save-file-dumpxml dom.save > file.xml
virsh save-file-define dom.save file.xml
virsh save-file-edit dom.save
to do things inline, and to make it so you don't have to remember to
'virsh dumpxml dom' prior to 'virsh save'.
>
> I found that the latest libvirt (libvirt 0.9.4) is out.
That's amazing, considering it hasn't been released yet :) Maybe you
are referring to 0.9.4-rc2 instead? But at any rate, the official 0.9.4
will probably be released tomorrow with even more bug fixes above 0.9.4-rc2.
> I tried installing in my Centos 5.6 machine. After a successful
installation, when I start virsh , I get :
>
> virsh: /lib/libvirt.so.0: version `LIBVIRT_PRIVATE_0.8.2' not found (required by virsh)
>
> Is it possible to get the latest version of libvirt 0.9.4 work on Centos 5.6 ? Thanks a lot for your help.
Yes, it should be possible, although I haven't tried it myself on centos
(but I have tried on RHEL 5.7). Are you sure you installed your
self-built libvirt.so correctly? We take great pains to ensure that
libvirt.so is backwards compatible (no symbols are ever removed).
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
13 years, 3 months
Re: [libvirt-users] centos6.0 unable to install guests w/ kickstart via virt-install
by JDF. Franklin
Looks like you're missing some backslashes toward the bottom, so
virt-install wouldn't see anything past "os-variant". Here's mine
(adding the ttyS0 allows looking at it on the cli with "virsh console"
as well):
virt-install \
--name=myhost \
--connect qemu:///system \
--disk path=/data/virt/guest$$,size=20,bus=virtio \
--vcpus=2 --ram=1024 \
--graphics vnc,keymap=en-us \
--autostart \
--location=http://example.org/ks/el6/x86_64/ \
-x "console=ttyS0,115200 ks=http://example.org/ks/myhost.cfg" \
--network bridge=br0 \
--os-type=linux \
--os-variant=virtio26
13 years, 3 months
[libvirt-users] Snapshot error "command savevm not found"
by Trey Dockendorf
Attempting to take snapshots of VM using virsh with the following command,
# virsh -c qemu:///system snapshot-create CentOS6-x86-001
Results in the following error,
error: internal error unable to execute QEMU command 'savevm': The command
savevm has not been found
The VM's virtual disks are qcow2. Below is the XML file for this vm
------------
<domain type='kvm' id='6'>
<name>CentOS6-x86-001</name>
<uuid>050fb9d8-0b9a-48b9-a432-16eec57a9e8f</uuid>
<memory>1024000</memory>
<currentMemory>1024000</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='rhel6.0.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='qcow2' cache='none'/>
<source file='/vmstore/CentOS6-x86-001/CentOS6-x86-001_sys.qcow2'/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<alias name='ide0-1-0'/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/vmstore/CentOS6-x86-001/CentOS6-x86-001_var.img'/>
<target dev='vdb' bus='virtio'/>
<alias name='virtio-disk1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/>
</disk>
<controller type='ide' index='0'>
<alias name='ide0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:4d:74:c7'/>
<source bridge='br0'/>
<target dev='vnet0'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/1'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/1'>
<source path='/dev/pts/1'/>
<target port='0'/>
<alias name='serial0'/>
</console>
<input type='tablet' bus='usb'>
<alias name='input0'/>
</input>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5900' autoport='yes'/>
<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='0x05'
function='0x0'/>
</memballoon>
</devices>
<seclabel type='dynamic' model='selinux'>
<label>system_u:system_r:svirt_t:s0:c292,c580</label>
<imagelabel>system_u:object_r:svirt_image_t:s0:c292,c580</imagelabel>
</seclabel>
</domain>
------------
This is my first attempt at snapshots with KVM after migrating from ESXi, so
if there's a better method please let me know.
Thanks
- Trey
13 years, 3 months
[libvirt-users] Guests ignoring config changes
by Michael Jinks
I have a libvirt/kvm setup on a Gentoo system which I've been using
happily for a couple of years. Recently, after a round of updates, I
started encountering all sorts of strange behavior, which I'll mostly
skip for now... My current issue is that guest domains appear to be
ignoring changes made with 'virsh edit <domain>'.
Two examples: My primary desktop VM is crashing on boot, so I'm trying
to boot it with an install/rescue CD. In my client definition file I
have:
<os>
<type arch='x86_64' machine='pc-0.13'>hvm</type>
<boot dev='cdrom'/>
<boot dev='hd'/>
</os>
...and the cdrom defined elsewhere in the file points to a real ISO
file, which I know is bootable. But when I start the guest, it
ignores the CD and boots from the (buggy) system image on the hd
device. This still happens if I remove the "<boot dev='hd'/>" line
altogether.
Second example: I created another VM, definition copied from the one
above, so that I wouldn't be playing around with anything important.
On first boot it complains:
error: internal error process exited while connecting to monitor: char
device redirected to /dev/pts/3
inet_listen_opts: bind(ipv4,127.0.0.1,5911): Address already in use
inet_listen_opts: FAILED
...Oops, forgot to fix my VNC port. So I edited the VM using "virsh
edit", found the VNC line, changed "port=5911" to "port=5912". Saved,
verified that my change appears in the XML file on disk, tried again
to start the guest, and got the same complaint about port 5911 being
in use. "virsh dumpxml" shows the corrrected port number, but for
some reason the change isn't making it through to the guest.
I've tried restarting libvirtd, with no effect, so I'm guessing there
must be some cache of VM configuration data that isn't being updated
when I edit my guest definitions? What am I doing wrong?
Thanks,
--Michael
13 years, 3 months
[libvirt-users] Q on stupid video tricks
by Whit Blauvelt
Hi,
The good news is that if you use Virt-Manager running in a VM viewed through
Virt-Manager, that VM can drill another level through to view VMs. The
badish news is if that's a GUI desktop, the video for the VM-in-VM view ends
up (at least for me) with some serious artifacts - particularly distortions
largely involving vertical lines down through it.
Okay, this is an odd case that hardly counts as a problem, since who would
be crazy enough to do it? Still, since that's me, I'm wondering if there's
any setting to tweak that would bring that video into better focus?
Thanks,
Whit
13 years, 3 months
[libvirt-users] Migration hangs on Gentoo with KVM
by Jonathan Stoppani
Hi there,
I'm trying to migrate a domain between two Gentoo hosts using KVM as hypervisor, but the migration hangs.
I tried both live or offline migration modes without success.
Details below.
Anyone has an idea of what could be wrong with my setup? The migration is the only thing not working.
Host A (initially running the VM)
=================================
# uname -a
Linux pion 2.6.39-gentoo-r3 #12 SMP Fri Jul 29 23:57:49 MST 2011 x86_64 AMD Opteron(tm) Processor 6174 AuthenticAMD GNU/Linux
# kvm --version
QEMU emulator version 0.14.1 (qemu-kvm-0.14.1), Copyright (c) 2003-2008 Fabrice Bellard
# libvirtd --version
libvirtd (libvirt) 0.9.3
# cat /etc/libvirt/libvirtd.conf
http://dpaste.com/hold/583874/
# cat /etc/libvirt/qemu.conf
http://dpaste.com/hold/583873/
# /etc/init.d/libvirtd start
# cat /var/log/libvirt/libvirtd.log
http://pastebin.com/V615fgbK
# virsh create descriptions/domain.xml
# cat descriptions/domain.xml
http://dpaste.com/583880/
# cat /var/log/libvirt/libvirtd.log
http://pastebin.com/0PSDAZhN (startup log removed)
# cat /var/log/libvirt/qemu/nd-50f05b3-0.log
http://dpaste.com/583877/
# virsh migrate nd-50f05b3-0 qemu+ssh://host-b/system
Password:
--> Never exits
# cat /var/log/libvirt/libvirtd.log
http://pastebin.com/EqHBHx8R (startup and domain creation log removed)
# virsh list
Id Name State
----------------------------------
1 nd-50f05b3-0 paused
Host B (destination host)
=========================
# uname -a
Linux lenny 2.6.39-gentoo-r3 #6 SMP Fri Jul 29 18:58:08 MST 2011 x86_64 Intel(R) Xeon(R) CPU 3040 @ 1.86GHz GenuineIntel GNU/Linux
# kvm --version
QEMU emulator version 0.14.1 (qemu-kvm-0.14.1), Copyright (c) 2003-2008 Fabrice Bellard
# libvirtd --version
libvirtd (libvirt) 0.9.3
# cat /etc/libvirt/libvirtd.conf
http://dpaste.com/hold/583874/ (same as host A)
# cat /etc/libvirt/
http://dpaste.com/hold/583873/ (same as host A)
# /etc/init.d/libvirtd start
# cat /var/log/libvirt/libvirtd.log
http://pastebin.com/WnyqubU6
--> Start migration
# cat /var/log/libvirt/libvirtd.log
http://pastebin.com/E45JtvGd (startup log removed)
# virsh list
Id Name State
----------------------------------
1 nd-50f05b3-0 paused
Additional notes
================
* The process seams to deadlock somewhere, CPU usage is near to 0%
* The disk images are available on both hosts at the same location (I'm using a COW2 image based on another COW2 image, both are available)
* The shared FS is mounted through fuse-sshfs
* I just noticed that my clocks are skewed. I will rerun the whole test with a correctly setup ntp server, but I had the same problem last week with perfectly synchronized clocks, so I doubt this will make a difference.
Thanks very much,
Jonathan
13 years, 3 months