►
From YouTube: Virtual Machine Batch API
Description
KubeVirt extends the Kubernetes ReplicaSets API to provide Virtual Machines with similar functionality and the same can be done with Kubernetes Jobs. In order to bulk schedule VirtualMachines, an admin could use a VirtualMachine Batch API, a VirtualMachineJob, to launch many VirtualMachines from a single API call.
In this session, we’d like to share ideas, discuss use cases, and consider possible solutions to bulk Virtual Machine scheduling.
Presenters:
- Huy Pham, NVIDIA. Github: huypham21
- Ryan Hallisey, NVIDIA. Github: rthallisey
A
Okay,
but
all
right,
I
will
change
the
slide.
When
you
tell
me.
C
Okay,
we'll
go
right
to
slide.
C
Yeah,
so
so
we
are
engineer,
and
we
want
to
automate
things
right.
We
want
to
do
tools
that
the
user
can
use
very
easily.
So
in
our
use
case
we
want
to
spawn
up
vms
on
demand
and
it
need
to
be
ultimate
and
the
demand
is
high.
C
So
let's
say
we
spawn
up
like
100
vms
at
the
times
and
so
right
now
we
need
to
the
the
the
automation
is
querying
api
server,
100
time
to
request
100
vm
being
great
and
that's
repetitive,
and
let's
say
we
only
want
to
spawn
up
identical
vms,
then
it
will
need
to
prepare
100,
identical
vms
and
now
to
create
a
vm.
It
need
to
going
through
a
lot
of
steps
to
preparing
vms,
preparing,
vmi
object
and
preparing
the
part
it's
going
to
update
the
vm.
C
I
spec
label
label
it
and
adding
conditions,
prepare
data
volume
set
up
metadata
for
bmi
and
prepare
part
templates,
and
that
in
information
are
the
same
if
we're
using
the
identical
vms.
But
our
case
is
different
at
as
we
want
to
have
a
specific
data
per
vm
and
we
don't
require
the
vm
to
last
long.
It
can
be
ephemeral,
so
we're
thinking
maybe
coming
up
the
api
like
kubernetes
jobs
should
be
useful,
so
I
will
share
my.
Can
you
go
to
the
next
slide?
C
Oh
yeah,
so
let
me
share
with
our
investigation,
so
we
think
that
vmi
replica
set
can
fit
into
the
picture
here,
because
it
can
allow
a
user
to
spawn
up
or
to
request
a
number
of
replicas.
C
However,
we
have
some
drawbacks
that
that
we
we
decided
to
have
another
tools
to
our
use
case,
because
we
we
need
the
tools
that
we
can
decide
which
which
vm
to
scale
down
and
bmi
replica
set,
want
to
maintain
the
the
number
of
replicas
instead
of
latin,
letting
us
pick
out
which
vmis
to
remove,
and
secondly,
each
vmi
is
injected
with
the
specific
data.
So
we
want
to
help
control
yeah
yeah.
C
We
want
to
have
control
of
the
specific
instance
and
third,
we
dig
inside
the
implementation
of
my
replica
set
and
found
out
that
it
used
the
vmi
api,
which
repeat
the
process
of
preparing
the
pod
template
and
bmi
template.
However,
we
realized
that
we
can
share
the
common
template
to
cut
down
the
repeating
step
to
provision
the
identical
bmi
and
we
find
that
the
need
to
have
a
crd,
that's
similar
to
ks
chop,
to
simplify
number
of
step
and
api
calls.
C
The
api
should
be
easy
to
use
and
let
the
user
remove
the
specific
bmi
instance.
So
ryan
can
talk
more
about
our
ids
and
then
the
next
slide.
He
will
share
a
document
and
now
he
can
take
over
it.
B
Cool
thanks,
sweet
I'll
share
the
design
in
the
in
the
chat.
Here,
it's
also
on
slack,
and
can
you
switch
over
to
it?
You
get
a
chance,
david
and,
and
so
the
so
thanks
we
so
kind
of
introduce
the
the
concept
and
what
we're
we're.
Looking
at.
B
I'll
reintroduce
it
like,
we
want
to
create
hundreds
of
virtual
machines
and,
and
what
we're
going
to
end
up
doing
is
we
have
loads
of
api
calls
that
we
do
can
get
repetitive.
So
it
seems
you
know
that
that
kubernetes
has
sort
of
a
similar
way
of
dealing
with
this
kind
of
thing.
With
their
batch
api
with
jobs,
you
can
create
a
bunch
of
pods,
you
can
create
them
in
parallel
and
it
will
just
launch
you
know.
B
However
many
you
want
it's
nice
and
it
has
some
features
like
if
you
delete
the
job
it'll
clean
up
the
pods,
so
there's
sort
of
an
attachment,
and
also
you
can
delete
the
pods
individually
and
the
job
isn't
necessarily
going
to
go
and
create
more.
It's
just
sort
of
like
this
very
light
attachment
to
the
between
them
and
so
there's
sort
of
an
example.
Yeah
things
are
pulling
up
that
that's
out
there
and
what's
interesting
is
like
so
you
can
see
a
us
have
this.
B
Has
this
called
fleet
and
some
of
the
things
you
want
to
highlight
in
here?
It's
like,
okay,
you
can
have
say
in
your
fleet.
You
can
launch
a
bunch
of
vms
and
you
can
do
overrides
so
if
you
scroll
down
a
little,
you
can
actually
see
in
that
picture.
There
there's
like
c4,
large
and
there's
sort
of
a
capacity
for
it
and
then
the
c5
large,
of
different
types.
B
B
I
like
to
do
a
bulk
request
within
a
single
api,
so
that's
kind
of
where
that's
kind
of
where
we
are
and
what
we're
thinking
so
to
kind
of
like
kick
off
discussion,
I
put
like
one
idea
into
the
design
doc
as
like
a
a
way
that,
like
we
could
look
at
this
so
scroll
down
a
little
to
the
virtual
machine
job.
So
I
even
kind
of
highlight
this
a
little
bit
so
the
differences
between
let's
say
like
a
kubernetes
job
and
a
virtual
machine
job.
B
You
know
first
thing
like
a
non-parallel,
so
all
the
highlights
in
blue
are
sort
of
things
that
would
differ
between
the
two,
a
non-parallel
parallel
creation
of
jobs,
as
opposed
to
virtual
machines.
A
fixed
completion
account
pods
like
so.
The
job
will
look
for
completion
for
virtual
machine.
We
could
define
completion,
maybe
a
little
bit
more
to
be
a
specific
phase.
Something
like
running.
I
was
thinking
things
like
templating,
something
like
that
be
the
same
job
owns
all
the
positive
crates.
Instead,
we
go
on
the
virtual
machines.
B
We
have
some
sort
of
wait
for
conditions
and
then
we're
gonna
also
wait
until
we've
reached
the
allocated
amount
uniform
metadata.
This
is
a
requirement
for
jobs.
Virtual
machine
we'd
probably
want
to
have
some
unique
metadata
or
user
data
like
cloud
in
the
data.
We
want
past
secrets,
passwords
things
like
that.
We
could
see
it
being
the
case
that
you
need
to
have
unique
metadata.
So
if
you
scroll
a
little
farther
down
the,
I
have
an
example
here.
B
This
is
just
a
sort
of
like
just
a
general
idea,
like
there's
already
the
virtual
machine
api,
which
sort
of
serves
as
like
a
template
of
things,
and
the
general
idea
here
is
like
that.
I
was
thinking.
Okay,
we
have
this
virtual
machine
object.
You
know
what,
if
you
were
to
sort
of
reference,
the
virtual
machine,
object
and
say
I
want
a
certain
number
of
those
and
then
maybe
I
do
some
overlay
overrides
of
them.
B
B
You
know
cloud
data
unit,
cloudinet
data,
something
like
that
and
you
know
maybe
those
those
virtual
machines
created
as
as
well
as
the
virtual
machine
instance
being
spawned
with
them
so
sort
of
like
having
that
kind
of
relationship
and
then
at
the
bottom
there
I
kind
of
have
like
a
if
you
were
to
do
like
a
get
of
it.
You
just
like
some
of
what
it
could.
Look
like
like
10
1vms,
and
you
can
see
them
and
running
something
like
that.
B
So
I
wanted
to
just
kind
of
turn
it
over
to
anyone
that
has
some
thoughts
about
this
and
and
we
can
kind
of
record
them
and
see
what
people
think.
A
So
I
think
one
thing
to
kind
of
clarify
would
be
what
are
functionally.
I
know
we
went
over
this,
but
I
think
it
would
help
with
the
conversation
the
differences
between
what's
trying
to
be
expressed
in
this
virtual
machine
job
and
what
we
have
in
the
vmi
replica
set
today.
So
vmi
rackbook
sets
always
trying
to
reconcile
x
number
of
virtual
machine
instances
and
we
take
one
out
and
it's
going
to
spin
up
another
one
and
the
job.
A
If
say
you
want
10
in
parallel.
What
would
happen
if
we
manually
like
shut
down
one
of
those
virtual
machines?
What
would
you
expect
this
virtual
machine
job
abstraction
to
do?
Would
it
replace
it
or
is
it
saying
that
it's
completed
or
yeah?
What's
the
thought
there.
B
So
in
in
the
in
this,
in
the
way
that
we're
using
a
job
it
wouldn't
replace
it,
there
wouldn't
be,
it
would
be
very
light
linkage
between
sort
of
the
the
job
object
and
the
actual
virtual
machines
themselves.
So
the
so
like
I
said
they
wouldn't
be.
It
wouldn't
be
create
that
you
could
have
control
over
the
individual
virtual
machines
and
you
can
do
whatever
you
want
with
them.
B
The
only
control
would
be
that
if
the,
if
you
were
to
remove
the
job
itself,
then
the
objects,
the
virtual
machines
themselves-
would
be
removed.
Okay,.
A
So
in
we'll
just
take
this
one
that
I
have
highlighted
right
here,
you
said
parallelism
10,
so
we're
going
to
get
10
of
these
virtual
machine
instances.
A
A
Are
we
saying
that
it's
okay,
after
we've
reached
the
certain
condition
if
all
10
have
been
created,
that
somebody
could
go
in
and
begin
deleting
ones
that
may
have
been
spun
up
by
this
job
and
the
job
would
not
replace
them?
Or
are
we
saying
that
the
job
is
not
in
a
reconciled
state?
If
we
do
that,
that's
kind
of
I
know
I'm
asking
the
same
question
twice:
kind
of
just
trying
to
kind
of
drill
down.
B
Yeah
a
little
bit
so
the
the
once
we
reach
the
the
sort
of
the
completed
state.
The
jobs
is
not
going
to
be
exercising
any
more
control
over
in
the
underlying
assets.
There
will
be
we've
reached
10.
Now
we're
not
going
to
be
reconciling
it.
At
that
point,.
B
Very
light
ownership
only
yeah
we
reach,
we
have
a
completed
state
after
we've,
reached
that
we
don't
we
don't
really
care
about
them
anymore
and
what
they're
doing.
E
And
would
you
wait
there
for
the
vms,
for
I
don't
know
a
ready
condition
or
something
until
you
say:
okay
now
I
consider
it
created
and
I
would
not
create
a
replacement.
Or
would
you
not
want
to
create
a
new
vm
instance
at
all.
B
C
C
E
Okay,
so
you
really
want
let
the
controller
create
10,
vms
and
then
just
monitor,
but
don't
do
any
action
at
any
cost.
Basically,.
E
C
E
D
B
Is
what
you're
really
aiming
at
a
batch
start,
job
or
more
of
a
vm
pool
in
the
end,
so
a
vm
pool
is
something
that
it
is
definitely
something
in
the
area
here,
and
this
is,
I
guess,
maybe
like
the
discussion
between
like
the
replica
set
and
so
where
we
kind
of
landed
on.
B
This
is
like
what
is
sort
of
the
fit
for
a
vm
pool,
because
I
guess
you
could
say
that's
sort
of
what
we're
after,
but
what's
the
right
fit
and
it
was
like
originally
that's
where
we
started
kind
of
with
the
replicas
didn't
quite
find
for
the
reasons
we
mentioned,
that
it
fit
exactly
what
we
were
looking
for,
and
so
this
at
least
isn't
the
perfect
fit,
but
at
least
gives
us
the
opportunity
to
get
what
we
want
out
of
it
so
sort
of
having
that
flexibility
that
control
granular
control
of
the
virtual
machines
after
they
get
created.
B
E
Top
one
more
question
this
one
regarding
the
difference
to
pool
and
chop:
let's
suppose
you
create
the
10
vms
and
five
of
them
are
shut
down
and
it
goes
on
and
gone
and
maybe
at
the
end
there
is
only
one
running.
What
would
be
the
trigger
for
you
to
create
more
vms
than
like?
I
would
you
expect.
Would
you
want
to
outside
of
this
controller,
then
monitor
the
overall
situation
of
how
many
vms
you
have
and
then
create
another
batch
when
you
think
the
time
is
right
or
what
is
there.
B
Yeah,
that's
right,
yeah!
That's
right!
So
we
monitor
the
the
count.
So
that's
how
we
sort
of
reach
this
idea
of
pools
that
we'll
monitor
the
count
and
we'll
always
know
okay
like
that
that
we're
not
at
capacity
right
now
and
we
know
what
we
want
to
reach,
and
so
we
will
reach
it.
So
we're
missing
five!
So
we'll
launch
another
five.
E
So
I
wonder
if
I
see
why
the
virtual
machine
is
inserted
because
it's
not
a
clear
fit
and
maybe
also
know
the
pool
like
it
is.
I
wonder
if
you
did
consider
some
kind
of
a
mixture
with.
Maybe
I
don't
know
something
like
a
vm
pool
or
virtual
machine
deployment
where
you
can
have
a
special
condition
or
something
which
you
can
somehow
fill
from
the
workload
which
can
say.
Okay.
Now
I'm
done
I'm
not
useful
anymore,
or
something
and
combining
this
with
something
like
horizontal,
auto
scaling
with
the
kubernetes
primitives.
B
Well,
will
that
get
us
sort
of
the
the
uniqueness
sort
of
at
the
at
the
pod
level
and
sort
of
the
control
that
we
would
need,
though,.
E
B
B
Yeah,
no,
that's
correct!
So
what
what
what
is
sort
of
what
I
this
is
good
to
expand
on.
So
what
I'm
thinking
is
that
that,
for,
I
think
the
second
one
like
50
number,
two
vms,
with
with
new
my
cloudant
data.
So
in
this
case
the
idea
would
be
that
we
would
have
some
sort
of
secrets
that
would
get
passed,
but
it
would
be
a
unique
secret
for
all
of
them,
so
whatever
it
is
like
we'd
have
to
so.
B
The
templating
here
is
that
okay,
there's
gonna
be
some
sort
of
secret
override,
but
whatever
it
is,
it
could
be.
It
could
be
unique
so
like
in
this
case,
something
that
matches
a
label
secret
with
this
label.
Will
they
will
be
handed
out
to
all
these
virtual
machines.
E
B
Yeah,
so
it's
sort
of
so
we
have
so
like.
I
think
this
example
said
50
vm,
so
in
this
case
we
have
50
secrets
with
some
sort
of
label.
We
then
do
the
override
and
say
we're
going
to
hand
out
50
secrets.
Each
of
them
will
get
a
unique
secret
from
this
list
of
secrets,
and
these
that
have
this
label.
D
D
B
So
this
is
where
yeah
so
like.
B
So
the
idea
would
be
that
they
can
some
controller
that
that
sort
of
man-
that's
dealing
with
this
virtual
machine
job
would
have
would
be
to
recognize
his
override
and
would
understand
that
that
I
want
a
secret-
and
I
don't
say
it
here
but
like
if
it
had
a
it-
had
a
label
field
for
the
over
excuse
me
and
the
label
that
I
called
you
was
called
the
50
unique
secrets,
or
something
and-
and
I
have
50
unique
secrets-
they
all
have
that
label.
B
When
I
start
the
one
of
the
virtual
machines,
they'll
be
given
one
of
the
secrets
with
that
label
and
and
so
on,
and
so
forth,
all
the
way
through
50,
and
so
they
all
end
up
with
a
different
secret
and
each
of
those
secrets
I
created
beforehand.
They
all
have
unique
data.
E
So
there
is
one
case
in
kubernetes
on
deployment
on
stateful
sets.
Maybe
that
is
resembles
the
idea
pretty
well
just
to
clarify
there
is
this
case
you
you
can
specify
on
the
stateful
set
the
pvc
template
and
it
will
create
the
pvcs
for
you
right,
but
only
if
it
does
not
already
exist
like
in
this
case
it
you
can
tell
up
front
what
the
pvc
names
will
be,
and
so
it
will
then
just
automatically
pick
it
up
if
it
already
exists.
E
B
Yeah,
that
sounds
that
sounds
like
it
yeah,
so
the
sort
of
getting
that
uniqueness
for
for
some
of
the
pods
or
some
of
the
vms.
B
Okay,
there's
another
question
so
kind
of
what
agony's
I
don't
know.
What
that
is
is
doing
for
game
servers
on
kubernetes,
you
spin
up
a
pool
of
xvms
and
you
don't
and
you'd
want
to
claim
them
from
the
pool
to
own
them.
So
they
pull
so
the
pool
doesn't,
does
not
manage
it
anymore,
yeah,
so
very
similar
yeah.
So
it's
a
very
similar
idea.
B
A
lot
of
what
I
guess
that
I'm
I'm
trying
to
like
nail
home
is
that,
what's
like
the
kubernetes
way
of
doing
this,
like
and
and
sort
of
applying
it
to
a
virtual
machine
like
I'm
trying
to
follow
the
sort
of
replicas
of
the
model
and
the
comments
has
requested
so
does
hubert.
So
what
is
like
the
kubernetes
way
of
doing
this
in
cubert
and
to
get
to
at
least
a
lot
of
what
we're,
after
with
a
few
little
tweaks
like
the
unique
metadata,
I
would
say,
is
one
of.
B
E
But
what
I
guess
so
so
good
questions
indeed
from
kevin,
but
I
guess
what
I'm
missing
here
a
little
bit.
Is
this
point
on
what
what
normally?
E
What
I
see
very
often
kubernetes
is
that
you
have
a
very
clear
purpose
like
what
kevin
is
describing
here
and
then
you're
implementing
all
those
parts
in
kubernetes,
so
that
kubernetes
does
does
all
the
work
for
you
so
that
it
does
not
just
create
50
vms
for
you,
but
like
that,
you
have
this
explicit
controller
which
can
cover
your
use
case
in
the
sense
that
you
say
okay
here
I
always
want
to
have
50
spare
vms
and
you
can,
for
instance,
then
take
them
out
and
use
them.
E
Maybe
I
don't
know
by
re-labeling
or
whatever
and
based
on
horizontal,
auto
scaling
or
just
based
on
the
number
on
not
used
vms.
I
will
replace
the
gun
ones
so
that
you
always
have
something
to
pick
from
from
the
pool,
but
maybe
you
just
read,
and
then
I
mean
you
can
do
with
them.
Whatever
you
want,
you
can
shut
them
down.
In
the
meantime,
I
have
already
created
a
replacement
for
you
so
that
you
never
run
out
of
fresh
instances,
so
that
would
be,
for
instance,
from
my
perspective,
a
fully
closed.
E
Feature,
let
me
put
it
this
way,
I'm
not
sure
if
you
understand
what
I
try
to
get
it
compared
to
in
this
case,
it's
not
entirely
clear
to
me.
It
looks
like
only
a
little
bit
automated,
not
really
taking
the
full
feature
into
kubernetes,
like
just
really
just
batching
api
calls
and
not
really
actually
addressing
it.
The
full
use
case
yeah.
B
It
it
it
doesn't
address
the
the
full
ucs
yeah
I
mean
I
do
agree
with
you,
but
this
is
where
now
so,
I'm
like
I'm
open
to
addressing
the
full
use
case
but
sort
of
finding
the
right
balance
is,
I
guess
the
is
the
problem
I'm
having
and
sort
of
would
like
and
I'd
be
open
to
having
a
question
if
we
want
to
say
like
that,
kubert
wants
to
develop
a
a
virtual
machine
instance
pool,
for
example,
kind
of
api
object.
B
That
would
be
really
cool
and
definitely
be
interested
in
discussing
that.
If,
if
folks
thinks
that's
something
that
would
fit,
it
seems
awfully
close
to
a
replication
controller
with
some
nuances.
A
And
take
into
account
the
use
case
you're
trying
to
achieve
and
try
to
see
how
the
pool
could
be
shaped
to
do
that.
B
D
And
I'm
sorry
to
step
it,
but
I
I
believe
we
will
have
to
I'm
afraid
that
we
will
have
to
continue
those
discussions
beyond
the
summit
because
we
are
already
on
time
for
the
next
session.
D
So
at
this
point
I
would
like
to
thank
you,
ryan
and,
and
we
to
lead
the
discussion
and
introduce
the
discussion,
but
I
and
thanks
david
and
roman
and
everyone
who
participated,
but
I
would
encourage
you
to
follow
up
after
the
session,
probably
through
slack
and
most
likely
also
to
keep
your
tab.
The
google
group
and
communicate
there.
Okay,
yeah.