kvmadm
kvmadm copied to clipboard
Incorrect setup of system/kvm within zone.
When Creating a kvm inside a zone using
kvmadm import test2.json
I get the following output:
# /opt/kvmadm/bin/kvmadm import test2.json -> zvol rpool/zones/foo/kvm0 does not exist. creating it... -> vnic 'vnicfoo0' does not exist. creating it... -> vnic 'kvmfoo0' does not exist. creating it... /zones/foo must not be group readable. /zones/foo must not be group executable. /zones/foo must not be world readable. /zones/foo must not be world executable. /zones/foo: changing permissions to 0700. Publisher: Using omnios (http://pkg.omniti.com/omnios/r151014/ ). Image: Preparing at /zones/foo/root. Cache: Using /var/pkg/publisher. Sanity Check: Looking for 'entire' incorporation. Installing: Packages (output follows) Packages to install: 386 Mediators to change: 1 Services to change: 4 DOWNLOAD PKGS FILES XFER (MB) SPEED Completed 386/386 36684/36684 316.0/316.0 0B/s PHASE ITEMS Installing new actions 59892/59892 Updating package state database Done Updating package cache 0/0 Updating image state Done Creating fast lookup database Done Note: Man pages can be obtained by installing pkg:/system/manual Postinstall: Copying SMF seed repository ... done. Done: Installation completed in 72.379 seconds. Next Steps: Boot the zone, then log into the zone console (zlogin -C) to complete the configuration process. setting up system/kvm within zone. this might take a while... svccfg: Pattern 'svc:/system/kvm' doesn't match any instances or services svccfg: No such property group "manifestfiles". ERROR: cannot delete property group from svc:/system/kvm Do you want to retry [Y/n]?
I do retry, but the configuration looks fine, so I continue: after that it produces no error
setting up SMF instance within zone. this might take a while...
and exits
Here is the test2.json:
{ "foo" : { "disk" : [ { "index" : "0", "boot" : "true", "disk_path" : "rpool/zones/foo/kvm0", "model" : "virtio", "disk_size" : "50G", "cache" : "none" }, { "index" : "1", "media" : "cdrom", "disk_path" : "/export/iso/CentOS-7-x86_64-Minimal-1511.iso", "model" : "ide", "cache" : "none" } ], "serial" : [ { "index" : "0", "serial_name" : "console" } ], "nic" : [ { "index" : "0", "over" : "switch0", "nic_name" : "vnicfoo0", "model" : "virtio" }, { "index" : "1", "over" : "e1000g0", "nic_name" : "kvmfoo0", "model" : "virtio" } ], "zone" : { "zonepath" : "/zones/foo", "bootargs" : "", "hostid" : "", "brand" : "lipkg", "fs-allowed" : "", "scheduling-class" : "", "pool" : "", "autoboot" : "false", "limitpriv" : "default", "ip-type" : "exclusive", "fs" : [ { "special" : "/etc/opt/kvmadm/myvncpw", "options" : "[ro,nodevices]", "type" : "lofs", "dir" : "/etc/opt/kvmadm/myvncpw" } ] }, "vnc" : "socket", "uuid" : "ed228d46-7862-4a43-93dd-c0ad975fa930", "hpet" : "false", "boot_order" : "cd", "vcpus" : "4", "ram" : "2048", "time_base" : "utc" } }
Starting the kvm
/opt/kvmadm/bin/kvmadm start foo
produces no error, but also no result. No qemu-system-x86_64 process is running inside the zone.
Examining the service manifest does not look complete if i compare it to another server, where the kvmadm installation is working
# svccfg export kvm <?xml version='1.0'?> <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'> <service_bundle type='manifest' name='export'> <service name='system/kvm' type='service' version='0'> <instance name='foo' enabled='true'> <property_group name='kvmadm' type='application'> <propval name='disk0_cache' type='astring' value='none'/> <propval name='disk0_boot' type='boolean' value='true'/> <propval name='disk0_disk_size' type='astring' value='50G'/> <propval name='disk0_disk_path' type='astring' value='rpool/zones/foo/kvm0'/> <propval name='disk0_model' type='astring' value='virtio'/> <propval name='disk0_index' type='count' value='0'/> <propval name='disk1_cache' type='astring' value='none'/> <propval name='disk1_disk_path' type='astring' value='/export/iso/CentOS-7-x86_64-Minimal-1511.iso'/> <propval name='disk1_index' type='count' value='1'/> <propval name='disk1_model' type='astring' value='ide'/> <propval name='disk1_media' type='astring' value='cdrom'/> <propval name='nic0_index' type='count' value='0'/> <propval name='nic0_nic_name' type='astring' value='vnicfoo0'/> <propval name='nic0_over' type='astring' value='switch0'/> <propval name='nic0_model' type='astring' value='virtio'/> <propval name='nic1_over' type='astring' value='e1000g0'/> <propval name='nic1_index' type='count' value='1'/> <propval name='nic1_model' type='astring' value='virtio'/> <propval name='nic1_nic_name' type='astring' value='kvmfoo0'/> <propval name='serial0_serial_name' type='astring' value='console'/> <propval name='serial0_index' type='count' value='0'/> <propval name='vcpus' type='count' value='4'/> <propval name='vnc' type='astring' value='socket'/> <propval name='hpet' type='boolean' value='false'/> <propval name='ram' type='count' value='2048'/> <propval name='boot_order' type='astring' value='cd'/> <propval name='uuid' type='astring' value='ed228d46-7862-4a43-93dd-c0ad975fa930'/> <propval name='time_base' type='astring' value='utc'/> </property_group> <property_group name='general' type='framework'> <propval name='complete' type='astring' value='foo'/> </property_group> </instance> </service> </service_bundle>
I forgot:
This is on OmniOS 151014
when installing, did you import the manifest for the system/kvm SMF template?
can you post the output of svccfg export system/kvm
in the GZ?
from the readme:
You can import make configure install a kvmadm service manifest by calling configure with the option --enable-svcinstall=/var/svc/manifest/site. Since the manifest contains the absolute path to the kvmadm install directory, it is not contained in the prebuilt version. But you can get a copy from github and roll your own.
svccfg validate /var/svc/manifest/site/system-kvm.xml svccfg import /var/svc/manifest/site/system-kvm.xml