Make guest default to 10.0.2.2 as the apt mirror, fix skip_image vs quiet flags
This commit is contained in:
parent
d765459667
commit
a344ed9dac
@ -107,7 +107,7 @@ OptionParser.new do |opts|
|
|||||||
@options[:skip_image] = v
|
@options[:skip_image] = v
|
||||||
end
|
end
|
||||||
opts.on("-q", "--quiet", "be quiet") do |v|
|
opts.on("-q", "--quiet", "be quiet") do |v|
|
||||||
@options[:skip_image] = v
|
@options[:quiet] = v
|
||||||
end
|
end
|
||||||
opts.on("-c PAIRS", "--commit PAIRS", "comma separated list of DIRECTORY=COMMIT pairs") do |v|
|
opts.on("-c PAIRS", "--commit PAIRS", "comma separated list of DIRECTORY=COMMIT pairs") do |v|
|
||||||
@options[:commit] = v
|
@options[:commit] = v
|
||||||
|
@ -3,11 +3,11 @@ set -e
|
|||||||
|
|
||||||
SUITE=lucid
|
SUITE=lucid
|
||||||
ARCH=amd64
|
ARCH=amd64
|
||||||
MIRROR=http://${MIRROR_HOST:-`hostname`}:3142/archive.ubuntu.com/ubuntu
|
MIRROR=http://${MIRROR_HOST:-10.0.2.2}:3142/archive.ubuntu.com/ubuntu
|
||||||
SECURITY_MIRROR=http://${MIRROR_HOST:-`hostname`}:3142/security.ubuntu.com/ubuntu
|
SECURITY_MIRROR=http://${MIRROR_HOST:-10.0.2.2}:3142/security.ubuntu.com/ubuntu
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: ${0##*/} [OPTION]... <command>"
|
echo "Usage: ${0##*/} [OPTION]..."
|
||||||
echo "Make a base client."
|
echo "Make a base client."
|
||||||
echo
|
echo
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@ -17,7 +17,8 @@ usage() {
|
|||||||
|
|
||||||
The MIRROR_HOST environment variable can be used to change the
|
The MIRROR_HOST environment variable can be used to change the
|
||||||
apt-cacher host. It should be something that the target VM can
|
apt-cacher host. It should be something that the target VM can
|
||||||
resolve (not localhost).
|
resolve (not localhost). By default it is the IP address 10.0.2.2
|
||||||
|
which is the host IP as visible from the guest.
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
ARCH=qemu$1
|
ARCH=qemu$1
|
||||||
SUFFIX=$2
|
SUFFIX=$2
|
||||||
|
|
||||||
kvm -cpu $ARCH -m 2000 -smp 2 -drive file=target-$SUFFIX.qcow2 -net nic,model=virtio -net user,hostfwd=tcp::$VM_SSH_PORT-:22 -vnc :16 > var/target.log 2>&1 &
|
kvm -cpu $ARCH -m 256 -smp 2 -drive file=target-$SUFFIX.qcow2 -net nic,model=virtio -net user,hostfwd=tcp::$VM_SSH_PORT-:22 -vnc :16 > var/target.log 2>&1 &
|
||||||
|
|
||||||
echo $! > var/target.pid
|
echo $! > var/target.pid
|
||||||
wait
|
wait
|
||||||
|
Loading…
Reference in New Issue
Block a user