I have a pre-existing qemu-kvm VM that I run with the following command:
qemu-kvm -localtime -vga std -m 512 -usbdevice tablet -name "Windows XP" -hda ~/VirtualMachines/raw.img -k en-us
I've been trying to "convert/adapt" this to be run with virt-manager, without success. Is there a "recipe" I can follow?
I ran the following 'virt-install' command on a "copy" of the image:
[root@tlondon ~]# virt-install --name=WinXP --ram=512 --accelerate --os-type=windows --os-variant=winxp -v --import --file=/home/tbl/VirtualMachines/gold-raw.img --vnc
Starting install... Guest installation complete... restarting guest. [root@tlondon ~]#
But the VM fails to complete booting: I see the BIOS screen, followed by the Windows "previous attempt to boot failed" screen, and an endless cycling between these 2 screens.
virt-manager shows the VM running. I clean up each time by "forcing shutdown" and deleting the VM from within virt-manager.
I can boot the image (~/VirtualMachines/gold-raw.img) after this with 'qemu-kvm' without problem.
I've tried swapping '--sdl' for '--vnc', adding 'noacpi', dropping '--accelerate', to no avail.
Is what I'm trying to do feasible, or is the qemu-kvm image 'polluted' with unsupported drivers and or settings?
Appreciate any help!
tom
Tom London wrote:
I have a pre-existing qemu-kvm VM that I run with the following command:
qemu-kvm -localtime -vga std -m 512 -usbdevice tablet -name "Windows XP" -hda ~/VirtualMachines/raw.img -k en-us
I've been trying to "convert/adapt" this to be run with virt-manager, without success. Is there a "recipe" I can follow?
I ran the following 'virt-install' command on a "copy" of the image:
[root@tlondon ~]# virt-install --name=WinXP --ram=512 --accelerate --os-type=windows --os-variant=winxp -v --import --file=/home/tbl/VirtualMachines/gold-raw.img --vnc
Starting install... Guest installation complete... restarting guest. [root@tlondon ~]#
But the VM fails to complete booting: I see the BIOS screen, followed by the Windows "previous attempt to boot failed" screen, and an endless cycling between these 2 screens.
virt-manager shows the VM running. I clean up each time by "forcing shutdown" and deleting the VM from within virt-manager.
I can boot the image (~/VirtualMachines/gold-raw.img) after this with 'qemu-kvm' without problem.
I've tried swapping '--sdl' for '--vnc', adding 'noacpi', dropping '--accelerate', to no avail.
Is what I'm trying to do feasible, or is the qemu-kvm image 'polluted' with unsupported drivers and or settings?
Appreciate any help!
tom
Hmm, can you run 'virsh edit yourvmname' (will launch vi by default), and in the <features> block, add:
<acpi/>
If it isn't already present. Then try starting your VM.
- Cole
On Mon, Apr 27, 2009 at 10:46 AM, Cole Robinson crobinso@redhat.com wrote:
Tom London wrote:
I have a pre-existing qemu-kvm VM that I run with the following command:
qemu-kvm -localtime -vga std -m 512 -usbdevice tablet -name "Windows XP" -hda ~/VirtualMachines/raw.img -k en-us
I've been trying to "convert/adapt" this to be run with virt-manager, without success. Is there a "recipe" I can follow?
I ran the following 'virt-install' command on a "copy" of the image:
[root@tlondon ~]# virt-install --name=WinXP --ram=512 --accelerate --os-type=windows --os-variant=winxp -v --import --file=/home/tbl/VirtualMachines/gold-raw.img --vnc
Starting install... Guest installation complete... restarting guest. [root@tlondon ~]#
But the VM fails to complete booting: I see the BIOS screen, followed by the Windows "previous attempt to boot failed" screen, and an endless cycling between these 2 screens.
virt-manager shows the VM running. I clean up each time by "forcing shutdown" and deleting the VM from within virt-manager.
I can boot the image (~/VirtualMachines/gold-raw.img) after this with 'qemu-kvm' without problem.
I've tried swapping '--sdl' for '--vnc', adding 'noacpi', dropping '--accelerate', to no avail.
Is what I'm trying to do feasible, or is the qemu-kvm image 'polluted' with unsupported drivers and or settings?
Appreciate any help!
tom
Hmm, can you run 'virsh edit yourvmname' (will launch vi by default), and in the <features> block, add:
<acpi/>
If it isn't already present. Then try starting your VM.
- Cole
Yup: perfectly fixes this. Thanks!!!
Did I miss an option to 'virt-install'?
tom
Tom London wrote:
On Mon, Apr 27, 2009 at 10:46 AM, Cole Robinson crobinso@redhat.com wrote:
Tom London wrote:
I have a pre-existing qemu-kvm VM that I run with the following command:
qemu-kvm -localtime -vga std -m 512 -usbdevice tablet -name "Windows XP" -hda ~/VirtualMachines/raw.img -k en-us
I've been trying to "convert/adapt" this to be run with virt-manager, without success. Is there a "recipe" I can follow?
I ran the following 'virt-install' command on a "copy" of the image:
[root@tlondon ~]# virt-install --name=WinXP --ram=512 --accelerate --os-type=windows --os-variant=winxp -v --import --file=/home/tbl/VirtualMachines/gold-raw.img --vnc
Starting install... Guest installation complete... restarting guest. [root@tlondon ~]#
But the VM fails to complete booting: I see the BIOS screen, followed by the Windows "previous attempt to boot failed" screen, and an endless cycling between these 2 screens.
virt-manager shows the VM running. I clean up each time by "forcing shutdown" and deleting the VM from within virt-manager.
I can boot the image (~/VirtualMachines/gold-raw.img) after this with 'qemu-kvm' without problem.
I've tried swapping '--sdl' for '--vnc', adding 'noacpi', dropping '--accelerate', to no avail.
Is what I'm trying to do feasible, or is the qemu-kvm image 'polluted' with unsupported drivers and or settings?
Appreciate any help!
tom
Hmm, can you run 'virsh edit yourvmname' (will launch vi by default), and in the <features> block, add:
<acpi/>
If it isn't already present. Then try starting your VM.
- Cole
Yup: perfectly fixes this. Thanks!!!
Did I miss an option to 'virt-install'?
tom
Nope, you did as much as you could. We need to fix virt-install to not disable ACPI for windows if installing on KVM: the original setting was leftover from early Xen days.
Thanks, Cole
On Mon, Apr 27, 2009 at 10:26:20AM -0700, Tom London wrote:
I have a pre-existing qemu-kvm VM that I run with the following command:
qemu-kvm -localtime -vga std -m 512 -usbdevice tablet -name "Windows XP" -hda ~/VirtualMachines/raw.img -k en-us
I've been trying to "convert/adapt" this to be run with virt-manager, without success. Is there a "recipe" I can follow?
We are actally working on a command for virsh to perform 'import' of existing QEMU args, spitting back out a libvirt domain XML file.
I've got a crude perl script proof of concept people can use in the meanwhile - it is far from complete & doesn't cover all QEMU args, but it may be of use in short term. It is attached to this mail. Run it with perl, giving the full list of QEMU args you have, eg
# perl virt-xml-import-qemu-args qemu-kvm -localtime -vga std \ -m 512 -usbdevice tablet -name "Windows XP" -hda \ ~/VirtualMachines/raw.img -k en-us <domain type='kvm'> <name>Windows XP</name> <memory>524288</memory> <vcpu>1</vcpu> <os> <type arch='i686'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> </features> <clock offset='localtime'/> <on_reboot>restart</on_reboot> <devices> <emulator>qemu-kvm</emulator> <disk type='/home/berrange/VirtualMachines/raw.img' device='disk'> <source file='/home/berrange/VirtualMachines/raw.img'/> <target dev='hda' bus='ide'/> </disk> <graphics type='sdl' display=':0.0/> </devices> </domain>
You'll likely still need to edit some things - particularly network config, but this will get you started in the right direction...
Daniel
On Mon, Apr 27, 2009 at 1:27 PM, Daniel P. Berrange berrange@redhat.com wrote:
We are actally working on a command for virsh to perform 'import' of existing QEMU args, spitting back out a libvirt domain XML file.
I've got a crude perl script proof of concept people can use in the meanwhile - it is far from complete & doesn't cover all QEMU args, but it may be of use in short term. It is attached to this mail. Run it with perl, giving the full list of QEMU args you have, eg
# perl virt-xml-import-qemu-args qemu-kvm -localtime -vga std \ -m 512 -usbdevice tablet -name "Windows XP" -hda \ ~/VirtualMachines/raw.img -k en-us
<domain type='kvm'> <name>Windows XP</name> <memory>524288</memory> <vcpu>1</vcpu> <os> <type arch='i686'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> </features> <clock offset='localtime'/> <on_reboot>restart</on_reboot> <devices> <emulator>qemu-kvm</emulator> <disk type='/home/berrange/VirtualMachines/raw.img' device='disk'> <source file='/home/berrange/VirtualMachines/raw.img'/> <target dev='hda' bus='ide'/> </disk> <graphics type='sdl' display=':0.0/> </devices> </domain>
You'll likely still need to edit some things - particularly network config, but this will get you started in the right direction...
Daniel
Thanks for this!
This appears to enter the '<acpi/>' that was missing from virt-install... :-)
I'll test this out a bit.
Thanks again!
tom