Skip to content

1337andre/kubevirt-images-generator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kubevirt Images Generator

Debian

Ubuntu

CentOS

Fedora

OpenSUSE

CirrOS

CoreOS

Example Kubevirt

Create VM:

cat <<EOF | kubectl apply -f -
apiVersion: kubevirt.io/v1alpha2
kind: VirtualMachine
metadata:
  name: debian9
spec:
  running: false
  template:
    metadata:
      labels: 
        kubevirt.io/size: small
        kubevirt.io/domain: debian9
    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 debian9

virtctl console debian9

Example in docker

Example: docker pull tedezed/debian-container-disk:8.0

Customizable use

Edit the file build_variable with your OS images, personal Docker registry and execute the next command to compile:

source build_variable
make build

About

Kubevirt Images Generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 50.6%
  • Shell 48.5%
  • Makefile 0.9%