How do I translate between qemu-system arguments and virt-install arguments so I can unify partially working commands?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I am in the process of setting up VFIO with KVM. I have the VFIO itself working, in that the VFIO'd GPU displays the UEFI shell screen when I start the VM. I am also able to create a working Windows VM with VNC for graphics. My problem is that I create the VM with passthrough using qemu-system, and the one that fully boots I create using virt-install.
What I would like to do is use virt-install, but with the same PCI device as I passthrough with qemu-create, so I need to figure out how to translate the qemu-system argument to virt-install options (or virsh edit xml)
-device vfio-pci,host=42:00.0,multifunction=on
-device vfio-pci,host=42:00.1
into virt-install arguments. However, the instructions I using for virt-install do not use the PCI ID, but rather domain, bus and slot, which are not shown in lspci and I am not sure how to check.
So either I need to get that info and use it in a virt-install command, or find a way to use the PCI ID with virt-install.
Here are my two commands:
qemu system:
sudo qemu-system-x86_64
-name $vmname,process=$vmname
-machine type=q35,accel=kvm
-cpu EPYC,kvm=off
-smp 4,sockets=1,cores=2,threads=2
-m 16G
-balloon none
-rtc clock=host,base=localtime
-vga none
-nographic
-serial none
-parallel none
-device vfio-pci,host=42:00.0,multifunction=on
-device vfio-pci,host=42:00.1
-drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/OVMF_CODE.fd
-drive if=pflash,format=raw,file=/usr/share/OVMF/OVMF_VARS.fd
-boot order=dc
#-drive id=disk0,if=virtio,cache=none,format=raw,file=/dev/nvme-tank/ntfs-zvol-part1
-drive file=/media/big-tank-8TB/OSISOS/Windows/WindowsOct2018.iso,index=1,media=cdrom
-drive file=/media/big-tank-8TB/OSISOS/Windows/virtio-win-0.1.160.iso,index=2,media=cdrom
virt-install
virt-install
--name myWINVM1
--ram 4096
--disk path=/dev/nvme-tank/ntfs-zvol-part1
--cpu core2duo
--vcpus 4
--os-type windows
--os-variant win10
--network bridge=virbr0
--graphics vnc
--console pty,target_type=serial
--disk /media/big-tank-8TB/OSISOS/Windows/WindowsOct2018.iso,device=cdrom,bus=ide
--disk /media/big-tank-8TB/OSISOS/Windows/virtio-win-0.1.160.iso,device=cdrom,bus=ide
It would also be OK to figure out how to make the qemu-system boot properly, but I like virt-install better because it makes a handy XML file that I can look at later.
kvm qemu pci pci-passthrough iommu
add a comment |Â
up vote
0
down vote
favorite
I am in the process of setting up VFIO with KVM. I have the VFIO itself working, in that the VFIO'd GPU displays the UEFI shell screen when I start the VM. I am also able to create a working Windows VM with VNC for graphics. My problem is that I create the VM with passthrough using qemu-system, and the one that fully boots I create using virt-install.
What I would like to do is use virt-install, but with the same PCI device as I passthrough with qemu-create, so I need to figure out how to translate the qemu-system argument to virt-install options (or virsh edit xml)
-device vfio-pci,host=42:00.0,multifunction=on
-device vfio-pci,host=42:00.1
into virt-install arguments. However, the instructions I using for virt-install do not use the PCI ID, but rather domain, bus and slot, which are not shown in lspci and I am not sure how to check.
So either I need to get that info and use it in a virt-install command, or find a way to use the PCI ID with virt-install.
Here are my two commands:
qemu system:
sudo qemu-system-x86_64
-name $vmname,process=$vmname
-machine type=q35,accel=kvm
-cpu EPYC,kvm=off
-smp 4,sockets=1,cores=2,threads=2
-m 16G
-balloon none
-rtc clock=host,base=localtime
-vga none
-nographic
-serial none
-parallel none
-device vfio-pci,host=42:00.0,multifunction=on
-device vfio-pci,host=42:00.1
-drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/OVMF_CODE.fd
-drive if=pflash,format=raw,file=/usr/share/OVMF/OVMF_VARS.fd
-boot order=dc
#-drive id=disk0,if=virtio,cache=none,format=raw,file=/dev/nvme-tank/ntfs-zvol-part1
-drive file=/media/big-tank-8TB/OSISOS/Windows/WindowsOct2018.iso,index=1,media=cdrom
-drive file=/media/big-tank-8TB/OSISOS/Windows/virtio-win-0.1.160.iso,index=2,media=cdrom
virt-install
virt-install
--name myWINVM1
--ram 4096
--disk path=/dev/nvme-tank/ntfs-zvol-part1
--cpu core2duo
--vcpus 4
--os-type windows
--os-variant win10
--network bridge=virbr0
--graphics vnc
--console pty,target_type=serial
--disk /media/big-tank-8TB/OSISOS/Windows/WindowsOct2018.iso,device=cdrom,bus=ide
--disk /media/big-tank-8TB/OSISOS/Windows/virtio-win-0.1.160.iso,device=cdrom,bus=ide
It would also be OK to figure out how to make the qemu-system boot properly, but I like virt-install better because it makes a handy XML file that I can look at later.
kvm qemu pci pci-passthrough iommu
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am in the process of setting up VFIO with KVM. I have the VFIO itself working, in that the VFIO'd GPU displays the UEFI shell screen when I start the VM. I am also able to create a working Windows VM with VNC for graphics. My problem is that I create the VM with passthrough using qemu-system, and the one that fully boots I create using virt-install.
What I would like to do is use virt-install, but with the same PCI device as I passthrough with qemu-create, so I need to figure out how to translate the qemu-system argument to virt-install options (or virsh edit xml)
-device vfio-pci,host=42:00.0,multifunction=on
-device vfio-pci,host=42:00.1
into virt-install arguments. However, the instructions I using for virt-install do not use the PCI ID, but rather domain, bus and slot, which are not shown in lspci and I am not sure how to check.
So either I need to get that info and use it in a virt-install command, or find a way to use the PCI ID with virt-install.
Here are my two commands:
qemu system:
sudo qemu-system-x86_64
-name $vmname,process=$vmname
-machine type=q35,accel=kvm
-cpu EPYC,kvm=off
-smp 4,sockets=1,cores=2,threads=2
-m 16G
-balloon none
-rtc clock=host,base=localtime
-vga none
-nographic
-serial none
-parallel none
-device vfio-pci,host=42:00.0,multifunction=on
-device vfio-pci,host=42:00.1
-drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/OVMF_CODE.fd
-drive if=pflash,format=raw,file=/usr/share/OVMF/OVMF_VARS.fd
-boot order=dc
#-drive id=disk0,if=virtio,cache=none,format=raw,file=/dev/nvme-tank/ntfs-zvol-part1
-drive file=/media/big-tank-8TB/OSISOS/Windows/WindowsOct2018.iso,index=1,media=cdrom
-drive file=/media/big-tank-8TB/OSISOS/Windows/virtio-win-0.1.160.iso,index=2,media=cdrom
virt-install
virt-install
--name myWINVM1
--ram 4096
--disk path=/dev/nvme-tank/ntfs-zvol-part1
--cpu core2duo
--vcpus 4
--os-type windows
--os-variant win10
--network bridge=virbr0
--graphics vnc
--console pty,target_type=serial
--disk /media/big-tank-8TB/OSISOS/Windows/WindowsOct2018.iso,device=cdrom,bus=ide
--disk /media/big-tank-8TB/OSISOS/Windows/virtio-win-0.1.160.iso,device=cdrom,bus=ide
It would also be OK to figure out how to make the qemu-system boot properly, but I like virt-install better because it makes a handy XML file that I can look at later.
kvm qemu pci pci-passthrough iommu
I am in the process of setting up VFIO with KVM. I have the VFIO itself working, in that the VFIO'd GPU displays the UEFI shell screen when I start the VM. I am also able to create a working Windows VM with VNC for graphics. My problem is that I create the VM with passthrough using qemu-system, and the one that fully boots I create using virt-install.
What I would like to do is use virt-install, but with the same PCI device as I passthrough with qemu-create, so I need to figure out how to translate the qemu-system argument to virt-install options (or virsh edit xml)
-device vfio-pci,host=42:00.0,multifunction=on
-device vfio-pci,host=42:00.1
into virt-install arguments. However, the instructions I using for virt-install do not use the PCI ID, but rather domain, bus and slot, which are not shown in lspci and I am not sure how to check.
So either I need to get that info and use it in a virt-install command, or find a way to use the PCI ID with virt-install.
Here are my two commands:
qemu system:
sudo qemu-system-x86_64
-name $vmname,process=$vmname
-machine type=q35,accel=kvm
-cpu EPYC,kvm=off
-smp 4,sockets=1,cores=2,threads=2
-m 16G
-balloon none
-rtc clock=host,base=localtime
-vga none
-nographic
-serial none
-parallel none
-device vfio-pci,host=42:00.0,multifunction=on
-device vfio-pci,host=42:00.1
-drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/OVMF_CODE.fd
-drive if=pflash,format=raw,file=/usr/share/OVMF/OVMF_VARS.fd
-boot order=dc
#-drive id=disk0,if=virtio,cache=none,format=raw,file=/dev/nvme-tank/ntfs-zvol-part1
-drive file=/media/big-tank-8TB/OSISOS/Windows/WindowsOct2018.iso,index=1,media=cdrom
-drive file=/media/big-tank-8TB/OSISOS/Windows/virtio-win-0.1.160.iso,index=2,media=cdrom
virt-install
virt-install
--name myWINVM1
--ram 4096
--disk path=/dev/nvme-tank/ntfs-zvol-part1
--cpu core2duo
--vcpus 4
--os-type windows
--os-variant win10
--network bridge=virbr0
--graphics vnc
--console pty,target_type=serial
--disk /media/big-tank-8TB/OSISOS/Windows/WindowsOct2018.iso,device=cdrom,bus=ide
--disk /media/big-tank-8TB/OSISOS/Windows/virtio-win-0.1.160.iso,device=cdrom,bus=ide
It would also be OK to figure out how to make the qemu-system boot properly, but I like virt-install better because it makes a handy XML file that I can look at later.
kvm qemu pci pci-passthrough iommu
kvm qemu pci pci-passthrough iommu
asked 5 mins ago
Thoughtcraft
1085
1085
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477847%2fhow-do-i-translate-between-qemu-system-arguments-and-virt-install-arguments-so-i%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password