From ad6504670b42b2157f02756282ca0cc0ce295211 Mon Sep 17 00:00:00 2001 From: "David A. Desrosiers" Date: Mon, 11 Mar 2019 04:53:49 +0000 Subject: [PATCH] Updates to handle kvm/VxT host passthrough and more maas tweaks --- bootstrap-maas.sh | 3 +++ manage-maas-nodes.sh | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bootstrap-maas.sh b/bootstrap-maas.sh index 2907b5c..3defd7e 100755 --- a/bootstrap-maas.sh +++ b/bootstrap-maas.sh @@ -110,11 +110,13 @@ build_maas() { maas $maas_profile maas set-config name=kernel_opts value="console=ttyS0,115200 console=tty0,115200 elevator=cfq intel_iommu=on iommu=pt debug nosplash scsi_mod.use_blk_mq=1 dm_mod.use_blk_mq=1 enable_mtrr_cleanup mtrr_spare_reg_nr=1 systemd.log_level=debug" maas $maas_profile maas set-config name=maas_name value=us-east maas $maas_profile maas set-config name=upstream_dns value="$maas_upstream_dns" + maas $maas_profile maas set-config name=dnssec_validation value=no maas $maas_profile maas set-config name=enable_analytics value=false maas $maas_profile maas set-config name=enable_http_proxy value=true maas $maas_profile maas set-config name=enable_third_party_drivers value=false maas $maas_profile maas set-config name=curtin_verbose value=true maas $maas_profile boot-source update 1 url=http://10.0.1.28/maas/images/ephemeral-v3/daily/ + maas $maas_profile subnet update 2 gateway_ip=$maas_bridge_ip sleep 3 maas $maas_profile ipranges create type=dynamic start_ip=192.168.100.100 end_ip=192.168.100.200 comment='This is the reserved range for MAAS nodes' sleep 6 @@ -122,6 +124,7 @@ build_maas() { # This is needed, because it points to localhost by default and will fail to # commission/deploy in this state + echo "DEBUG: http://$maas_bridge_ip:5240/MAAS/" sudo maas-rack config --region-url "http://$maas_bridge_ip:5240/MAAS/" && sudo service maas-rackd restart } diff --git a/manage-maas-nodes.sh b/manage-maas-nodes.sh index 2844618..617f3e5 100755 --- a/manage-maas-nodes.sh +++ b/manage-maas-nodes.sh @@ -42,20 +42,20 @@ build_vms() { bus="scsi" macaddr=$(printf '52:54:00:63:%02x:%02x\n' "$((RANDOM%256))" "$((RANDOM%256))") - virt-install --noautoconsole --print-xml \ + virt-install -v --noautoconsole --print-xml \ --boot network,hd,menu=on \ --graphics spice \ - --video vga \ + --video qxl \ --channel spicevmc \ --name "$virt_node" \ --ram "$ram" \ + --cpu host-passthrough,cache.mode=passthrough \ --vcpus "$vcpus" \ --controller "$bus",model=virtio-scsi,index=0 \ --disk path="$storage_path/$virt_node/$virt_node-d1.img,format=$storage_format,size=40,bus=$bus,cache=writeback" \ --disk path="$storage_path/$virt_node/$virt_node-d2.img,format=$storage_format,size=20,bus=$bus,cache=writeback" \ --disk path="$storage_path/$virt_node/$virt_node-d3.img,format=$storage_format,size=20,bus=$bus,cache=writeback" \ - --network=network=$network,mac="$macaddr",model=$nic_model > "$virt_node.xml" - + --network=network=$network,mac="$macaddr",model=$nic_model > "$virt_node.xml" virsh define "$virt_node.xml" virsh start "$virt_node" done