I'm currently trying to set up a VM the issue I'm having referencing this question when I try and start this vm it doesn't work with the kickstart
def makeKvm(name, conn):
xmldesc = """
<domain type="kvm">
<name>""" + name + """</name>
<memory unit='GB'>1</memory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<kernel>/var/lib/libvirt/media/./casper/vmlinuz.efi</kernel>
<initrd>/var/lib/libvirt/media/./casper/initrd.lz</initrd>
<cmdline>console=ttyS0 ks=https://pastebin.com/raw/6TznVUuN</cmdline>
</os>
<iothreads>1</iothreads>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>preserve</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/pool/""" + name + """.img'/>
<target dev='vda' bus='virtio'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/iso/ubuntu-16.04.3-desktop-amd64.iso'/>
<target dev='hdb' bus='virtio'/>
<readonly/>
</disk>
<interface type='bridge'>
<source bridge='br0'/>
<model type='virtio'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0' keymap='en-us'/>
</devices>
</domain>
"""
dom = conn.defineXML(xmldesc)
return dom
This doesn't work. When I try and turn on the VM it stays stuck on Booting from ROM