Virsh中創建虛擬機兩種方式define和create的區別


本質上兩者一樣的,都是從xml配置文件創建虛擬機

define  叢xml配置文件創建主機但是不啟動

create  同樣是叢xml配置文件創建主機,但是可以指定很多選項,比如是否啟動,是否連接控制台

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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM