forked from thehajime/lkl-docker
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from liva/master
qemu-x86_64: change image permissions and QEMU options
- Loading branch information
Showing
1 changed file
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,15 @@ FROM $IMAGE_NAME | |
LABEL authors="Shinichi Awamoto <[email protected]>" | ||
|
||
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 | ||
|
||
|
@@ -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 \ | ||
|