Managed to b0rk my Win7 test platform whilst trying to have it recognize a crappy TV tuner card that's Windows only.
Error message received wasn't exactly explicit:
# virsh start Win7
error: Failed to start domain Win7
error: Unable to read from monitor: Connection reset by peer
Er, thanks, I guess.
Bit of sleuthing showed that I needed to check the error log (duh):
# less /var/log/libvirt/qemu/Win7.log
Which showed the error:
2014-06-12 06:06:26.679+0000: starting up
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -name Win7 -S -M rhel6.5.0 -enable-kvm -m 2048 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid c8652cca-0437-901c-4b59-b9d3fdc84cd6 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/Win7.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/Win7.img,if=none,id=drive-ide0-0-0,format=raw,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive file=/media/[snip]/Windows/ISOs/Win7.iso,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=25,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:a9:c1:c7,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -vga std -device AC97,id=sound0,bus=pci.0,addr=0x6 -device pci-assign,host=06:00.0,id=hostdev0,configfd=26,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
char device redirected to /dev/pts/5
Failed to assign device "hostdev0" : Operation not permitted
qemu-kvm: -device pci-assign,host=06:00.0,id=hostdev0,configfd=26,bus=pci.0,addr=0x5: Device 'pci-assign' could not be initialized
2014-06-12 06:06:27.011+0000: shutting down
So, merely had to issue the following command:
virsh edit Win7
Domain Win7 XML configuration edited.
and removed this:
<hostdev mode='subsystem' type='pci' managed='no'>
<source>
<address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</hostdev>
Re-start the Virtual Machine:
virsh start Win7
Domain Win7 started
Fixed!
Comments
Ron
Wed, 2014/06/11 - 23:33
Permalink
One final thing...
Since I can't access the TV tuner card this way, one last command to issue:
Domain Win7 is being shutdown
# virsh destroy Win7
Domain Win7 destroyed
# virsh undefine Win7
It was just a technical test.
I haven't watched TV nor run Windows for years and don't miss either of them one bit; buh-bye!
R o n
- - -
Vancouver
Ron
Thu, 2014/06/12 - 00:01
Permalink
Converted to qcow; failed to launch
And as soon as I destroyed Win7 and went to get busy with LDAP server on VM "ubuntu-server", I also get an error:
error: Failed to start domain ubuntu-server
error: internal error Process exited while reading console log output: char device redirected to /dev/pts/6
qemu-kvm: -drive file=/media/[snip]/temp/kvm-pools/ubuntu-server.img,if=none,id=drive-ide0-0-0,format=qcow2,cache=none: could not open disk image /media/[snip]/temp/kvm-pools/ubuntu-server.img: Invalid argument
Dammit. I seem to recall converting to "qcow" (qemu copy on write) format in Virtual Machine Manager. Uh-oh.
To verify:
image: /media/[snip]/temp/kvm-pools/ubuntu-server.img
file format: raw
virtual size: 5.0G (5368709120 bytes)
disk size: 2.2G
SO, the format is really raw, but my settings say qcow2.
Oops. To fix, we need to change qcow2 to raw in the XML file:
Domain ubuntu-server XML configuration edited.
# virsh start ubuntu-server
Domain ubuntu-server started
Lesson: use qemu-img to convert formats (or just pick qcow[2] with virt-install).
R o n
- - -
Vancouver
Add new comment