[libvirt-users] some problem with snapshot by libvirt
by xingxing gao
Hi,all,i am using libvirt to manage my vm,in these days i am testing
the libvirt snapshot ,but meet some problem:
the snapshot was created from this command:
snapshot-create-as win7 --disk-only --diskspec
vda,snapshot=external --diskspec hda,snapshot=no
but when i tried to revert from the snapshot which created from the
above command ,i got error below:
virsh # snapshot-revert win7 1338041515 --force
error: unsupported configuration: revert to external disk snapshot not
supported yet
version:
virsh # version
Compiled against library: libvir 0.9.4
Using library: libvir 0.9.4
Using API: QEMU 0.9.4
Running hypervisor: QEMU 1.0.93
9 years, 11 months
[libvirt-users] cgroup error starting domains
by Matteo Bernardini
Hi,
I've got a small problem using libvirt-1.0.5.1 (with the latest patch in
the v1.0.5-maint branch on git added).
I'm using slackware64-14.0 but the situation is exactly the same described
on a debian bug
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707201
When trying to start a domain I got
error: Failed to start domain debian-wheezy-xfce
error: Unable to initialize /machine cgroup: Invalid argument
with this in libvirtd.log
virCgroupDetect:373 : Failed to detect mounts for /machine
qemuInitCgroup:425 : Unable to initialize /machine cgroup: Invalid argument
and the error goes away if I unmount /sys/fs/cgroup.
Reverting to 1.0.4 fixes this, but this exposes another thing that I report
even if I'm not sure it's an error: if I create a domain with 1.0.5.1 (I
use the latest virt-manager to do this), in the xml of the domain there's a
line that doesn't seem to have the close tag
<controller type='pci' index='0' model='pci-root'/>
If I revert to 1.0.4 the domain with this line in the xml doesn't even get
listed between the available domains and I got this in libvirtd.log
virDomainControllerDefParseXML:4838 : internal error Unknown controller
type 'pci'
deleting the interested line make it available again.
Please let me know if you need further informations on the matters.
Matteo
11 years, 4 months
[libvirt-users] libvirt tls error
by yue
centos6.3,libvirt 0.9.10.
[root@ovirtdev private]# virsh -c qemu+tls://ovirtdev.localhost/system list
2013-04-22 03:37:09.362+0000: 9898: info : libvirt version: 0.9.10, package: 21.el6_3.8 (CentOS BuildSystem <http://bugs.centos.org>, 2013-01-28-19:24:16, c6b10.bsys.dev.centos.org)
2013-04-22 03:37:09.362+0000: 9898: warning : virNetClientIncomingEvent:1665 : Something went wrong during async message processing
error: Unable to read TLS confirmation: Input/output error
error: failed to connect to the hypervisor
thanks
11 years, 5 months
[libvirt-users] About the change of a VM's vcpu count in runtime?
by Dennis Chen
Hi,
We know that there is a command "setvcpus" in virsh used to "change
number of virtual CPUs", now we just have the need to change vcpu count
dynamically for a running VM, so I tried this command (the vcpu count is
2 in the VM xml file), below is the result:
virsh # setvcpus 3 --count 4
error: invalid argument: requested vcpus is greater than max allowable
vcpus for the domain: 4 > 2
virsh # setvcpus 3 --count 1
error: Operation not supported: qemu didn't unplug the vCPUs properly
So I tried another way: log into the running VM, and "echo 0 >
/sys/devices/system/cpu/cpu1/online", after that I can find only one
processor in the vm through '/proc/cpuinfo', but in virsh, the vcpuinfo
still shows:
virsh # vcpuinfo 3
VCPU: 0
CPU: 0
State: running
CPU time: 13.5s
CPU Affinity: yyyy
VCPU: 1
CPU: 1
State: running
CPU time: 6.9s
CPU Affinity: yyyy
So the question is: is there any method I can't find yet to change the
vcpu count of a running vm dynamically?
BRs,
Dennis
11 years, 5 months
[libvirt-users] Using source installed open vswitch with libvirt(or virsh).
by 황진환
P{font-size:10pt; line-height:16; margin-left:0; margin-top:0;
margin-right:0; margin-bottom:0; font-family:gulim;}
(English is not my first language Sorry for my poor English )
OS :
Linux nc233 2632-220171el6x86_64 #1 SMP Tue May 15 17:16:46 CDT 2012 x86_64
x86_64 x86_64 GNU/Linux
CentOS release 63 (Final)
open vswitch : 11190
virsh : 100
ibvirtd (libvirt) : 100
I have tried to see what the virsh setting can do to open vswitch(ovs)
until now I had installed open vswitch from a source, not by using rpm or
rpm build of the source (I had tried to do 'ovs rpm build' described
at INSTALLRHEL included in ovs, But i failed to do it)
What i tried is
this(http://blogscottloweorg/2012/11/07/using-vlans-with-ovs-and-libvirt/)
I installed and started up ovs and it looked like properly working I
could create and delete bridges and ports with 'ovs-vsctl'
1 what i created before running 'virsh net-define'
--------------------------------------------
# ovs-vsctl show
76d9d6aa-cfce-4868-bf99-7d16bcfe38eb
Bridge "br0"
Port "br0"
Interface "br0"
type: internal
Port "eth1"
Interface "eth1"
--------------------------------------------
2 And then runned 'virsh net-define netxml'
'netxml' i used
--------------------------------------------
<network>
<name>ovs-network</name>
<forward mode='bridge'/>
<bridge name='br0'/>
<virtualport type='openvswitch'/>
<portgroup name='vlan-01'
default='yes'>
</portgroup>
<portgroup name='vlan-02'>
<vlan>
<tag id='2'/>
</vlan>
</portgroup>
<portgroup name='vlan-03'>
<vlan>
<tag id='3'/>
</vlan>
</portgroup>
<portgroup name='vlan-all'>
<vlan trunk='yes'>
<tag id='2'/>
<tag id='3'/>
</vlan>
</portgroup>
</network>
--------------------------------------------
3 vmxml which was used for 'virsh define vmxml'
--------------------------------------------
<domain type="kvm">
<name>vm</name>
<memory>1048576</memory>
<vcpu>1</vcpu>
<os>
<type arch="x86_64"
machine="pc">hvm</type>
<boot dev="hd"/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock mode="localtime">
<timer name="rtc"
tickpolicy="catchup" wallclock="guest"/>
<timer name="hpet"
present="no"/>
</clock>
<devices>
<!--<emulator>/usr/libexec/qemu-kvm</emulator>-->
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<!--<disk device="disk"
type="block">-->
<disk device="disk"
type="file">
<!--<driver
cache="none" name="qemu"
type="qcow2"/>-->
<driver
cache="writeback" io="threads" name="qemu"
type="qcow2"/>
<source
file="/root/img/vmimg"/>
<target bus="virtio"
dev="vda"/>
</disk>
<interface type="network">
<mac
address="d2:0d:45:a3:92:ea"/>
<source
network='ovs-network' portgroup='vlan-02'/>
</interface>
<console type="pty">
<target
port="0"/>
</console>
<input bus="usb"
type="tablet"/>
<input bus="ps2"
type="mouse"/>
<graphics autoport="yes"
keymap="en-us" listen="0000"
port="-1"
type="vnc"/>
</devices>
</domain>
--------------------------------------------
4 runned 'virsh start vm', and failed
(messages had not been printed in english at my server, so i googled and
tried to choose simillar sentecne which were shown in libvirt related
threads please consider it)
-----------------------------------------
#virsh start vm
error : Failled to start domain vm
error : Unable to add port vnet0 to OVS bridge br0
-----------------------------------------
At that time, /var/log/libvirt/libvirtdlog
(these are also translated)
-----------------------------------------
2013-05-23 04:32:14588+0000: 11455: error : virNetDevGetMTU:343 : Cannot
get interface MTU on 'ovsbr0': No such device
2013-05-23 04:32:14678+0000: 11455: error : virExecWithHook:419 : Cannot
find 'ovs-vsctl' in path: No such file or directory
2013-05-23 04:32:14679+0000: 11455: error :
virNetDevOpenvswitchRemovePort:173 : Unable to delete port (null) from OVS:
command does not allowed
-----------------------------------------
I think above errors comes from install location of OVS as written in
libvirtdlog How can i solve that by hands? (I'm also trying to solve the
problem by installing ovs, using rpm build) There are not only fedora or
ubuntu linux, so the solution may exist Are there a way to get libvirt to
recognize ovs-vsctl? (As i mentioned above, ovs-vsctl and ovs are properly
working)
Thank you for reading
11 years, 5 months
[libvirt-users] /dev/tty only on a new container
by Sebastien Douche
Hi folks :),
I migrated the host from the Debian Squeeze to Ubuntu 12.10. Old
containers work but I can't use the ssh command, /dev/tty is missing.
On a new container, /dev/tty is here. The libvirt configuration is the
same.
Any ideas?
Thanks.
--
Sebastien Douche <sdouche(a)gmail.com>
Twitter: @sdouche / G+: +sdouche
11 years, 5 months
[libvirt-users] iSCSI-based Storage Pool and virsh attach-device problems/questions
by Ken Stanley
Hello all,
I am attempting to use the 'virsh attach-device' command to add storage to a guest from a pre-defined iSCSI-based storage pool. My desire is to attach a volume from the storage pool and have the storage pool recognize that the volume is in use and either flag it as such, or remove it from the pool so that subsequent queries to the pool will only return available storage volumes. The end goal is to have an automated system use the libvirt API assign storage volumes to new and existing guests on demand. I guess my first question is: Is this possible? Does libvirt give any indication that a storage volume within a pool is available or already in use? I would prefer to avoid having to externally manage this sort of thing if I can.
I am using Debian Wheezy for the Dom0 and iSCSI SAN (identical setup), along with libvirt 1.0.5-2 from the experimental branch. I have Xen 4.1.4-3+deb7u1 installed, along with its accompanying packages. All of this is currently running under VirtualBox, but that is only for my testing/development purposes. I am able to get the Dom0 to recognize the SAN, and add the storage pool. When I attempt to use 'virsh attach-device', I get the following error: "error: Failed to attach device from device.xml \ error: POST operation failed: xend_post: error from xen daemon: (xend.err 'Block device must have physical details specified')".
I have tracked this specific error down to the Xen python blkif.py, located under /usr/lib/xen-4.1/lib/python/xen/xend/server/blkif.py for my installation. After reading through the source, I found that under the getDeviceDetails def there is a non-existent configuration called 'uname' that is undefined. Looking deeper into the code, under the getDeviceConfiguration def, I see that the code is trying to read from the backend configuration, and expecting to see a 'type' and 'params' to use for setting the aforementioned 'uname' value. This is where I hit the wall, so to speak.
After reading through the XML documentation for libvirt (http://libvirt.org/formatdomain.html#elementsDisks), I see nothing that I can further add to my XML description that would make sense for adding a volume from a storage pool. For kicks and giggles, I've tried using the disk type 'carom', which gets me past the failing python condition, but then gives me the following error when trying to do anything – in this case, just a simple dumpxml on the domain – with the guest through virsh: "error: internal error domain information incomplete, vbd has no src". Subsequently, if I try to call 'detach-device', I get the same error, leaving me with no other alternative but to destroy/undefine, and recreate the domain using define/start.
I am able to ssh into the guest after the call to 'attach-device', but no device is present nor registered (as seen with dmesg). If I reboot the guest libvirt reports that the guest is "idle", but I cannot console into it due to the error mentioned in the previous paragraph. I can, however, use 'xm console <guest>' and gain access that way.
Any and all advice that you can give would be greatly appreciated. I will do everything that I can to assist as far as trying all suggestions and following directions. :)
Storage Pool XML:
<pool type="iscsi">
<name>virtimages</name>
<source>
<host name="hv02.kstanley.vm"/>
<device path="iqn.2013-05.vm.kstanley.hv02:vdisks"/>
</source>
<target>
<path>/dev/disk/by-path</path>
</target>
</pool>
Device XML:
<disk type="volume" device="disk">
<source pool="virtimages" volume="unit:0:0:1"/>
<target dev="xvdb" bus="virtio"/>
</disk>
Regards,
Ken Stanley
11 years, 5 months
[libvirt-users] Does Set Block IO tune take effect in the same session.
by vikrant verma
Hello All,
I am using virDomainSetBlockIoTune() API to set the IO tune parameter for a
running guest VM.
I observed that after setting the value succesfully i ned to Shutdown and
start the VM inorder to take the set value in effect.
Is there any way with which these values come in effect in the same session
of the VM without Shutting down and starting the VM.
Please help
regards,
Vikrant
11 years, 5 months
[libvirt-users] Enable bios useserial=yes from command line
by Knightmare
Hi Guys,
I'm currently learning KVM and have set up an Ubuntu 12.04.2 VM running KVM.
I am using the following command to provision a VM:
virt-install --connect qemu:///system --ram "$ramsize" -n "$vmname"
--boot network,hd,menu=on --os-variant="$variant" --disk
path=/var/lib/libvirt/images/"$vmname".qcow2,device=disk,bus=virtio,format=qcow2
--mac= --cpu host --vcpus="$numcpus" --graphics none --noautoconsole
--import
But cannot seem to find a way to enable bios useserial=yes without issuing
a virsh edit $vmname
I've tried --extraargs= but that appears to be for kernel command lines,
which is not what I want to achieve here. I'm looking for a way to enable
serial BIOS from the point the VM is created.
The current solution I am using is to do virsh destroy $vmname ; virsh edit
$vm_name ; virsh start $vm_name which is not great, but gets the job done.
My versions are as follows:
Ubuntu 12.04.2 x86_64 kernel 3.2.0-39-generic
libvirt 0.9.8-2ubuntu17.8
qemu-kvm 1.0+noroms-0ubuntu14.8
Thanks,
Robert
11 years, 5 months