[libvirt-users] Problem about Disk Dize of Destination and Source File after Do Blockcopy
by shyu
Hi There,
There is a case I met about the destination file's disk size after do
blockcopy
Details as below:
Env:
# rpm -q libvirt qemu-kvm-rhev
libvirt-1.1.1-29.el7.x86_64
qemu-kvm-rhev-1.5.3-60.el7ev_0.2.x86_64
1. Check source file
# qemu-img info /var/lib/libvirt/images/rhel6.img
image: /var/lib/libvirt/images/rhel6.img
file format: qcow2
virtual size: 5.0G (5368709120 bytes)
disk size: 1.2G
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
# ll -lash /var/lib/libvirt/images/rhel6.img
1.2G -rw-r--r--. 1 qemu qemu 1.2G Jul 22 11:04
/var/lib/libvirt/images/rhel6.img
Here: Disk Size is "1.2G"
2. Do blockcopy
# virsh domblklist rhel6
Target Source
------------------------------------------------
vda /var/lib/libvirt/images/rhel6.img
# time virsh blockcopy rhel6 vda /var/lib/libvirt/images/copy.img --wait
--verbose
Block Copy: [100 %]
Now in mirroring phase
real 0m21.285s
user 0m0.038s
sys 0m0.018s
3. Check destination file's disk size
# qemu-img info /var/lib/libvirt/images/copy.img
image: /var/lib/libvirt/images/copy.img
file format: qcow2
virtual size: 5.0G (5368709120 bytes)
disk size: 2.0G
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false
# ll -lash /var/lib/libvirt/images/copy.img
2.1G -rw-------. 1 qemu qemu 1.2G Jul 22 11:10
/var/lib/libvirt/images/copy.img
Here: Disk Size is "2.0G"
So my question is why the "disk size" is different between source file
and destination file ? (Actually, the destination always change after I
try many times, sometime it is same size as source, sometimes it is
lager than source.)
4. Do --pivot
After --pivot, the disk size is same size as after blockcopy
--
Regards
shyu
10 years, 4 months
[libvirt-users] Migration b/w nodes with identical cpu featureset failing
by Andrey Korolyov
Hello,
on libvirt 1.2.4 and two nodes with E5-2620 and E5-2650, I am not able
to migrate vm with cpu=host-passthrough with
error: internal error: can't get vmdef
the only difference between sender and receiver` cpus is the frequency
and identification string. Is this behaviour expected?
10 years, 4 months
[libvirt-users] vhost-net requested but could not be initialized
by Asadullah Hussain
I am using a custom qemu to launch a vhost enabled VM. The qemu doesn't use
the default "/dev/vhost-net" directory as character device. Due to this I
am getting the error:
qemu-system-x86_64: -netdev
type=tap,id=net1,script=no,downscript=no,ifname=port3,vhost=on: vhost-net
requested but could not be initialized
Is there a way to tell libvirt to avoid using the default /dev/vhost-net
file?
I have tried using the pass-through arguments but libvirt still processes
the command and throws the error.
PS: I can successfully create a vhost VM using qemu command-line, so this
is a libvirt issue.
--
Cheers,
Asadullah Hussain
10 years, 4 months
[libvirt-users] how to read the libvirt log file
by Yuanzhen Gu
Hi folks,
I need to trace how libvirt talk with qemu monitor, log everything when
give command, but does anyone know what the format, and how to read the log
file?
for example:
2014-07-22 17:25:22.984+0000: 18571: debug : qemuMonitorIOProcess:356 :
QEMU_MONITOR_IO_PROCESS: mon=0x7f733c000a40 buf={"timestamp": {"seconds":
1406049922, "microseconds": 983916}, "event": "STOP"}
where to find the qemuMonitorIOProcess function, and what :356 means?
Thanks very much!
Best,
Yuanzhen
10 years, 4 months
Re: [libvirt-users] i686 guest failing to start at 50a2c45 (and earlier versions of 2.1-rc) with pc-i440fx-2.1
by Andrey Korolyov
On Fri, Jul 18, 2014 at 11:58 PM, Andrey Korolyov <andrey(a)xdel.ru> wrote:
> Hello,
>
> 2.0 model works fine
>
> 2.1 crashes with following:
>
> /tmp/buildd/qemu-2.0.92+rev1/hw/i386/smbios.c:825: smbios_get_tables:
> Assertion `smbios_smp_sockets >= 1' failed
>
> Not sure if bisect will help much, but the commit which introduced
> this platform works well (3458b2b0).
>
> arg set follows:
>
> /usr/bin/kvm -name vm28456 -S -machine pc-i440fx-2.1,accel=kvm,usb=off
> -cpu qemu32 -m 256 -realtime mlock=off -smp
> 1,sockets=1,cores=12,threads=12 -numa node,nodeid=0,cpus=0,mem=256
> -uuid 46623576-d00b-42b4-b1cc-c5c780a8b5b3 -nographic -no-user-config
> -nodefaults -chardev
> socket,id=charmonitor,path=/var/lib/libvirt/qemu/vm28456.monitor,server,nowait
> -mon chardev=charmonitor,id=monitor,mode=control -rtc
> base=utc,clock=vm,driftfix=slew -global
> kvm-pit.lost_tick_policy=discard -no-shutdown -boot strict=on -device
> piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device
> virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive
> file=rbd:dev-rack2/vm28456-YoP:id=qemukvm:key=XXXXXX:auth_supported=cephx\;none:mon_host=10.6.0.1\:6789\;10.6.0.3\:6789\;10.6.0.4\:6789,if=none,id=drive-virtio-disk0,format=raw,cache=writeback
> -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
> -netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24 -device
> virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:10:03:a8,bus=pci.0,addr=0x3
> -netdev tap,fd=25,id=hostnet1,vhost=on,vhostfd=26 -device
> virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:10:03:a9,bus=pci.0,addr=0x4
> -chardev pty,id=charserial0 -device
> isa-serial,chardev=charserial0,id=serial0 -chardev
> socket,id=charchannel0,path=/var/lib/libvirt/qemu/vm28456.sock,server,nowait
> -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.1
Nevermind, that was a result from wrong config generation (1 vcpu and
12 topology cores in the config, probably libvirt folks may be
interested for checking this because libvirt allows such configuration
for now).
10 years, 4 months
[libvirt-users] starting lxcs from within a vm using libvirt
by Robb Walker
my goal for testing/simulations is to be able to run a vm on my desktop and within that vm run linux containers
currently I can start an ubuntu trusty vm using libvirt as my broker to qemu or qemu-system-x86_64 directly and start a saucy-based lxc using lxc-tools. I invoke lxc-start -n name -f configfile and within a few seconds I'm logged into my saucy based lxc. I can't start the lxc thru libvirt i.e. virsh -c lxc:/// start domain
Again, if I try to use libvirt to "install" and start the lxc from within the vm, no joy. Results below:
>>>
root@vullbvrt69:~# virt-install --connect lxc:/// -n vulslxc01 -r 512 --filesystem /qemu_lxc/ss_140521/,/ --serial pty --serial pty
Starting install...
Creating domain... | 0 B 00:00
error: failed to get domain '22542'
error: Domain not found: No domain with matching name '22542'
Domain creation completed. You can restart your domain by running:
root@vullbvrt69:~# virsh -c lxc:/// list --all
Id Name State
----------------------------------------------------
- vulslxc01 shut off
root@vullbvrt69:~# virsh -c lxc:/// start vulslxc01
Domain vulslxc01 started
root@vullbvrt69:~# virsh -c lxc:/// console vulslxc01 --devname serial1
error: The domain is not running
root@vullbvrt69:~# virsh -c lxc:/// list --all
Id Name State
----------------------------------------------------
- vulslxc01 shut off
>>>
My physical desktop is running precise 12.04.4
----qemu-kvm 1.0+noroms-0ubuntu14.15
----libvirt-bin 0.9.8-2ubuntu17.19
----lxc 0.7.5-3ubuntu69
This physical machine launches the trusty vm from which in turn I'm trying to run lxcs via libvirt
Trusty vm
----libvirt-bin 1.2.2-0ubuntu13.1.1
----lxc 1.0.4-0ubuntu0.1
The saucy lxc was not created using lxc templates just a normal minbase debootstrap.
I have run virt-install with -d. Nothing obvious jumps out except the above Domain not found
virsh -c lxc:/// -d4 -l debug.out start domain_name dumps nothing into debug.out
thx in advance for any and all help and apolgies in advance if I've dropped critical info to help sort this out
This e-mail and any attachments may contain information that is confidential and proprietary and otherwise protected from disclosure. If you are not the intended recipient of this e-mail, do not read, duplicate or redistribute it by any means. Please immediately delete it and any attachments and notify the sender that you have received it in error. Unintended recipients are prohibited from taking action on the basis of information in this e-mail or any attachments. The DRW Companies make no representations that this e-mail or any attachments are free of computer viruses or other defects.
10 years, 4 months
Re: [libvirt-users] LVM Volume Creation
by Ravi Samji
Hi All,
I'm having issue with creating LVM Volume via libvirt.
We are running libvirtd 1.2 with KVM.
We are creating Volume Group (VG01) outside of libvirt and defining a storage pool for it.
Here is the StoragePool XML for the Volume Group created outside libvirt.
<pool type="logical">
<name>VG01</name>
<target>
<path>/dev/VG01</path>
</target>
</pool>
We are creating Logical Volume (ub_test01.img) through libvirt in the Volume Group (VG01)
Here is the XML to create Storage Volume in LVM Storage Pool VG01.
<volume type="block">
<name>ub_test01.img</name>
<allocation>0</allocation>
<capacity unit="M">1</capacity>
<target>
<format type="lvm2" />
</target>
</volume>
When I create the Logical Volume from libvirt using above XML and run lvs command to list logical volumes, this is what I see.
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
--------------- ------- ------- ------- ----------------------- ------- ------- ------- ------- -------
foo VG01 -wi-a- 1.00g
ub_test01.img VG01 swi-a- 4.00m [ub_test01.img_vorigin] 0.20
root ops-02 -wi-ao 227.08g
swap_1 ops-02 -wi-ao 5.75g
As you see, ub_test01.img shows that it has an Origin indicating that it was created as a snapshot, but, that Origin doesn't exist and wasn't specified.
I'd appreciate if you anyone can help me understand what is going on and/or describe how to make libvirt create logical volumes not as a snapshot.
I'm happy to enable debugging to see what command libvirt is running to create the volume if someone case describe how to enable debugging.
Regards,
Ravi
Message sent via Atmail Open - http://atmail.org/
10 years, 4 months
[libvirt-users] LVM Volume Creation
by Ravi Samji
Hi All,
I'm having issue with creating LVM volume via libvirt.
XML of LVM StoragePool is:
VG01
/dev/VG01
(existing vg)
XML of create volume in lvm pool is:
ub_test01.img
0
1
When I create the volume with above XML defn, lvs command to list logical
volume shows a value in the origin column indicating it was created as
snapshot.. the strange thing is that the origin volume does not exist..!
something strange going on. You can see the lvs output here See
http://pastebin.com/prk6VqwD [1]
I'd appreciate if you anyone can help me understand what is going on and/or
describe how to make libvirt create logical volumes not as a snapshot.
We are running libvirtd 1.2 with KVM.
Regards,
Ravi
-------------------------
Message sent via Atmail Open - http://atmail.org/
Links:
------
[1] http://pastebin.com/prk6VqwD
10 years, 4 months
[libvirt-users] configuring a lxc guest to run 32bits from a 64bits host under libvirt-lxc
by Thierry Parmentelat
Hi there
I have a couple of newbie questions concerning running a 32bits guest in a 64bits host using libvirt - lxc; I’m running libvirt-1.2.5 on fedora18 and fedora20
(a) is this supported at all, and
(b) if so how do I configure this for a given guest ?
guessing from the mere existence of http://www.redhat.com/archives/libvir-list/2011-February/msg01040.html
I would think the answer to (a) is yes; anybody cares to confirm ?
As far as (b), I would expect some flag could be set in the XML description of my guest so that libvirt can perform the proper syscall to personality() at the right point in the process hierarchy..
However I have not been able to spot this in the documentation so far, but OTOH the page on the XML configuration here
http://libvirt.org/format.html
appears to be empty so this might be a temporary hiccup ?
in any case, any hint or insight on this matter would be much appreciated — Thierry
10 years, 4 months