Hi, On Sunday, October 03, 2010 10:14:29 pm Robert Terhaar wrote: > I emailed with Kazutaka off-list about this- duplicating here. > > > Is it required to run a local sheep storage in order to use the sheepdog > qemu block driver? It seems that 'localhost:7000' is hard-coded into the > top of sheepdog.c in the qemu source. It seems hostname/port is extracted in parse_vdiname() and put in "s->addr" and "s->port": http://git.savannah.gnu.org/cgit/qemu.git/tree/block/sheepdog.c#n937 Most functions use that when connecting, like this: == fd = connect_to_sdog(s->addr, s->port); == So opening an EXISTING VDI located on an external sheepdog server should work, by specifying the [hostname]:[port] in the VDI name, like Kazutaka said. However I think that CREATING new VDIs on an external sheepdog server is not implemented/broken. do_sd_create() does not use s->addr, but a function parameter. http://git.savannah.gnu.org/cgit/qemu.git/tree/block/sheepdog.c#n1244 == static int do_sd_create(char *filename, int64_t vdi_size, uint32_t base_vid, uint32_t *vdi_id, int snapshot, const char *addr, const char *port) { SheepdogVdiReq hdr; SheepdogVdiRsp *rsp = (SheepdogVdiRsp *)&hdr; int fd, ret; unsigned int wlen, rlen = 0; char buf[SD_MAX_VDI_LEN]; fd = connect_to_sdog(addr, port); == And do_sd_create() is called with the "addr" parameter hardcoded to null in sd_create(), making it always use the default of localhost:7000 when creating new VDIs: http://git.savannah.gnu.org/cgit/qemu.git/tree/block/sheepdog.c#n937 == return do_sd_create((char *)filename, vdi_size, vid, NULL, 0, NULL, NULL); == Yours sincerely, Floris Bos |