- debian-container-disk:10.0 - Example yaml Debian 10.0
- debian-container-disk:9.0 - Example yaml Debian 9.0
- debian-container-disk:8.0
- debian-container-disk:testing
- ubuntu-container-disk:22.0
- ubuntu-container-disk:20.0
- ubuntu-container-disk:18.0
- ubuntu-container-disk:16.0
- ubuntu-container-disk:14.0
- fedora-container-disk:36
- fedora-container-disk:35
- fedora-container-disk:34
- fedora-container-disk:30
- fedora-container-disk:29
- fedora-container-disk:28
- fedora-container-disk:27
Create VM (kubevirt.io/v1alpha3, Debian 9):
cat <<EOF | kubectl apply -f -
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
name: debian
spec:
running: false
template:
metadata:
labels:
kubevirt.io/size: small
kubevirt.io/domain: debian
spec:
domain:
cpu:
cores: 2
devices:
disks:
- name: containervolume
disk:
bus: virtio
- name: cloudinitvolume
disk:
bus: virtio
interfaces:
- name: default
bridge: {}
resources:
requests:
memory: 1024M
networks:
- name: default
pod: {}
volumes:
- name: containervolume
containerDisk:
image: tedezed/debian-container-disk:9.0
- name: cloudinitvolume
cloudInitNoCloud:
userData: |-
#cloud-config
chpasswd:
list: |
debian:debian
root:toor
expire: False
EOF
Create VM old (kubevirt.io/v1alpha2, Debian 9):
cat <<EOF | kubectl apply -f -
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachine
metadata:
name: debian
spec:
running: false
template:
metadata:
labels:
kubevirt.io/size: small
kubevirt.io/domain: debian
spec:
domain:
cpu:
cores: 2
devices:
disks:
- name: containerdisk
volumeName: containervolume
disk:
bus: virtio
- name: cloudinitdisk
volumeName: cloudinitvolume
disk:
bus: virtio
interfaces:
- name: default
bridge: {}
resources:
requests:
memory: 1024M
networks:
- name: default
pod: {}
volumes:
- name: containervolume
containerDisk:
image: tedezed/debian-container-disk:9.0
- name: cloudinitvolume
cloudInitNoCloud:
userData: |-
#cloud-config
chpasswd:
list: |
debian:debian
root:toor
expire: False
EOF
Conect to vm:
kubectl get vms
virtctl start debian
virtctl console debian
Currently Debian 10 has problems to start with cloud-init, you can use the following example to use it and solve the problem temporarily.
cat <<EOF | kubectl apply -f -
apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
name: debian
spec:
running: false
template:
metadata:
labels:
kubevirt.io/size: small
kubevirt.io/domain: debian
spec:
domain:
cpu:
cores: 2
devices:
disks:
- name: containervolume
disk:
bus: virtio
- name: cloudinitvolume
disk:
bus: virtio
interfaces:
- name: default
bridge: {}
resources:
requests:
memory: 1024M
networks:
- name: default
pod: {}
volumes:
- name: containervolume
containerDisk:
image: tedezed/debian-container-disk:10.0
- name: cloudinitvolume
cloudInitNoCloud:
userData: |-
#cloud-config
bootcmd:
- echo cloud-init=disabled > /etc/cloud/cloud-init.disabled
- [ /bin/bash, -c, 'echo -e "demopass\ndemopass" | passwd root' ]
- reboot
EOF
Example: docker pull tedezed/debian-container-disk:8.0
Edit the file build_variable with your OS images, personal Docker registry and execute the next command to compile:
source build_variable
make build