From: Vinod Chegu <vinodchegu@gmail.com>
To: kvm@vger.kernel.org
Subject: Unable to start a guest using qemu-kvm directly
Date: Sun, 29 Jan 2012 15:17:57 +0000 (UTC) [thread overview]
Message-ID: <loom.20120129T154918-461@post.gmane.org> (raw)
Dear All,
I am using RHEL 6.2 + KVM on a X86_64 server. I have been able to create Linux
guests using virt-install (using virto and/or pci passthrough) and am able to
manage the guests using virsh and/or virt-manager for doing some basic stuff.
Here is a sample guest (that I was able to create using virt-install and able to
boot fine using either virsh or virt-manager) :
<domain type='kvm' id='11'>
<name>testvm2</name>
<uuid>d44e8618-e48c-531b-01c4-80fc2a026a25</uuid>
<memory>4194304</memory>
<currentMemory>4194304</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='rhel6.2.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/lib/libvirt/images/vmStorage/vm2.img'/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
</disk>
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<alias name='ide0-1-0'/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
<controller type='ide' index='0'>
<alias name='ide0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01'
function='0x1'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:7b:dc:d3'/>
<source bridge='vbr1'/>
<target dev='vnet0'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/4'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/4'>
<source path='/dev/pts/4'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<input type='tablet' bus='usb'>
<alias name='input0'/>
</input>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5900' autoport='yes'/>
<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='0x05'
function='0x0'/>
</memballoon>
</devices>
<seclabel type='dynamic' model='selinux' relabel='yes'>
<label>system_u:system_r:svirt_t:s0:c290,c578</label>
<imagelabel>system_u:object_r:svirt_image_t:s0:c290,c578</imagelabel>
</seclabel>
</domain>
Tried to start the above guest using qemu-kvm directly (so that I can in future
specify different options etc). But I am getting some errors. (pl. see below).
# /usr/libexec/qemu-kvm -version
QEMU PC emulator version 0.12.1 (qemu-kvm-0.12.1.2), Copyright (c) 2003-2008
Fabrice Bellard
# /usr/libexec/qemu-kvm -S -M rhel6.2.0 -enable-kvm -m 4096 -smp
1,sockets=1,cores=1,threads=1 -name testvm2 -uuid d44e8618-e48c-531b-01c4-
80fc2a026a25 -nodefconfig -nodefaults -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/testvm2.monitor,server,nowait -
mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -
drive file=/var/lib/libvirt/images/vmStorage/vm2.img,if=none,id=drive-virtio-
disk0,format=qcow2,cache=none -device virtio-blk-
pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -
drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-
drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev
tap,fd=23,id=hostnet0,vhost=on,vhostfd=24 -device virtio-net-
pci,netdev=hostnet0,id=net0,mac=52:54:00:7b:dc:d3,bus=pci.0,addr=0x3 -chardev
pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -usb -
device usb-tablet,id=input0 -vnc 127.0.0.1:0 -vga cirrus -device virtio-balloon-
pci,id=balloon0,bus=pci.0,addr=0x5
char device redirected to /dev/pts/5
qemu-system-x86_64: -netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24: TUNGETIFF
ioctl() failed: Bad file descriptor
TUNSETOFFLOAD ioctl() failed: Bad file descriptor
qemu-system-x86_64: -netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24: vhost-net
requested but could not be initialized
qemu-system-x86_64: -netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24: Device
'tap' could not be initialized
----
Can someone please tell me what this means and any tips on how I can solve this?
Do I have to do some other setup to make qemu-kvm happy w.r.t the -netdev
options?
Thank you in anticiaption!!
Vinod
next reply other threads:[~2012-01-29 15:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-29 15:17 Vinod Chegu [this message]
2012-01-29 16:08 ` Unable to start a guest using qemu-kvm directly Michael Tokarev
2012-01-31 22:29 ` Vinod Chegu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20120129T154918-461@post.gmane.org \
--to=vinodchegu@gmail.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).