16 lines
		
	
	
		
			463 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			463 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/sh -xe
 | 
						|
 | 
						|
_dir="$HOME/qemu"
 | 
						|
_disk="obsd69.qcow2"
 | 
						|
_media="install69.iso"
 | 
						|
_size="20G"
 | 
						|
_arch="x86_64"
 | 
						|
 | 
						|
mkdir -p "$_dir"
 | 
						|
rm -f bsd.rd
 | 
						|
wget -c "http://192.168.1.20/pub/OpenBSD/snapshots/amd64/bsd.rd" \
 | 
						|
         || echo "Install Media not found online"
 | 
						|
qemu-img create -f qcow2 ${_dir}/${_disk} ${_size}
 | 
						|
qemu-system-${_arch} -m 512M -boot order=nc -device e1000 -net nic -net user,tftp=${_dir},tftp-server-name=192.168.1.20,bootfile=pxeboot -hda ${_dir}/${_disk}
 | 
						|
 |