QEMU error : Domain not found: no domain with matching name 'ubuntu' while running process list example

8616 views
Skip to first unread message

shp.panha...@gmail.com

unread,
Jun 7, 2014, 11:48:57 AM6/7/14
to vmit...@googlegroups.com
Hi guys,

I am new to QEMU-KVM and libvmi stuff. I seek your kind help on below error when I am trying to run process-list example:

spanhal1@seclab2:~/KVMModule/libvmi-0.10.1$ sudo ./examples/process-list ubuntu
libvir: QEMU error : Domain not found: no domain with matching name 'ubuntu'
VMI_ERROR: Failed to get domain id from name.
Failed to init LibVMI library.1

Here are few details of step I performed:
1. I have installed KVM module. (version 3.5)
2. Installed QEMU-KVM. (version 1.2.0)
3. Installed libvmi. (version 0.10.1)
4. Installed libvirt-bin and libvirt. (version 0.9.8)
5. Created a virtual machine as follows:
    $ qemu-img create -f qcow2 vdisk.img 15G
    $ sudo qemu-system-x86_64 -hda vdisk.img -cdrom ubuntu-12.04-desktop-amd64.iso -boot -d 1024 -vnc :1
6. Then I am trying to run process-list example and I am getting error as above.

Machine Details:
Intel(R) Core(TM) i3-3240 CPU @ 3.40GHz

flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx f16c lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms

OS: Ubuntu 12.04.1 LTS

Config file for Libvmi:

ubuntu {
     ostype = "Linux";
     sysmap = "/boot/System.map-3.5.0-22-generic";
     linux_name = 0x460;
     linux_tasks = 0x240;
     linux_mm = 0x278;
     linux_pid = 0x2b4;
     linux_pgd = 0x48;
}


spanhal1@seclab2:~$ lsmod | grep kvm
kvm_intel             137888  0
kvm                   422160  1 kvm_intel


Here is the output after I created and run the VM using command:
sudo qemu-system-x86_64 -hda vdisk1G.img -boot c -m 1024 -vnc :1        ..create a VM
sudo vncviewer :1

spanhal1@seclab2:~$ lsmod | grep kvm
kvm_intel             137888  3
kvm                   422160  1 kvm_intel

Libvirt log file entires:

2014-06-07 15:15:52.053+0000: 1167: info : libvirt version: 0.9.8
2014-06-07 15:15:52.053+0000: 1167: error : virCommandWait:2188 : internal error Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin /usr/local/bin/qemu-system-x86_64 -help) status unexpected: exit status 1
2014-06-07 15:15:52.090+0000: 1167: error : virCommandWait:2188 : internal error Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin /usr/local/bin/qemu-system-x86_64 -help) status unexpected: exit status 1
2014-06-07 15:23:24.200+0000: 1127: error : virNetSocketReadWire:1006 : End of file while reading data: Input/output error
2014-06-07 15:26:25.393+0000: 1127: error : virNetSocketReadWire:1006 : End of file while reading data: Input/output error


Hoping for your help.

Thanks,
Sanket


Ady Wahyudi Paundu

unread,
Jun 9, 2014, 2:18:35 AM6/9/14
to vmit...@googlegroups.com
What is the output of
# virsh list --all ?
Message has been deleted

shp.panha...@gmail.com

unread,
Jun 9, 2014, 10:08:00 AM6/9/14
to vmit...@googlegroups.com
I have started VM using command:


sudo qemu-system-x86_64 -hda vdisk1G.img -boot c -m 1024 -vnc :1        ..create a VM
sudo vncviewer :1                                                                                  .. view VM

and then run the virsh list --all command.

Here is the output command:

spanhal1@seclab2:~/KVMModule$ sudo virsh list --all
 Id Name                 State
-----------------------------------

Bryan D. Payne

unread,
Jun 9, 2014, 11:57:06 AM6/9/14
to vmit...@googlegroups.com
Looks like your VM is crashing?  Anything useful in the qemu logs?
-bryan


--
You received this message because you are subscribed to the Google Groups "vmitools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmitools+u...@googlegroups.com.
To post to this group, send email to vmit...@googlegroups.com.
Visit this group at http://groups.google.com/group/vmitools.
For more options, visit https://groups.google.com/d/optout.

Ady Wahyudi Paundu

unread,
Jun 9, 2014, 12:32:22 PM6/9/14
to vmit...@googlegroups.com
Hmmm… i don't know about the way you create VM… it looks suspicious.
For example, you try using process-list with a vm named 'ubuntu', however, there is no info whatsoever in your commands (to create your vm) that explicitly shows you give name 'ubuntu' to your vm.

so my suggestion:
could you try this
    $ virsh -c qemu:///system list --all
if that command can shows vm named ubuntu, then solve your problem using environment variable LIBVIRT_DEFAULT_URI=qemu:///system
if that command still shows nothing, then please try read this 'https://help.ubuntu.com/community/KVM/CreateGuests'

~AdyWP

Sanket Panhale

unread,
Jun 10, 2014, 12:41:47 AM6/10/14
to vmit...@googlegroups.com
@Ady:

Here I gave my try...

spanhal1@seclab2:~/KVMModule/libvmi-0.10.1$ sudo virsh -c qemu:///system list --all
 Id Name                 State
----------------------------------

Also, I have already tried by using environment variable LIBVIRT_DEFAULT_URI=qemu:///system.


@ Bryan: I will update the QEMU logs soon.

Thanks,
Sanket

Ady Wahyudi Paundu

