Skip to content

Commit

Permalink
Added support for creating vm with nested-virt
Browse files Browse the repository at this point in the history
  • Loading branch information
kbidarkar committed Nov 21, 2014
1 parent b11a9a5 commit ebe92fa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion snap-guest
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ OPTIONS:
It is possible to configure static network setup (only Fedora/RHEL).
--static-gateway
It is possible to configure static network setup (only Fedora/RHEL).
--cpu-feature
Configure the CPU model and CPU features exposed to the guest.
EXAMPLE:
Expand Down Expand Up @@ -120,8 +122,9 @@ BOOT_SCRIPT_PREFIX=""
STATIC_IPADDR=""
STATIC_NETMASK=""
STATIC_GATEWAY=""
CPU_FEATURE=""

if ! options=$(getopt -o hlfwb:t:n:m:c:d:p:s:1:g:i: -l list,list-all,force,add-ip,image-dir:,base-image-dir:,base:,graphics:,target:,network:,network2:,memory:,cpus:,domain:,domain-prefix:,swap:,firstboot:,cloud-image,cloud-preconf,user-data-ssh,user-data-stdin,user-data-file:,boot-script,boot-script-prefix:,static-ipaddr:,static-netmask:,static-gateway:,help -- "$@"); then
if ! options=$(getopt -o hlfwb:t:n:m:c:d:p:s:1:g:i: -l list,list-all,force,add-ip,image-dir:,base-image-dir:,base:,graphics:,target:,network:,network2:,memory:,cpus:,domain:,domain-prefix:,swap:,firstboot:,cloud-image,cloud-preconf,user-data-ssh,user-data-stdin,user-data-file:,boot-script,boot-script-prefix:,static-ipaddr:,static-netmask:,static-gateway:,cpu-feature:,help -- "$@"); then
exit 1
fi

Expand Down Expand Up @@ -156,6 +159,7 @@ while [ $# -gt 0 ]; do
--static-ipaddr) STATIC_IPADDR="$2" ; shift ;;
--static-netmask) STATIC_NETMASK="$2" ; shift ;;
--static-gateway) STATIC_GATEWAY="$2" ; shift ;;
--cpu-feature) CPU_FEATURE="--cpu=$2" ; shift ;;
--help|-h) usage; exit ;;
(--) shift; break;;
(-*) echo "$0: error - unrecognized option $1" 1>&2; exit 1;;
Expand Down Expand Up @@ -284,6 +288,7 @@ virt-install --vcpus $CPUS \
--graphics "$GRAPHICS_OPTS" \
--noautoconsole --force \
--network=$NETWORK,mac=$MAC \
$CPU_FEATURE
$NETWORK2

# -- IP Determining -------------
Expand Down

0 comments on commit ebe92fa

Please sign in to comment.