<div dir="ltr"><div><div><div><div><div><div><div><div>Hi Guys,<br><br></div>I'm currently learning KVM and have set up an Ubuntu 12.04.2 VM running KVM.<br><br></div>I am using the following command to provision a VM:<br>
<br>  virt-install --connect qemu:///system --ram "$ramsize" -n "$vmname" --boot network,hd,menu=on --os-variant="$variant" --disk path=/var/lib/libvirt/images/"$vmname".qcow2,device=disk,bus=virtio,format=qcow2 --mac=  --cpu host --vcpus="$numcpus" --graphics none --noautoconsole --import<br>
<br></div>But cannot seem to find a way to enable bios useserial=yes without issuing a virsh edit $vmname<br><br></div><div>I've tried --extraargs= but that appears to be for kernel command lines, which is not what I want to achieve here.  I'm looking for a way to enable serial BIOS from the point the VM is created.<br>
</div><div><br></div><div>The current solution I am using is to do virsh destroy $vmname ; virsh edit $vm_name ; virsh start $vm_name which is not great, but gets the job done.<br></div><div><br></div>My versions are as follows:<br>
<br></div>Ubuntu 12.04.2 x86_64 kernel 3.2.0-39-generic<br></div>libvirt 0.9.8-2ubuntu17.8<br></div>qemu-kvm 1.0+noroms-0ubuntu14.8<br><br></div>Thanks,<br>Robert<br></div>