summaryrefslogtreecommitdiffstats
path: root/make-ad-vm.sh
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2012-09-11 10:25:32 -0400
committerSimo Sorce <simo@redhat.com>2012-09-11 10:29:27 -0400
commit66830832af6b4d5db3c9adaa0239b72e6e4af9f4 (patch)
tree50bac294c68681c02ceaa58c78c575215ced4764 /make-ad-vm.sh
parent5c92550c416eb7d06dc813b337dcc87856c207c8 (diff)
downloadauto-win-vm-ad-66830832af6b4d5db3c9adaa0239b72e6e4af9f4.tar.gz
auto-win-vm-ad-66830832af6b4d5db3c9adaa0239b72e6e4af9f4.tar.xz
auto-win-vm-ad-66830832af6b4d5db3c9adaa0239b72e6e4af9f4.zip
Use default network in NAT mode and random MAC
Diffstat (limited to 'make-ad-vm.sh')
-rwxr-xr-xmake-ad-vm.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/make-ad-vm.sh b/make-ad-vm.sh
index 308936f..015b192 100755
--- a/make-ad-vm.sh
+++ b/make-ad-vm.sh
@@ -38,16 +38,16 @@ if [ -z "$ADMINPASSWORD" ] ; then
exit 1
fi
-if [ -z "$VM_MAC" ] ; then
- # try to get the mac addr from virsh
- VM_MAC=`$SUDOCMD virsh net-dumpxml default | grep "'"$VM_NAME"'"|sed "s/^.*mac='\([^']*\)'.*$/\1/"`
- if [ -z "$VM_MAC" ] ; then
- echo Error: your machine $VM_MAC has no mac address in virsh net-dumpxml default
- echo Please use virsh net-edit default to specify the mac address for $VM_MAC
- echo or set VM_MAC=mac:addr in the environment
- exit 1
- fi
-fi
+#if [ -z "$VM_MAC" ] ; then
+# # try to get the mac addr from virsh
+# VM_MAC=`$SUDOCMD virsh net-dumpxml default | grep "'"$VM_NAME"'"|sed "s/^.*mac='\([^']*\)'.*$/\1/"`
+# if [ -z "$VM_MAC" ] ; then
+# echo Error: your machine $VM_MAC has no mac address in virsh net-dumpxml default
+# echo Please use virsh net-edit default to specify the mac address for $VM_MAC
+# echo or set VM_MAC=mac:addr in the environment
+# exit 1
+# fi
+#fi
if [ -z "$VM_FQDN" ] ; then
# try to get the ip addr from virsh
@@ -141,7 +141,7 @@ $SUDOCMD virt-install --connect=qemu:///system --hvm \
--serial file,path=$serialpath --serial pty \
--disk path=$WIN_VM_DISKFILE,bus=ide,size=$VM_DISKSIZE,format=raw,cache=none \
$VI_FLOPPY $VI_EXTRAS_CD \
- --network=bridge=virbr0,model=rtl8139,mac=$VM_MAC \
+ --network=network=default,model=rtl8139 \
$VI_DEBUG --noautoconsole || { echo error $? from virt-install ; exit 1 ; }
echo now we wait for everything to be set up