Re: [libvirt] [PATCH] bhyve: add support for video device configuration
John Ferlan wrote: > > > On 05/09/2017 07:54 AM, Roman Bogorodskiy wrote: > > Connect domain XML configuration (introduced in a > > previous patch) to bhyve command generation. > > > > Unfortunately, this option was documented just recently and at the time > > of writing official online manpages didn't have it updated, so for now > > one can refer to: > > > > https://github.com/freebsd/freebsd/blob/master/usr.sbin/bhyve/bhyve.8#L327 > > > > for the detailed description of the possible vga configuration options. > > > > Also, add some tests for this new feature. > > > > Signed-off-by: Roman Bogorodskiy > > --- > > src/bhyve/bhyve_command.c | 4 ++ > > .../bhyvexml2argv-vnc-vgaconf.args | 12 ++ > > .../bhyvexml2argv-vnc-vgaconf.ldargs | 1 + > > .../bhyvexml2argv-vnc-vgaconf.xml | 31 > > tests/bhyvexml2argvtest.c | 1 + > > .../bhyvexml2xmlout-vnc-vgaconf.xml| 43 > > ++ > > tests/bhyvexml2xmltest.c | 1 + > > 7 files changed, 93 insertions(+) > > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.args > > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.ldargs > > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.xml > > create mode 100644 > > tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf.xml > > > > As noted previously the xml2xml would be better served in the other > patch. The rest seems reasonable, but obviously is affected by the other > one... Still wanted to be sure to respond so that it's not left hanging > without a response. Good, I'll squash these two commits into a single one. Roman Bogorodskiy signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] bhyve: add support for video device configuration
On 05/09/2017 07:54 AM, Roman Bogorodskiy wrote: > Connect domain XML configuration (introduced in a > previous patch) to bhyve command generation. > > Unfortunately, this option was documented just recently and at the time > of writing official online manpages didn't have it updated, so for now > one can refer to: > > https://github.com/freebsd/freebsd/blob/master/usr.sbin/bhyve/bhyve.8#L327 > > for the detailed description of the possible vga configuration options. > > Also, add some tests for this new feature. > > Signed-off-by: Roman Bogorodskiy > --- > src/bhyve/bhyve_command.c | 4 ++ > .../bhyvexml2argv-vnc-vgaconf.args | 12 ++ > .../bhyvexml2argv-vnc-vgaconf.ldargs | 1 + > .../bhyvexml2argv-vnc-vgaconf.xml | 31 > tests/bhyvexml2argvtest.c | 1 + > .../bhyvexml2xmlout-vnc-vgaconf.xml| 43 > ++ > tests/bhyvexml2xmltest.c | 1 + > 7 files changed, 93 insertions(+) > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.args > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.ldargs > create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.xml > create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf.xml > As noted previously the xml2xml would be better served in the other patch. The rest seems reasonable, but obviously is affected by the other one... Still wanted to be sure to respond so that it's not left hanging without a response. John > diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c > index eae5cb3ca..f70e3bc60 100644 > --- a/src/bhyve/bhyve_command.c > +++ b/src/bhyve/bhyve_command.c > @@ -408,6 +408,10 @@ bhyveBuildGraphicsArgStr(const virDomainDef *def > ATTRIBUTE_UNUSED, > _("Unsupported listen type")); > } > > +if (video->driver) > +virBufferAsprintf(&opt, ",vga=%s", > + > virDomainVideoVgaconfTypeToString(video->driver->vgaconf)); > + > virCommandAddArg(cmd, "-s"); > virCommandAddArgBuffer(cmd, &opt); > return 0; > diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.args > b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.args > new file mode 100644 > index 0..70347ee0b > --- /dev/null > +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.args > @@ -0,0 +1,12 @@ > +/usr/sbin/bhyve \ > +-c 1 \ > +-m 214 \ > +-u \ > +-H \ > +-P \ > +-s 0:0,hostbridge \ > +-l bootrom,/path/to/test.fd \ > +-s 2:0,ahci,hd:/tmp/freebsd.img \ > +-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ > +-s 4:0,fbuf,tcp=127.0.0.1:5904,vga=off \ > +-s 1,lpc bhyve > diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.ldargs > b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.ldargs > new file mode 100644 > index 0..421376db9 > --- /dev/null > +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.ldargs > @@ -0,0 +1 @@ > +dummy > diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.xml > b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.xml > new file mode 100644 > index 0..f1bcd1bde > --- /dev/null > +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.xml > @@ -0,0 +1,31 @@ > + > + bhyve > + df3be7e7-a104-11e3-aeb0-50e5492bd3dc > + 219136 > + 1 > + > +hvm > +/path/to/test.fd > + > + > + > + > + > + > + > + > + > + > + > + function='0x0'/> > + > + > + > + > + > + > + > + > + > + > + > diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c > index c8f8c685a..a369a447a 100644 > --- a/tests/bhyvexml2argvtest.c > +++ b/tests/bhyvexml2argvtest.c > @@ -193,6 +193,7 @@ mymain(void) > DO_TEST("net-e1000"); > DO_TEST("uefi"); > DO_TEST("vnc"); > +DO_TEST("vnc-vgaconf"); > > /* Address allocation tests */ > DO_TEST("addr-single-sata-disk"); > diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf.xml > b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf.xml > new file mode 100644 > index 0..6cc1aa088 > --- /dev/null > +++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf.xml > @@ -0,0 +1,43 @@ > + > + bhyve > + df3be7e7-a104-11e3-aeb0-50e5492bd3dc > + 219136 > + 219136 > + 1 > + > +hvm > +/path/to/test.fd > + > + > + > + destroy > + restart > + destroy > + > + > + > + > + > + > + > + > + > + function='0x0'/> > + > + > + > + > + > + function='0x0'/> > + > + > + > + > + > + > + > + > + function='0x0'/> > + > + > + > diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c > index b3759919e..70e4caeb3 100644 > --- a/tests/bhyvexml2xmltes
Re: [libvirt] [PATCH] bhyve: add support for video device configuration
Roman Bogorodskiy wrote: > Sorry for the strange splitting of this (supposed-to-be) series, > apparently I have something weird happening on my system so > git-send-email authenticates only when sending the first patch :-( > > Roman Bogorodskiy ping? As the series was unintentionally broken as mentioned above, the right order is: - [PATCH 1/3] bhyve: tests: add vnc test to bhyvexml2xmltest https://www.redhat.com/archives/libvir-list/2017-May/msg00204.html - [PATCH 1/2] conf: add video driver configuration element https://www.redhat.com/archives/libvir-list/2017-May/msg00205.html - [PATCH] bhyve: add support for video device configuration https://www.redhat.com/archives/libvir-list/2017-May/msg00206.html () Roman Bogorodskiy signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] bhyve: add support for video device configuration
Connect domain XML configuration (introduced in a previous patch) to bhyve command generation. Unfortunately, this option was documented just recently and at the time of writing official online manpages didn't have it updated, so for now one can refer to: https://github.com/freebsd/freebsd/blob/master/usr.sbin/bhyve/bhyve.8#L327 for the detailed description of the possible vga configuration options. Also, add some tests for this new feature. Signed-off-by: Roman Bogorodskiy --- src/bhyve/bhyve_command.c | 4 ++ .../bhyvexml2argv-vnc-vgaconf.args | 12 ++ .../bhyvexml2argv-vnc-vgaconf.ldargs | 1 + .../bhyvexml2argv-vnc-vgaconf.xml | 31 tests/bhyvexml2argvtest.c | 1 + .../bhyvexml2xmlout-vnc-vgaconf.xml| 43 ++ tests/bhyvexml2xmltest.c | 1 + 7 files changed, 93 insertions(+) create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.args create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.ldargs create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.xml create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf.xml diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index eae5cb3ca..f70e3bc60 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -408,6 +408,10 @@ bhyveBuildGraphicsArgStr(const virDomainDef *def ATTRIBUTE_UNUSED, _("Unsupported listen type")); } +if (video->driver) +virBufferAsprintf(&opt, ",vga=%s", + virDomainVideoVgaconfTypeToString(video->driver->vgaconf)); + virCommandAddArg(cmd, "-s"); virCommandAddArgBuffer(cmd, &opt); return 0; diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.args b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.args new file mode 100644 index 0..70347ee0b --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.args @@ -0,0 +1,12 @@ +/usr/sbin/bhyve \ +-c 1 \ +-m 214 \ +-u \ +-H \ +-P \ +-s 0:0,hostbridge \ +-l bootrom,/path/to/test.fd \ +-s 2:0,ahci,hd:/tmp/freebsd.img \ +-s 3:0,virtio-net,faketapdev,mac=52:54:00:00:00:00 \ +-s 4:0,fbuf,tcp=127.0.0.1:5904,vga=off \ +-s 1,lpc bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.ldargs new file mode 100644 index 0..421376db9 --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.ldargs @@ -0,0 +1 @@ +dummy diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.xml new file mode 100644 index 0..f1bcd1bde --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-vnc-vgaconf.xml @@ -0,0 +1,31 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 1 + +hvm +/path/to/test.fd + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index c8f8c685a..a369a447a 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -193,6 +193,7 @@ mymain(void) DO_TEST("net-e1000"); DO_TEST("uefi"); DO_TEST("vnc"); +DO_TEST("vnc-vgaconf"); /* Address allocation tests */ DO_TEST("addr-single-sata-disk"); diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf.xml new file mode 100644 index 0..6cc1aa088 --- /dev/null +++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-vnc-vgaconf.xml @@ -0,0 +1,43 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 219136 + 1 + +hvm +/path/to/test.fd + + + + destroy + restart + destroy + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c index b3759919e..70e4caeb3 100644 --- a/tests/bhyvexml2xmltest.c +++ b/tests/bhyvexml2xmltest.c @@ -105,6 +105,7 @@ mymain(void) DO_TEST_DIFFERENT("serial-grub"); DO_TEST_DIFFERENT("serial-grub-nocons"); DO_TEST_DIFFERENT("vnc"); +DO_TEST_DIFFERENT("vnc-vgaconf"); /* Address allocation tests */ DO_TEST_DIFFERENT("addr-single-sata-disk"); -- 2.12.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] bhyve: add support for video device configuration
Sorry for the strange splitting of this (supposed-to-be) series, apparently I have something weird happening on my system so git-send-email authenticates only when sending the first patch :-( Roman Bogorodskiy signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list