VirtualBox

Ticket #13364 (closed defect: obsolete)

Opened 8 years ago

Last modified 6 years ago

VBoxManage exec swallows line breaks

Reported by: indifferent Owned by:
Component: guest control Version: VirtualBox 4.3.16
Keywords: VBoxManage guestcontrol exec Cc:
Guest type: Linux Host type: Linux

Description

Bash script in shared folder.

Launching bash script from the guest system produces following output:

$ bash -x /mnt/shared/tip-20140910-150333/guest-build.sh
+ set -e
+ mkdir /mnt/ramdisk/tip-20140910-150333
+ cp -L -R /mnt/shared/tip-20140910-150333/src /mnt/ramdisk/tip-20140910-150333
+ mkdir /mnt/ramdisk/tip-20140910-150333/jdk
+ tar --strip-components=1 --directory=/mnt/ramdisk/tip-20140910-150333/jdk -xzf /mnt/shared/tip-20140910-150333/jdk-7u67-linux-i586.tar.gz
+ BUILDROOT=/mnt/ramdisk/tip-20140910-150333/buildroot
+ mkdir /mnt/ramdisk/tip-20140910-150333/buildroot
+ cd /mnt/ramdisk/tip-20140910-150333/buildroot
+ bash /mnt/ramdisk/tip-20140910-150333/src/configure --with-boot-jdk=/mnt/ramdisk/tip-20140910-150333/jdk --with-zlib=system --disable-debug-symbols --disable-zip-debug-info --with-num-cores=4 --with-jobs=4 --with-debug-level=release
+ make images
+ IMG_DIR=/mnt/shared/jdk-images/8
+ mkdir -p /mnt/shared/jdk-images/8
+ cd /mnt/ramdisk/tip-20140910-150333/buildroot/images
++ date --utc +%Y%m%d-%H%M%S
+ TIMESTAMP=20140910-151713
+ mv j2sdk-image tip-20140910-151713

But running the script with VBoxManage swallows some line breaks from that output:

VBoxManage guestcontrol "Worker-RHEL-6.5-i586" exec --username guestuser --password guestpassword --image "/bin/bash" --wait-exit --wait-stdout --wait-stderr -- -x /mnt/shared/tip-20140910-150333/guest-build.sh
+ set -e
+ mkdir /mnt/ramdisk/tip-20140910-150333+ cp -L -R /mnt/shared/tip-20140910-150333/src /mnt/ramdisk/tip-20140910-150333+ mkdir /mnt/ramdisk/tip-20140910-150333/jdk+ tar --strip-components=1 --directory=/mnt/ramdisk/tip-20140910-150333/jdk -xzf /mnt/shared/tip-20140910-150333/jdk-7u67-linux-i586.tar.gz+ BUILDROOT=/mnt/ramdisk/tip-20140910-150333/buildroot+ mkdir /mnt/ramdisk/tip-20140910-150333/buildroot+ cd /mnt/ramdisk/tip-20140910-150333/buildroot
+ bash /mnt/ramdisk/tip-20140910-150333/src/configure --with-boot-jdk=/mnt/ramdisk/tip-20140910-150333/jdk --enable-unlimited-crypto --with-zlib=system --disable-debug-symbols --disable-zip-debug-info --with-num-cores=4 --with-jobs=4 --with-debug-level=release+ make images+ IMG_DIR=/mnt/shared/jdk-images/8+ mkdir -p /mnt/shared/jdk-images/8+ cd /mnt/ramdisk/tip-20140910-150333/buildroot/images++ date --utc +%Y%m%d-%H%M%S+ TIMESTAMP=20140910-151713+ mv j2sdk-image tip-20140910-151713

Surprisingly, not all line breaks are swallowed, 2 of them remained.

Always reproducable, on following systems:

Host: openSUSE 13.1 with kernel 3.16.2, x86_64

Guest 1: RHEL 6.5 with kernel 2.6.32, i586

Guest 2: RHEL 6.5 with kernel 2.6.32, x86_64

Guest 3: RHEL 7.0 with kernel 3.10.0, x86_64

Attachments

guest-build.sh Download (1.0 KB) - added by indifferent 8 years ago.
Scipt that produces sample output.

Change History

Changed 8 years ago by indifferent

Scipt that produces sample output.

comment:1 Changed 6 years ago by aeichner

  • Status changed from new to closed
  • Resolution set to obsolete

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use