support /dev/vda as a disk as well as /dev/sda and mount one for xhyve run

Signed-off-by: Justin Cormack <justin.cormack@unikernel.com>
This commit is contained in:
Justin Cormack 2015-12-15 11:22:19 +00:00
parent 0bb657c627
commit 5d199b9591
4 changed files with 7 additions and 4 deletions

View File

@ -10,8 +10,7 @@ start()
{
ebegin "Configuring host block device"
# XXX this may change on other ports
DEV="sda"
DEV="$(ls /dev/[xv]da | head -1 | sed s@/dev/@@)"
DRIVE="/dev/${DEV}"
SWAP="${DRIVE}1"
DATA="${DRIVE}2"

1
xhyve/.gitignore vendored
View File

@ -1 +1,2 @@
/build/
disk.img

View File

@ -106,7 +106,10 @@ $(TARGET): $(TARGET).sym
@echo strip $(notdir $@)
$(VERBOSE) $(ENV) $(STRIP) $(TARGET).sym -o $@
run: $(TARGET)
disk.img:
dd if=/dev/zero of=disk.img bs=4096 count=100k
run: $(TARGET) disk.img
./xhyverun.sh || true
clean:

View File

@ -14,7 +14,7 @@ else
NET="-s 2:0,virtio-net"
fi
#IMG_CD="-s 3,ahci-cd,/somepath/somefile.iso"
#IMG_HDD="-s 4,virtio-blk,/somepath/somefile.img"
IMG_HDD="-s 4,virtio-blk,disk.img"
PCI_DEV="-s 0:0,hostbridge -s 31,lpc"
RND="-s 5,virtio-rnd"
LPC_DEV="-l com1,stdio"