what are the supported VM images/ISOs?

430 views
Skip to first unread message

khaled elgohary

unread,
Aug 19, 2022, 6:46:27 AM8/19/22
to kubevirt-dev
I just started to read about kubevirt and I can find it very interesting platform. I just have a question what are the supported OS or VM images can be used to run as a kubevirt VM ?

I can see some images like the cirros (i.e. quay.io/kubevirt/cirros-container-disk-demo), fidora and other samples in the github.. but lets say I need to use a different OS which is not listed in the kubevirt  repo either very old or a new release, is it possible to use it to run a kubevirt VM and how.

Actually I tried to search about that and I found some resources which recommend to use the PVC plugin to upload the ISO as a PVC, PFB, then use this PVC as an OfflineVirtualMachine. Is this way a proper way to do the same or we have to follow another approach?

$ kubectl plugin pvc create ubuntu1704 1Gi $PWD/ubuntu-17.04-server-amd64.iso disk.img


Thanks in advance :) 

Stu Gott

unread,
Aug 19, 2022, 7:58:15 AM8/19/22
to khaled elgohary, kubevirt-dev
Hi Kheled!


On Fri, Aug 19, 2022 at 6:46 AM khaled elgohary <k.elg...@gmail.com> wrote:
I just started to read about kubevirt and I can find it very interesting platform. I just have a question what are the supported OS or VM images can be used to run as a kubevirt VM ?


Thank you for your interest!
 
I can see some images like the cirros (i.e. quay.io/kubevirt/cirros-container-disk-demo), fidora and other samples in the github.. but lets say I need to use a different OS which is not listed in the kubevirt  repo either very old or a new release, is it possible to use it to run a kubevirt VM and how.


Under the hood KubeVirt is leveraging libvirt to run VMs in qemu/kvm. In general anything you would expect to run just fine with libvirt should work well with KubeVirt. So yes, absolutely it's possible to roll your own OS.
 
Actually I tried to search about that and I found some resources which recommend to use the PVC plugin to upload the ISO as a PVC, PFB, then use this PVC as an OfflineVirtualMachine. Is this way a proper way to do the same or we have to follow another approach?

The name "OfflineVirtualMachine" clues me in that you're looking at very old documentation. That was renamed to simply "VirtualMachine" years ago.

More up to date resources can be found here [1] and [2]

I'd suggest the general workflow would be to use CDI (sister project of KubeVirt) to create a DataVolume with your VM image. This image can come from a URL, or even uploaded directly from your workstation.


 

$ kubectl plugin pvc create ubuntu1704 1Gi $PWD/ubuntu-17.04-server-amd64.iso disk.img


Thanks in advance :) 

--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/02a533bc-3f29-461f-90eb-c026838d9afan%40googlegroups.com.

khaled elgohary

unread,
Aug 19, 2022, 9:53:00 AM8/19/22
to kubevirt-dev
Thanks so much Stu .. It is more clear now, I will go through theses resources and I will try the CDI tool as well.

Thanks again :)

Daniel Hiller

unread,
Aug 22, 2022, 4:42:32 AM8/22/22
to khaled elgohary, kubevirt-dev
Also there are a couple of official containerdisks that can be used [1] and maintained [2]


Message has been deleted

khaled elgohary

unread,
Aug 22, 2022, 11:30:40 AM8/22/22
to kubevirt-dev
Thanks Daniel .. I will go through these resources as well. 

I was so excited to make a VM works in k8s and I tried to go through the docs shared by Stu quickly :D . I created the disk volume and a VM as well successfully. But when I am trying to access the console I am getting below message and a blinking prompt by which I am not able to write anything. I know I need to provide more details about what the steps and the manifest files I used, this I may do in another thread, but I need to trace it myself first. Unfortunately, I am not able to find any error or warning in the VMI or the VM instances' events how can I trace what is wrong with the VM and why it stuck in this state ?

Also is there any quick guide how to run a VM from iso/img as kubevirt VM ?


> virtctl console customvm
Successfully connected to customvm console. The escape sequence is ^]

Roman Mohr

unread,
Aug 22, 2022, 11:31:48 AM8/22/22
to khaled elgohary, kubevirt-dev
On Mon, Aug 22, 2022 at 5:23 PM khaled elgohary <k.elg...@gmail.com> wrote:
Thanks Daniel .. I will go through these resources as well. 

I was so excited to make a VM works in k8s and I tried to go through the docs shared by Stu quickly :D . I created the disk volume and a VM as well successfully. But when I am trying to access the console I am getting below message and a blinking prompt by which I am not able to write anything. I know I need to provide more details about what the steps and the manifest files I used, this I may do in another thread, but I need to trace it myself first. Unfortunately, I am not able to find any error or warning in the VMI or the VM instances' events how can I trace what is wrong with the VM and why it stuck in this state ?

Also is there any quick guide how to run a VM from iso/img as kubevirt VM ?


> virtctl console customvm
Successfully connected to photoncustomvm console. The escape sequence is ^]

It may actually already work. Did you try pressing Enter a few times?
If not, you probably just have to tell your kernel to make use of the serial device as a terminal.

Here for instance on a fedora VM the relevant kernel boot args:

```
console=tty1 console=ttyS0,115200n8
```

Then you should see a login prompt after updating your bootloader and rebooting the machine.

Best regards,
Roman

 


On Monday, August 22, 2022 at 10:42:32 AM UTC+2 Daniel Hiller wrote:

Luboslav Pivarc

unread,
Aug 22, 2022, 11:37:10 AM8/22/22
to Roman Mohr, khaled elgohary, kubevirt-dev
Hi,
One more helpful thing would be to try vnc(if possible).

Best regards,
Lubo

khaled elgohary

unread,
Sep 5, 2022, 2:56:30 AM9/5/22
to kubevirt-dev
Unfortunately, still I am not able to access the created VM. How to check and trace the issue ?

I used the CDI to create the data volume with ISO and VID files with no luck .. are these formats ok or I have to use a specific file format (i.e. .raw ) ?

I am attaching the launcher pod logs which I can find some errors but not sure if they are the root cause of this issue.

My setup consisted of the following : 
- Fedora server 36.
- K8s v1.24.3.
- kubevirt 0.55.0 


Your support is highly appreciated :)
launcher.txt

Luboslav Pivarc

unread,
Sep 6, 2022, 4:55:10 AM9/6/22
to khaled elgohary, Alexander Wels, kubevirt-dev
Hey,

I see that you are running emulation. This might be a problem. Can you check if your VM is working without emulation(bare metal/nested)?

On Mon, Sep 5, 2022 at 8:56 AM khaled elgohary <k.elg...@gmail.com> wrote:
Unfortunately, still I am not able to access the created VM. How to check and trace the issue ?

I used the CDI to create the data volume with ISO and VID files with no luck .. are these formats ok or I have to use a specific file format (i.e. .raw ) ?
 
How did you do this?
@Alexander Wels would be one of the right persons to ask about CDI support.
 

khaled elgohary

unread,
Sep 13, 2022, 10:42:02 AM9/13/22
to kubevirt-dev
Hi Luboslav,

I am doing my tests on a bare metal and I am not able to make it work, however I am able to run the same ISO in the kvm in the same machine.

Reply all
Reply to author
Forward
0 new messages