More minor tweaks to streamline things, optimize kvm nodes
This commit is contained in:
parent
ad6504670b
commit
368afe9cc9
@ -115,7 +115,7 @@ build_maas() {
|
||||
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 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'
|
||||
|
@ -13,8 +13,7 @@ nic_model="virtio"
|
||||
network="maas"
|
||||
|
||||
create_vms() {
|
||||
create_storage
|
||||
build_vms
|
||||
create_storage & build_vms
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +41,24 @@ build_vms() {
|
||||
bus="scsi"
|
||||
macaddr=$(printf '52:54:00:63:%02x:%02x\n' "$((RANDOM%256))" "$((RANDOM%256))")
|
||||
|
||||
virt-install -v --noautoconsole --print-xml \
|
||||
--boot network,hd,menu=on \
|
||||
--graphics spice \
|
||||
--video qxl \
|
||||
--channel spicevmc \
|
||||
--name "$virt_node" \
|
||||
--ram "$ram" \
|
||||
--cpu host-passthrough,cache.mode=passthrough \
|
||||
--vcpus "$vcpus" \
|
||||
virt-install -v --noautoconsole \
|
||||
--print-xml \
|
||||
--autostart \
|
||||
--boot network,hd,menu=on \
|
||||
--graphics spice \
|
||||
--video qxl,vram=1024 \
|
||||
--channel spicevmc \
|
||||
--name "$virt_node" \
|
||||
--ram "$ram" \
|
||||
--vcpus "$vcpus" \
|
||||
--cpu host-passthrough,cache.mode=passthrough \
|
||||
--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"
|
||||
virsh define "$virt_node.xml"
|
||||
virsh start "$virt_node"
|
||||
# virsh start "$virt_node"
|
||||
done
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user