<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 14, 2016 at 9:03 PM, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com" target="_blank">rjones@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Jul 14, 2016 at 06:54:20PM +0300, Yaniv Kaul wrote:<br>
> Any idea what 'virt-customize' script I should use to convert from<br>
> virtio-blk (vda, vdb...) to virtio-scsi (sda, sdb...) ?<br>
<br>
</span>You'll find that you have to recreate the initrd, else it won't boot<br>
(I'm assuming this is a Linux guest).<br>
<br>
This is somewhat complicated and involves running some commands from<br>
the guest.  Here's what virt-v2v does, although virt-v2v is especially<br>
complicated because it supports doing this for everything back to RHEL 3(!)<br>
You probably only need to run dracut if you only care about modern<br>
Fedora & RHEL.<br>
<br>
  <a href="https://github.com/libguestfs/libguestfs/blob/master/v2v/convert_linux.ml#L794-L921" rel="noreferrer" target="_blank">https://github.com/libguestfs/libguestfs/blob/master/v2v/convert_linux.ml#L794-L921</a><br>
<span class=""><br>
> I've tried naively to convince libvirt to use virtio-scsi and still present<br>
> it to the guest as 'vd*' - that didn't work (<br>
<br>
</span>Yeah the target dev names in libvirt XML aren't really arbitrary<br>
strings.  Device names are controlled by the *guest* kernel, nothing<br>
to do with the host which just exports one or another PCI device.<br>
<br>
Rich.<br></blockquote><div><br></div><div>Does it make more sense to just use virt-builder and build it from scratch?</div><div>I did not find where in virt-builder I can actually specify virtio-scsi as the type. </div><div>(BTW, the reason for all this is mainly to get 'discard' support...)</div><div>Y.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" rel="noreferrer" target="_blank">http://people.redhat.com/~rjones</a><br>
Read my programming and virtualization blog: <a href="http://rwmj.wordpress.com" rel="noreferrer" target="_blank">http://rwmj.wordpress.com</a><br>
virt-top is 'top' for virtual machines.  Tiny program with many<br>
powerful monitoring features, net stats, disk stats, logging, etc.<br>
<a href="http://people.redhat.com/~rjones/virt-top" rel="noreferrer" target="_blank">http://people.redhat.com/~rjones/virt-top</a><br>
</font></span></blockquote></div><br></div></div>