[libvirt-users] Fwd: The error for creating a new vm for kvm
by Qian Feng
---------- Forwarded message ----------
From: Qian Feng <qianfeng04161001(a)gmail.com>
Date: Mon, Aug 26, 2013 at 12:59 PM
Subject: Re: [libvirt-users] The error for creating a new vm for kvm
To: Humble Chirammal <hchiramm(a)redhat.com>
I use lsmod | grep kvm, it shows kvm and kvm_intel. It shows:
kvm_intel 39608 0
kvm 247190 1 kvm_intel
BTW, I use virt-manager to create a new virtual machine for qemu/kvm, it
shows no guests are supported for this connection.
I tend to restart the service for libvirtd, service libvirtd restart, it
shows the error:
libvirtd: unrecognized service
libvirtd is in the directory: /usr/sbin/libvirtd
On Mon, Aug 26, 2013 at 1:08 AM, Humble Chirammal <hchiramm(a)redhat.com>wrote:
>
>
>
> ----- Original Message -----
> | From: "Qian Feng" <qianfeng04161001(a)gmail.com>
> | To: libvirt-users(a)redhat.com
> | Sent: Sunday, August 25, 2013 10:20:03 PM
> | Subject: [libvirt-users] The error for creating a new vm for kvm
> |
> | I checked the capabilities. I do not know why the guest is only for vbox.
> | <guest>
> | <os_type>hvm</os_type>
> | <arch name='i686'>
> | <wordsize>32</wordsize>
> | <domain type='vbox'>
> | </domain>
> | </arch>
> | </guest>
> |
> | I want it run qemu-kvm. and when i run virsh define
> | /etc/libvirt/qemu/demo.xml. It shows error: Failed to define domain from
> | /etc/libvirt/qemu/demo.xml
> | error: unknown OS type hvm
>
> Any of the possibility listed here can contribute that error..
> http://humblec.com/error-libvirt-unknown-os-type-hvm/
>
> |
> | Then I use virsh-install --prompt to install kvm guest, it shows error:
> | libvirtError: this function is not supported by the connection driver:
> | virConnectNumOfDefinedStoragePools
> |
> | I really do not know how to do, please help me, thanks.
> |
> | --
> | Have a nice day!
> |
> | Qian
> |
> | _______________________________________________
> | libvirt-users mailing list
> | libvirt-users(a)redhat.com
> | https://www.redhat.com/mailman/listinfo/libvirt-users
>
--
Have a nice day!
Qian
--
Have a nice day!
Qian
11 years, 4 months
[libvirt-users] The error for creating a new vm for kvm
by Qian Feng
I checked the capabilities. I do not know why the guest is only for vbox.
<guest>
<os_type>hvm</os_type>
<arch name='i686'>
<wordsize>32</wordsize>
<domain type='vbox'>
</domain>
</arch>
</guest>
I want it run qemu-kvm. and when i run virsh define
/etc/libvirt/qemu/demo.xml. It shows error: Failed to define domain from
/etc/libvirt/qemu/demo.xml
error: unknown OS type hvm
Then I use virsh-install --prompt to install kvm guest, it shows error:
libvirtError: this function is not supported by the connection driver:
virConnectNumOfDefinedStoragePools
I really do not know how to do, please help me, thanks.
--
Have a nice day!
Qian
11 years, 4 months
Re: [libvirt-users] The error for creating a new vm for kvm
by Saurabh Deochake
> Thanks, but I checked it and It shows I have already installed qemu-kvm.
Please check if kvm and kvm_intel ( for systems with 'vmx' flag) / kvm_amd
(systems with 'svm' flag) are loaded in the system.
On Mon, Aug 26, 2013 at 9:40 AM, Qian Feng <qianfeng04161001(a)gmail.com>wrote:
> Thanks, but I checked it and It shows I have already installed qemu-kvm.
>
>
> On Mon, Aug 26, 2013 at 12:05 AM, Saurabh Deochake <saurabh.d04(a)gmail.com>wrote:
>
>> Hi Qian,
>>
>> I encountered exactly same problem. I found out that I didnot have qemu
>> installed. Please check that you have qemu-kvm installed by running
>> "apt-get install qemu-kvm" on debian!
>>
>> Thanks,
>> Saurabh Deochake
>> NTT DATA OSS Center.
>>
>>
>> On Sun, Aug 25, 2013 at 10:20 PM, Qian Feng <qianfeng04161001(a)gmail.com>wrote:
>>
>>> I checked the capabilities. I do not know why the guest is only for
>>> vbox.
>>> <guest>
>>> <os_type>hvm</os_type>
>>> <arch name='i686'>
>>> <wordsize>32</wordsize>
>>> <domain type='vbox'>
>>> </domain>
>>> </arch>
>>> </guest>
>>>
>>> I want it run qemu-kvm. and when i run virsh define
>>> /etc/libvirt/qemu/demo.xml. It shows error: Failed to define domain from
>>> /etc/libvirt/qemu/demo.xml
>>> error: unknown OS type hvm
>>>
>>> Then I use virsh-install --prompt to install kvm guest, it shows error:
>>> libvirtError: this function is not supported by the connection driver:
>>> virConnectNumOfDefinedStoragePools
>>>
>>> I really do not know how to do, please help me, thanks.
>>>
>>> --
>>> Have a nice day!
>>>
>>> Qian
>>>
>>> _______________________________________________
>>> libvirt-users mailing list
>>> libvirt-users(a)redhat.com
>>> https://www.redhat.com/mailman/listinfo/libvirt-users
>>>
>>
>>
>
>
> --
> Have a nice day!
>
> Qian
>
11 years, 4 months
[libvirt-users] Strange connectivity issues with bridged networking and masquerade
by Kolja Scheffler
Hi all,
I'm currently in the process of building a 2-Node libvirt/KVM Cluster
and ran into some issues regarding the network connectivity of our
virtual machines.
Our setup seemed to work fine, we were able to browse to Google and our
own company website and some others from within the VM. Then we tried
microsoft.com to download some Windows iso images from MS Partner
Network. The page started to load, but only a few elements became
visible - then it sticked to: "Loading data from
microsoft.com" ...forever. A few other examples that do not work are:
* www.opera.com
* www.amazon.com
* www.speedtest.net
All of these pages load without any problem, when I access them from my
laptop or even with Firefox via X-Forwarding launched directly on the
hypervisor system. From within the VMs they just refuse to finish
loading. The only thing those pages have in common, as far as I can see,
is that they heavily utilize CDNs like Amazon Cloudfront or Akamai.
The idea behind our setup is, that all virtual machines communicate on
the 192.168.3.0/24 network. The nodes have a VLAN connection on eth1. To
allow connections between VMs on different hosts, we created the bridge
device br1 with eth1 attached and added the VMs to it. eth0 provides
internet access with xx.xx.220.0 as additional public failover ip.
We added 192.168.3.254 as additional IP to one of the node's br1 device
to use it as the default gateway for the VMs. This IP can be migrated
between the nodes.
Our setup looks like this:
____________
/ \
( Internet )
\____________/
/ \
Node1: | | Node2:
| |
xx.xx.217.8 (eth0) (eth0) xx.xx.217.10
xx.xx.220.0 \
{Masq.}
/
(eth1)----(eth1)
| |
192.168.3.1 [br1 ] [br1 ] 192.168.3.2
192.168.3.254 | |
| |
192.168.3.50 (vnet0) (vnet0) 192.168.3.75
----------
iptables looks like this:
root@vm01:~# iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A FORWARD -d 192.168.3.0/24 -o br1 -m state --state
RELATED,ESTABLISHED
-j ACCEPT
-A FORWARD -s 192.168.3.0/24 -i br1 -j ACCEPT
-A FORWARD -i br1 -o br1 -j ACCEPT
-A FORWARD -i eth0 -o eth0 -j ACCEPT
root@vm01:~# iptables -S -t nat
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
-A POSTROUTING -s 192.168.3.0/24 ! -d 192.168.3.0/24 -j MASQUERADE
-A POSTROUTING ! -s 192.168.3.0/24 -d 192.168.3.0/24 -j MASQUERADE
---------
Some additional information that might be helpful:
root@vm01:~# virsh version
Compiled against library: libvir 0.9.12
Using library: libvir 0.9.12
Using API: QEMU 0.9.12
Running hypervisor: QEMU 1.1.2
---------
root@vm01:~# uname -a
Linux vm01.cluster 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64
GNU/Linux
---------
I don't know if it's really libvirt-related but perhaps someone here has
an idea what to try. Any advice on this is really appreciated, as I am
at my wits' end. Thank you in advance... :)
Kind regards
Kolja Scheffler
11 years, 4 months
[libvirt-users] virsh "cpu-stats" not working !!!
by SHREE DUTH AWASTHI
>
> Hi All,
>
> Can you please guide us in solving this issue.
>
> Version used : libvirt-1.0.6
> # rpm -qa | egrep "libvirt|qemu"
> qemu-kvm-0.14.1-1_WR4.3.x86_64_XXX.x86_64
> libvirt-1.0.6-1_WR4.3.x86_64_XXX.2.x86_64
>
> Problem :
>
> # virsh cpu-stats CLA-0
> error: Failed to retrieve CPU statistics for domain 'CLA-0'
> *error: internal error error accessing cgroup cpuacct for vcpu*
>
> Related info :
>
> # cat /proc/cgroups
> #subsys_name hierarchy num_cgroups enabled
> cpuset 3 4 1
> ns 0 1 1
> cpu 1 6 1
> cpuacct 7 3 1
> memory 2 3 1
> freezer 0 1 1
> net_cls 0 1 1
> blkio 0 1 1
>
> # cat /proc/mounts | grep cpu
> cpu /dev/cgroup_cpu cgroup rw,relatime,cpu 0 0
> cpuset /dev/cgroup_cpuset cgroup rw,relatime,cpuset 0 0
> cpuacct /dev/cgroup_cpuacct cgroup rw,relatime,cpuacct 0 0
>
> # cat /proc/self/cgroup
> 7:cpuacct:/
> 3:cpuset:/
> 2:memory:/
> 1:cpu:/
>
> virsh # vcpucount CLA-0
> maximum config 3
> maximum live 3
> current config 3
> current live 3
>
> virsh # vcpuinfo CLA-0
> VCPU: 0
> CPU: 0
> State: running
> CPU time: 5.7s
> CPU Affinity: yyyyyyyy
>
> virsh # vcpupin CLA-0 --current
> VCPU: CPU Affinity
> ----------------------------------
> 0: 0-7
> 1: 0-7
> 2: 0-7
>
> # cat /dev/cgroup_cpuacct/cpuacct.usage_percpu
> 532996776861 117928641102 125174572624 167825543709 155234053284
> 97350309867 122372010702 110640812251
> # cat /dev/cgroup_cpuacct/cpuacct.usage
> 1431288376064
> # cat /dev/cgroup_cpuacct/cpuacct.stat
> user 12148
> system 81469
>
> # cat /dev/cgroup_cpuacct/*machine*/cpuacct.usage_percpu
> 0 0 0 0 0 0 0 0
> # cat /dev/cgroup_cpuacct/*machine/*cpuacct.usage
> 0
>
> # chkconfig --list | grep cg
> cgroups_mount 0:off 1:on 2:on 3:on 4:on 5:on 6:off
>
> We have also found that there is no "*cgroup*" directory created under *
> "/sys/fs/".* We have tried mounting the same manually using the below
> commands but we were not successful.
>
> mkdir -p /dev/cgroup_cpuacct
> mount -t cgroup -o cpuacct cpuacct /dev/cgroup_cpuacct
>
> (or)
>
> mkdir -p /sys/fs/cgroup
> mount -t cgroup -o cgroup cgroup /sys/fs/cgroup
>
>
> Please find the the domain info used for the creation of VM in the
> attachment. Please let us know, how to proceed futher.
>
> Your inputs would be of great help to us.
>
> Thanks and Regards,
> Shree Duth Awasthi.
>
11 years, 4 months
[libvirt-users] Information needed regarding the libvirt version libvirt-1.0.6-1
by arun abhinay
Hi,
We have upgraded the libvirt version from libvirt-1.0.5 to libvirt-1.0.6-1
on our linux machine. After this upgrade "virsh cpu-stats <domain>" command
is not working on our HardWare.
*virsh # cpu-stats test
error: Failed to retrieve CPU statistics for domain 'test'
error: internal error error accessing cgroup cpuacct for vcpu*
**
*# cat /proc/cgroups
#subsys_name hierarchy num_cgroups enabled
cpuset 3 4 1
ns 0 1 1
cpu 1 6 1
cpuacct 7 3 1
memory 2 3 1
freezer 0 1 1
net_cls 0 1 1
blkio 0 1 1
*
*# chkconfig --list | grep cg
cgroups_mount 0:off 1:on 2:on 3:on 4:on 5:on 6:off*
We have also found that there is no "cgroup" directory created by
kenel under "/sys/fs/". We suspect that the 'cgroup' controllers are not
mounted properly and hence the issue is observed. While using the
libvirt-1.0.5 version below mentioned mount commands were sufficient to
mount cgroup controllers
*mkdir -p /dev/cgroup_cpuacct
mount -t cgroup -o cpuacct cpuacct /dev/cgroup_cpuacct*
As cgroups hieracrhy inside libvirtd has changed in libvirt-1.0.6-1, we
feel that the above commands are now not sufficient. We feel we have to do
some more steps get the 'cgroups' mounted properly on our hardware.
Since we are new to libvirt and can you please help us by providing some
pointers to fix the above issue and get cpu-stats working on our HardWare.
Since we have to fix this on top priority, can you please reply as soon as
possible. Please let us know if you need any further information from our
side.
Thanks in advance.
BR
Abhinay
11 years, 4 months
[libvirt-users] the error for define the xml
by Qian Feng
Hi, everyone, I have already install libvirt. I want to use it on qemu. I
have set up qemu too. I do not know how to let libvirt manage the vms for
qemu. What i did ist that:
1) create the xml under /etc/libvirt/qemu/demo.xml
2) # virsh define /etc/libvirt/qemu/demo.xml
There is error as following:
error: Failed to define domain from /etc/libvirt/qemu/demo.xml
error: internal error No guest options available for arch 'x86_64'
Could everyone help me? Thank you very much.
The demo.xml is following:
<domain type='kvm'>
<name>test</name> //\u865a\u62df\u673a\u540d\u79f0
<memory>1048576</memory>
//\u6700\u5927\u5185\u5b58\uff0c\u5355\u4f4dk
<currentMemory>1048576</currentMemory>
//\u53ef\u7528\u5185\u5b58\uff0c\u5355\u4f4dk
<vcpu>8</vcpu> //\u865a\u62dfcpu\u4e2a\u6570
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='cdrom'/> //\u5149\u76d8\u542f\u52a8
</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='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source
file='/var/lib/libvirt/images/winxpsp3-regression.qcow2'/>
//\u76ee\u7684\u955c\u50cf\u8def\u5f84
<target dev='hda' bus='ide'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/var/lib/libvirt/images/ubuntu.iso'/>
//\u5149\u76d8\u955c\u50cf\u8def\u5f84
<target dev='hdb' bus='ide'/>
</disk>
<interface type='bridge'>
//\u865a\u62df\u673a\u7f51\u7edc\u8fde\u63a5\u65b9\u5f0f
<source bridge='kvmbr0'/>
//\u5f53\u524d\u4e3b\u673a\u7f51\u6865\u7684\u540d\u79f0
<mac address="00:16:3e:5d:aa:a8"/>
//\u4e3a\u865a\u62df\u673a\u5206\u914dmac\u5730\u5740\uff0c\u52a1\u5fc5\u552f\u4e00\uff0c\u5426\u5219dhcp\u83b7\u5f97\u540c\u6837ip,\u5f15\u8d77\u51b2\u7a81
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' listen =
'0.0.0.0'
keymap='en-us'/>//vnc\u65b9\u5f0f\u767b\u5f55\uff0c\u7aef\u53e3\u53f7\u81ea\u52a8\u5206\u914d\uff0c\u81ea\u52a8\u52a01\uff0c\u53ef\u4ee5\u901a\u8fc7virsh
vncdisplay\u6765\u67e5\u8be2
</devices>
</domain>
--
Have a nice day!
Qian
11 years, 4 months
[libvirt-users] virConnectDomainEventRegisterAny problem
by Alexandr
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
good day. i trying to make callback function for
VIR_DOMAIN_EVENT_ID_LIFECYCLE, i have successfully registering callback,
but it never called, i need to know when domain started, stopped or
crashed, i have write following code
static int domain_event_handler(virConnectPtr conn, virDomainPtr dom,
int event, int detail, void * opaque)
{
switch(event)
{
}
return 0;
}
.....
int callback =
virConnectDomainEventRegisterAny(libvirt_connection, NULL,
VIR_DOMAIN_EVENT_ID_LIFECYCLE,
VIR_DOMAIN_EVENT_CALLBACK(domain_event_handler), NULL, NULL);
if(callback == -1)
{
std::cout<<"Error: failed to register domain event handle
callback\n";
return -1;
}
.....
but "domain_event_handler" is never called, what is wrong here ?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJSE/XIAAoJEH3ap8veG8EHNO4H/iu8FLlL2fXMrWC6Z75fgoL+
1LKH504VD/oZ4UUyEMURdywNOp4cHmXQOiCbgN3ardFMjhFQ/hwbDHgBXLuQGsr0
yXyUoX8ft3sEojTJS0ys9J+vkFcqm/eOykCeAKRPHQPAeUivKQpRhx3+6mXDJ3z8
OyTGqD5GFdhgktz/4IbqeOp4PKI55QXVrrsB2414hPykBq6xsRqbtQC9QZ/Df2SP
kHGAymEYK+i242xJYZSxTy5BLH+JNa1yzJNE+XoAtaMz2ypRg3ycMipo0io+8VMy
KJWRxmq3O/ZKrqGsI++D7ugAkkLCLUbpyC35fXK7GXAEnxk/uTkQInU7F26FdJs=
=32hk
-----END PGP SIGNATURE-----
11 years, 4 months
[libvirt-users] Creating a snapshot from a KVM VM fails
by Tobias Brunner
Hi,
I'm trying to create a snapshot from a KVM VM:
# virsh snapshot-create one-5
error: unsupported configuration: internal checkpoints require at least
one disk to be selected for snapshot
How can I debug this error message and what does it mean?
Some system information:
* Ubuntu 13.04 64Bit
* virsh --version: 1.0.2
* The XML of the VM is below
Thanks for all help...
Cheers,
Tobias
<domain type='kvm' id='4'>
<name>one-5</name>
<uuid>cff38c6a-2996-7709-c4f4-0ed826c2fb02</uuid>
<memory unit='KiB'>524288</memory>
<currentMemory unit='KiB'>524288</currentMemory>
<vcpu placement='static'>1</vcpu>
<cputune>
<shares>1024</shares>
</cputune>
<os>
<type arch='x86_64' machine='pc-i440fx-1.4'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source protocol='rbd' name='one/one-5-5-0'/>
<target dev='hda' bus='ide'/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/one//datastores/0/5/disk.1'/>
<target dev='hdb' bus='ide'/>
<readonly/>
<alias name='ide0-0-1'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<controller type='ide' index='0'>
<alias name='ide0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/>
</controller>
<controller type='usb' index='0'>
<alias name='usb0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x2'/>
</controller>
<interface type='bridge'>
<mac address='02:00:c0:a8:31:97'/>
<source bridge='vmbr0'/>
<virtualport type='openvswitch'>
<parameters interfaceid='6e492227-cd8b-f472-9f3d-1161ddf9ecfc'/>
</virtualport>
<target dev='vnet0'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5905' autoport='no' listen='0.0.0.0'>
<listen type='address' address='0.0.0.0'/>
</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='dynamic' model='apparmor' relabel='yes'>
<label>libvirt-cff38c6a-2996-7709-c4f4-0ed826c2fb02</label>
<imagelabel>libvirt-cff38c6a-2996-7709-c4f4-0ed826c2fb02</imagelabel>
</seclabel>
</domain>
11 years, 4 months