The difference between define and create in two ways to create virtual machines in Virsh

Essentially the same, both create virtual machines from xml configuration files

define plex xml configuration file creates host but does not start

create is also a plex xml configuration file to create a host, but you can specify many options, such as whether to start, whether to connect to the console

NAME
    create - create a domain from an XML file

  SYNOPSIS
    create <file> [--console] [--paused] [--autodestroy] [--pass-fds <string>] [--validate]

  DESCRIPTION
    Create a domain.

  OPTIONS
    [--file] <string>  file containing an XML domain description
    --console        attach to console after creation
    --paused         leave the guest paused after creation
    --autodestroy    automatically destroy the guest when virsh disconnects
    --pass-fds <string>  pass file descriptors N,M,... to the guest
    --validate       validate the XML against the schema

 

NAME
    create - create a domain from an XML file

  SYNOPSIS
    create <file> [--console] [--paused] [--autodestroy] [--pass-fds <string>] [--validate]

  DESCRIPTION
    Create a domain.

  OPTIONS
    [--file] <string>  file containing an XML domain description
    --console        attach to console after creation
    --paused         leave the guest paused after creation
    --autodestroy    automatically destroy the guest when virsh disconnects
    --pass-fds <string>  pass file descriptors N,M,... to the guest
    --validate       validate the XML against the schema

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324888137&siteId=291194637