]> xenbits.xensource.com Git - osstest.git/commitdiff
Debian HVM guests: Comment out CDROM entry in HVM guest VM
authorRobert Ho <robert.hu@intel.com>
Mon, 17 Aug 2015 05:52:35 +0000 (13:52 +0800)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 25 Sep 2015 11:25:30 +0000 (12:25 +0100)
Comment out the CDROM entry in the installed system's sources.list.
The installation ISO is not generally present in the virtual CDROM
while the guest is running, so this entry is nonfunctional.

Removing it causes the L1 HVM guest VM to use the http entry instead.
The result is that now `apt-get' works in the guest.

Signed-off-by: Robert Ho <robert.hu@intel.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
ts-debian-hvm-install

index 0f3996a238021943da3a9dc9565c39c2fb63fab8..5fb6f4c554f10d30f3b01f51b2b2a8569c7aa2c6 100755 (executable)
@@ -104,6 +104,13 @@ if [ -e \$b/debian/grubx64.efi ] ; then
     mkdir -p \$b/boot
     cp \$b/debian/grubx64.efi \$b/boot/bootx64.efi
 fi
+END
+
+preseed_hook_command($gho, 'late_command', '', <<END);
+#!/bin/sh
+set -ex
+
+in-target sed -i 's/^deb *cdrom/#&/g' /etc/apt/sources.list
 END
 
     $preseed_file .= preseed_hook_cmds();