$params=@{
VmName = "Vyatta"
ExternalSwitchName = "外部LAN"
InternalSwitchName = "内部LAN"
VyattaLiveCDPath = "D:\Shared\Images\vyatta-livecd-virt_VC6.5R1_i386.iso"
VyattaConfigVfdPath = "D:\Hyper-V\Shared\Vyatta.vfd"
}
New-VyattaVM @params | Start-VM
vmconnect.exe localhost $params.VmName
Save following scripts to VFD root directory as "configure.sh" and create empty directory "config"
#!/bin/sh
configure
#NIC Interface Settings
set interfaces ethernet eth0 address dhcp
set interfaces ethernet eth1 address 172.16.255.254/16
#NAT Settings
set nat source rule 10
set nat source rule 10 outbound-interface eth0
set nat source rule 10 source address 0.0.0.0/0
set nat source rule 10 translation address masquerade
#DNS Service Settings
set service dns forwarding dhcp eth0
set service dns forwarding listen-on eth1
#DHCP Service Settings
set service dhcp-server shared-network-name ETH1_POOL subnet 172.16.0.0/16 start 172.16.100.0 stop 172.16.199.255
set service dhcp-server shared-network-name ETH1_POOL subnet 172.16.0.0/16 default-router 172.16.255.254
set service dhcp-server shared-network-name ETH1_POOL subnet 172.16.0.0/16 dns-server 172.16.255.254
#NTP Settings
delete system ntp
set system ntp server ntp.jst.mfeed.ad.jp
set system time-zone Asia/Tokyo
commit
save
Execute Following command in vyatta console to apply config and save config file to floppy disk
config
. /media/floppy/configure.sh
commit
save /media/floppy/config/config.boot
exit
reboot