Skip to content

Commit

Permalink
Merge pull request #8 from liva/master
Browse files Browse the repository at this point in the history
qemu-x86_64: change image permissions and QEMU options
  • Loading branch information
thehajime authored Aug 19, 2020
2 parents 7955bea + 63408a0 commit bf14551
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions circleci/qemu-x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ FROM $IMAGE_NAME
LABEL authors="Shinichi Awamoto <shinichi.awamoto@gmail.com>"

RUN sudo apt-get update && \
sudo apt-get install -y cloud-image-utils wget pkg-config libglib2.0-dev libpixman-1-dev linux-image-4.15.0-112-generic && \
sudo apt-get install -y cloud-image-utils wget pkg-config\
libglib2.0-dev libpixman-1-dev linux-image-4.15.0-112-generic&& \
sudo rm -rf /var/lib/apt/lists/*

RUN sudo cp /boot/vmlinuz-4.15.0-112-generic .
RUN sudo cp /boot/initrd.img-4.15.0-112-generic .

RUN sudo chown ubuntu:ubuntu vmlinuz-4.15.0-112-generic initrd.img-4.15.0-112-generic

RUN wget -q http://fossies.org/linux/privat/sshpass-1.06.tar.gz && \
tar xzf sshpass-1.06.tar.gz && cd sshpass-1.06 && ./configure && make

Expand All @@ -30,11 +33,13 @@ RUN dd if=/dev/zero of=nvme.img bs=1024 count=102400
COPY cloud.txt .
RUN cloud-localds cloud.img cloud.txt

ENV QEMU "qemu-system-x86_64 -m 2048 -machine q35,kernel-irqchip=split -device intel-iommu,intremap=on\
-net nic,model=e1000 -net user,hostfwd=tcp::2222-:22 -drive file=/home/ubuntu/nvme.img,if=none,id=D22 -device nvme,drive=D22,serial=1234\
ENV QEMU "qemu-system-x86_64 -m 2048 -machine q35,kernel-irqchip=split\
-device intel-iommu,intremap=on -net nic,model=e1000 -net user,hostfwd=tcp::2222-:22\
-drive file=/home/ubuntu/nvme.img,if=none,id=D22 -device nvme,drive=D22,serial=1234\
-hda /home/ubuntu/ubuntu-18.04-server-cloudimg-amd64.img -hdb /home/ubuntu/cloud.img\
-kernel /home/ubuntu/vmlinuz-4.15.0-112-generic -initrd /home/ubuntu/initrd.img-4.15.0-112-generic\
-append 'root=UUID=f3b1f9ec-6c9d-4e76-adc4-17b250df8e24 ro intel_iommu=on console=tty1 console=ttyS0'\
-kernel /home/ubuntu/vmlinuz-4.15.0-112-generic\
-initrd /home/ubuntu/initrd.img-4.15.0-112-generic\
-append 'root=LABEL=cloudimg-rootfs ro intel_iommu=on console=tty1 console=ttyS0'\
-display none -serial mon:telnet::5555,server,nowait -daemonize"

ENV MYSSH "/home/ubuntu/sshpass-1.06/sshpass -p lkl ssh \
Expand Down

0 comments on commit bf14551

Please sign in to comment.