[libvirt-users] kvm/libvirt can't use vmdk files? qemu: 'vmdk' invalid format
by Frank Hauptle
Hi all,
I have a RHEL6.1 qemu-kvm hypervisor running a raw image that I need
for various reasons to convert to vmdk.
I used this process:
qemu-img convert server3.img -O vmdk server3.vmdk
Then I edited the XML file (/etc/libvirt/qemu/server3.xml) like so:
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='vmdk'/>
<source file='/raid5/images/guilder3.vmdk'/>
<target dev='hda' bus='ide'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
Which basically means that I changed raw to vmdk in this line:
<driver name='qemu' type='vmdk'/>
but when I try to start the VM, I get this:
Error starting domain: internal error Process exited while reading
console log output: char device redirected to /dev/pts/5
qemu: 'vmdk' invalid format
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 45, in
cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/engine.py", line 959, in
asyncfunc
vm.startup()
File "/usr/share/virt-manager/virtManager/domain.py", line 1128, in
startup
self._backend.create()
File "/usr/lib64/python2.7/site-packages/libvirt.py", line 330, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: internal error Process exited while reading console log
output: char device redirected to /dev/pts/5
qemu: 'vmdk' invalid format
This bit is telling: qemu: 'vmdk' invalid format
As a test I tried using libvirt to create a vmdk and then add it to an
existing VM, and it failed with the same message.
Does this mean that libvirt supports vmdk, but qemu-kvm doesn't? IF so,
why does libvirt continue to offer it as an option for KVM VM's??
IF this isn't related to libvirt, I apologise, but I'd appreciate any
pointers.
kindest regards
Frank
UWA
13 years
[libvirt-users] libvirt0.8.7.tar.gz installation failure
by 张光鹏
Hi:
I get a very strange problem when I installing libvirt0.8.7.tar.gz.
Here is my infomaton:
compute with RHELD6.0 systerm;
the systerm comes with libvirt0.8.7,bu I uninstalled it and its dependencies .
And then i download the libvirt0.8.7.tar.gz , untar it ,configure --with-esx,make,make install.
But I got an error like "libvirtd: /usr/local/lib/libvirt.so.0: version `LIBVIRT_PRIVATE_0.8.7' not found (required by libvirtd) "
when i use virsh,or libvirtd.
Can someone tell me what is the error mean?
Regards!
zhanggp(a)neusoft.com
---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from
your system. Thank you.
---------------------------------------------------------------------------------------------------
13 years
[libvirt-users] CPU and RAM utilization
by Jatin Kumar
Hello,
I have a few vms running on a blade server and i want to log the actual RAM
and CPU
utilization by these vms. dom.info(), libvirt API call is not giving
correct results. It is always
showing the max allocated resources.
I have tried using virt-top also but same problem persists.
Is there any thing that i am missing.
--
Jatin Kumar
13 years
[libvirt-users] Problem with listDomains() in Xen
by PREETHI RAMESH
This question concerns the usage of the listDomains(). When I run this
piece of code in KVM, it works perfectly fine but throws an array out of
bounds exception in Xen.
Connect conn=null;
conn = new Connect("xen:///", true);
int[] id = conn.listDomains();
System.out.println("lD of VM " +id[0]);
Answer I'd got:
Well, your code assumes that id.length is >= 1, but listDomains() can
return an empty array when there are no active domains known to
libvirt. So you need to check id.length before accessing any element
in the array.
Follow up- I tried accessing the length of the array and it's 0 all the
time. And there are active domains available.
In fact, I'm able to getUUID from the domain name. Other functions work
fine too.
Am I missing something?Can someone please help me? Thanks!
13 years
[libvirt-users] diificulty installing or building libvert
by Jeff Gaer
I am unable to install or build libvert for RHEL4-64. Due to the errors below. Is it because all the source/rpms are for Fedora? I don't see any redhat versions on the sources page. Thanks in advance for any help.
When running make against the untarred /libvirt-0.9.4.tar.gz configure succeeds but make fails.
make all-am
make[3]: Entering directory `/home/jgaer/Desktop/NiFi/libvirt-0.9.4/src'
CC libvirt_driver_nwfilter_la-nwfilter_learnipaddr.lo
nwfilter/nwfilter_learnipaddr.c: In function 'learnIPAddressThread':
nwfilter/nwfilter_learnipaddr.c:522: error: 'ETHERTYPE_VLAN' undeclared (first use in this function)
nwfilter/nwfilter_learnipaddr.c:522: error: (Each undeclared identifier is reported only once
nwfilter/nwfilter_learnipaddr.c:522: error: for each function it appears in.)
installing the src rpm fails
jgaer@ljgaer_~/Desktop/NiFi: sudo rpm -i libvirt-0.9.0-1.fc14.src.rpm
[sudo] password for jgaer:
warning: libvirt-0.9.0-1.fc14.src.rpm: Header V3 DSA signature: NOKEY, key ID de95bc1f
warning: user veillard does not exist - using root
warning: group www does not exist - using root
error: unpacking of archive failed on file /usr/src/redhat/SOURCES/libvirt-0.9.0.tar.gz;4ebd4829: cpio: MD5 sum mismatch
when trying to install rpm -i libvirt-0.9.7-1.fc14.x86_64.rpm
even with –force I get a long list of unresolved dependencies including all previous versions of libvirt.so
Trying to use rpmbuild results in the following missing dependancies. I am unable to build or install the libpcap-devel because of a dependency on libcap1 which seems to only exist for suse,
jgaer@ljgaer_~/Desktop/NiFi: sudo rpmbuild -ta libvirt-0.9.4.tar.gz
[sudo] password for jgaer:
error: Failed build dependencies:
libtasn1-devel is needed by libvirt-0.9.4-1.x86_64
libpcap-devel is needed by libvirt-0.9.4-1.x86_64
libnl-devel is needed by libvirt-0.9.4-1.x86_64
radvd is needed by libvirt-0.9.4-1.x86_64
ebtables is needed by libvirt-0.9.4-1.x86_64
/usr/bin/qemu-img is needed by libvirt-0.9.4-1.x86_64
parted-devel is needed by libvirt-0.9.4-1.x86_64
device-mapper-devel is needed by libvirt-0.9.4-1.x86_64
numactl-devel is needed by libvirt-0.9.4-1.x86_64
libssh2-devel is needed by libvirt-0.9.4-1.x86_64
Jeff
13 years
[libvirt-users] How to create virtual machine via virsh shell?
by 张光鹏
Hi,
I recently in the study of the knowledge of the libvirt(version 0.9.6) and vmware(esx,esxi,vcenter,vspheere client), I use virshshell doing some work such as create virtual machine(but i get an error like "the connetc driver do not support") , define virtual machine(success but when i start it i get an error like "can not find vmdk file 或其所依赖的快照磁盘之一"). Then I realized to first create a volume , but I again meet a mistake like "internal error Could not create volume: NotImplemented".
Excuse me.How should I do the right to create or define a virtual machine and the normal starting it?
Regards!
zhanggp
---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from
your system. Thank you.
---------------------------------------------------------------------------------------------------
13 years
[libvirt-users] How to create virtual machine via virsh shell?
by 张光鹏
Hi,
I recently in the study of the knowledge of the libvirt(version 0.9.6) and vmware(3.0beta1) , I use virshshell doing some work such as create virtual machine(but i get an error like "the connetc driver do not support") , define virtual machine(success but when i start it i get an error like "can not find vmdk file 或其所依赖的快照磁盘之一"). Then I realized to first create a volume , but I again meet a mistake like "internal error Could not create volume: NotImplemented".
Excuse me.How should I do the right to create or define a virtual machine and the normal starting it?
Regards!
zhanggp
---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from
your system. Thank you.
---------------------------------------------------------------------------------------------------
13 years
[libvirt-users] libvirt:create volume error
by 张光鹏
Hi,
I use libvirt version of 0.9.6,and i use vpx://xx/db/compute to login on the esx hypervisor.But I get an error like "internal error Could not create volume: NotImplemented - ?..?ㄦ.?ц?璇锋??..浣." when i create a new volume.And I follows the web-page http://www.jedi.be/blog/2010/12/08/libvirt-0-8-6-and-vmware-esx/ , so,do I lost something or someelse configurations are needed?
Regards !
---------------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s)
is intended only for the use of the intended recipient and may be confidential and/or privileged of
Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is
not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying
is strictly prohibited, and may be unlawful.If you have received this communication in error,please
immediately notify the sender by return e-mail, and delete the original message and all copies from
your system. Thank you.
---------------------------------------------------------------------------------------------------
13 years
[libvirt-users] Can't assign the 2nd MAC address to the VM
by zhouyb13@sina.com
to all who read this message,
I can't assign the second MAC to the second NIC for a VM. If only use 1 NIC, assigning MAC works. But not for 2 NICs or more. Do anyone has any ideas?
I have installed KVM on Ubuntu 11.10 64bit on my laptop. Also created the bridge on the host, and also taps.
I created a RHEL 6.1 64bit VM on this environment and run:
sudo kvm -m 512 -drive file=/data/vm/kvm/hslt/rhel61_x64_1st,cache=writeback -boot order=c -localtime -net nic,model=virtio,vlan=1,macaddr=52:54:00:12:34:56 -net tap,vlan=1,ifname=tap2,script=no -net nic,model=virtio,vlan=1,macaddr=52:54:00:12:34:55 -net tap,vlan=1,ifname=tap3,script=no
It doesn't work and the VM can NOT start.
If I change the command to:
sudo kvm -m 512 -drive file=/data/vm/kvm/hslt/rhel61_x64_1st,cache=writeback -boot order=c -localtime -net nic,model=virtio,vlan=1,macaddr=52:54:00:12:34:56 -net tap,vlan=1,ifname=tap2,script=no -net nic,model=virtio,vlan=1 -net tap,vlan=1,ifname=tap3,script=no
The VM can start, but the second NIC doesn't work in guest VM, and showing like no such device.
After change it to:
sudo kvm -m 512 -drive file=/data/vm/kvm/hslt/rhel61_x64_1st,cache=writeback -boot order=c -localtime -net nic,model=virtio,vlan=1 -net tap,vlan=1,ifname=tap2,script=no -net nic,model=virtio,vlan=1 -net tap,vlan=1,ifname=tap3,script=no
It works well, with 2 NICs in guest VM.
13 years
[libvirt-users] Problem with libvirt daemon
by Wouter - Iamotor
Hello,
I have a problem with the libvirt daemon. I have a little php script which
should connect with libvirt, but it won't.
When I try to start the libvirt daemon I get this error (using the command
libvirtd --listen):
2011-11-09 19:35:18.095: 3560: info : libvirt version: 0.9.7
2011-11-09 19:35:18.095: 3560: error : virPidFileAcquirePath:345 : Failed to
acquire pid file '/var/run/libvirtd.pid': Resource temporarily unavailable
So the daemon won't start and isn't started yet. If I check if the service
is running with ps -ef | grep libvirtd I get this output:
root 2865 1 0 15:50 ? 00:00:00 /usr/sbin/libvirtd -d
root 3149 1 0 19:17 ? 00:00:00 libvirtd -d
root 3206 1 0 19:17 ? 00:00:00 libvirtd -dl
root 3300 1 0 19:20 ? 00:00:00 libvirtd --listen --daemon
root 3356 1 0 19:21 ? 00:00:00 libvirtd --listen --daemon
root 3564 3077 0 19:36 pts/0 00:00:00 grep --color=auto libvirtd
Here you can see that the service isn't running.
How can I fix this problem. There is a .pid file in the /var/run/ directory.
I already deleted it and used the command libvirtd -daemon -listen but it
won't start. It doesn't show any output but when I use the ps -ef command, I
see that the service is not running.
Can you please help me?
With kind regards,
Wouter.
13 years