unread,
Jun 10, 2014, 3:03:41 AM6/10/14
to vmit...@googlegroups.com
Then most likely there is no VM named 'ubuntu' in your system.
You can try one of several ways to create VM from this KVM documentation: https://help.ubuntu.com/community/KVM/CreateGuests

~AdyWP

shp.panha...@gmail.com

unread,
Jun 10, 2014, 11:36:44 AM6/10/14
to vmit...@googlegroups.com

@Bryan: I am not able locate QEMU logs. Could you please help me to locate it.

Thanks,
Sanket

shp.panha...@gmail.com

unread,
Jun 10, 2014, 1:46:46 PM6/10/14
to vmit...@googlegroups.com

@Ady:

Hi, I tired creating VM using steps given at below link.

https://help.ubuntu.com/community/KVM/CreateGuests
http://virt-tools.org/learning/install-with-command-line/

Create VM:

sudo apt-get install virtinst        ..package to run virt-install command

sudo fallocate -l 8192M /var/lib/libvirt/images/guest.img

sudo qemu-img create -f qcow2 /var/lib/libvirt/images/guest.qcow2 8192

spanhal1@seclab2:~/KVMModule$ sudo virt-install --connect qemu:///system -n ubuntu -r 512 -f guest.qcow2 -s 12 -c /home/spanhal1/KVMModule/ubuntu-12.04.4-desktop-amd64.iso --vnc --noautoconsole --os-type linux --accelerate --network=network:default
ERROR    Host does not support any virtualization options

Here are few workaround and information for this error:

spanhal1@seclab2:~/KVMModule$ modprobe kvm
spanhal1@seclab2:~/KVMModule$ lsmod | grep kvm

kvm_intel             137888  0
kvm                   422160  1 kvm_intel

spanhal1@seclab2:~/KVMModule$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

Check if virutalization is enabled by BIOS:
spanhal1@seclab2:/var/log/libvirt$ sudo modprobe msr
spanhal1@seclab2:/var/log/libvirt$ sudo rdmsr 0x3a
5


@Ady:

Hi, I tired creating VM using steps given at below link.

https://help.ubuntu.com/community/KVM/CreateGuests
http://virt-tools.org/learning/install-with-command-line/

Create VM:

sudo apt-get install virtinst        ..package to run virt-install command

sudo fallocate -l 8192M /var/lib/libvirt/images/guest.img

sudo qemu-img create -f qcow2 /var/lib/libvirt/images/guest.qcow2 8192

spanhal1@seclab2:~/KVMModule$ sudo virt-install --connect qemu:///system -n ubuntu -r 512 -f guest.qcow2 -s 12 -c /home/spanhal1/KVMModule/ubuntu-12.04.4-desktop-amd64.iso --vnc --noautoconsole --os-type linux --accelerate --network=network:default
ERROR    Host does not support any virtualization options

Here are few workaround and information for this error:
I have checked if virtualization option is enabled on this machine.

spanhal1@seclab2:~/KVMModule$ modprobe kvm
spanhal1@seclab2:~/KVMModule$ lsmod | grep kvm

kvm_intel             137888  0
kvm                   422160  1 kvm_intel

spanhal1@seclab2:~/KVMModule$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

Check if virutalization is enabled by BIOS:
spanhal1@seclab2:/var/log/libvirt$ sudo modprobe msr
spanhal1@seclab2:/var/log/libvirt$ sudo rdmsr 0x3a
5
(Values 3 and 5 mean it's activated).

libvirt log:

2014-06-10 16:28:58.246+0000: 7982: error : virCommandWait:2188 : internal error Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/
local/bin:/usr/bin:/usr/sbin:/sbin:/bin /usr/local/bin/qemu-system-x86_64 -help) status unexpected: exit status 1

Thanks,
Sanket

Bryan D. Payne

unread,
Jun 10, 2014, 1:46:50 PM6/10/14
to vmit...@googlegroups.com
It will depend on how Qemu is being installed.  But usually it is something like /var/log/qemu.
-bryan


--

shp.panha...@gmail.com

unread,
Jun 12, 2014, 3:19:27 PM6/12/14
to vmit...@googlegroups.com, br...@thepaynes.cc
@brayan:

Hi,

I am not able locate QEMU logs at path given by you.

I have installed QEMU using following steps.

Install QEMU
======================
Step 1:
Download QEMU-KVM source code

Step 2:
Install QEMU
$ cd qemu-kvm-1.2.0
$ ./configure --enable-debug --target-list="x86_64-softmmu"
$ make
$ sudo make install

Kindly help me locate QEMU logs.

Thanks,
Sanket

Bryan D. Payne

unread,
Jun 12, 2014, 3:27:24 PM6/12/14
to vmit...@googlegroups.com
This sounds like a good question for the qemu mailing list.
-bryan

shp.panha...@gmail.com

unread,
Jun 12, 2014, 3:36:18 PM6/12/14
to vmit...@googlegroups.com, br...@thepaynes.cc
Ok. Thanks for information :)

alex kp

unread,
Apr 5, 2016, 11:07:41 AM4/5/16
to vmitools
anyone know how to fix the issue ?

CB Sites

unread,
Jan 21, 2020, 8:01:41 PM1/21/20
to vmitools
I always hate dangling questions like this; so to answer the question simply;  libvirtd needs to be reloaded.

# systemctl reload libvirtd

or for the cool people;

# /etc/init.d/libvirtd reload

Cheers.
Reply all
Reply to author
Forward
0 new messages