Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


QEMU KVM virsh create issue using xml file.
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

QEMU KVM virsh create issue using xml file.

HaroldMHaroldM Member

I'm trying to create vm using the following command.

virsh create vm01.xml

my vm01.xml file contains the following.

<domain type='qemu'> <name>VM01</name> <uuid>5dd97025-0f12-4477-8ce4-d5722828f4a8</uuid> <memory>1024</memory> <currentMemory>1024</currentMemory> <vcpu>1</vcpu> <os> <type arch='x86_64'>hvm</type> <boot dev='cdrom'/> </os> <features> <acpi/> <pae/> </features> <clock offset='utc'/> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/KVMHosts/templates/ios/myimage.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='1' unit='0'/> </disk> <controller type='ide' index='0'/> <graphics type='vnc' port='5950'/> </devices> </domain>

vm creates fine and show the statue as running when I run virsh list but when I logged into vnc I got the following screen & nothing happens.

but when I run the following command all the things are working fine & vm is booting with iso.

qemu-system-x86_64 -enable-kvm -m 512 -hda /KVMHosts/storage/vm01.raw -name vm -cdrom /KVMHosts/templates/ios/myimage.iso -vnc :1

I can't figure out what's wrong with virsh xml :/ can anyone please help me ?

Best Regards,

Comments

  • r0t3nr0t3n Member

    You do realise you only have a cdrom device defined within the XML and no hard drive whereas you have a hda defined on the CLI.

    Thanked by 1WSS
  • r0t3n said: You do realise you only have a cdrom device defined within the XML and no hard drive whereas you have a hda defined on the CLI.

    tried adding the following block aslo, but same result ?

    <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/KVMHosts/storage/vm01.raw'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' unit='0'/> </disk>

    I can't figure out whats wrong :/

  • r0t3nr0t3n Member

    I highly suggest you create a VM using 'virt-install' and then review the generated XML by using 'virsh dumpxml'.

  • r0t3n said: I highly suggest you create a VM using 'virt-install' and then review the generated XML by using 'virsh dumpxml'.

    Thanks buddy. I dump the xml & it's working fine now. :)

Sign In or Register to comment.