diff --git a/openstack/compute/v2/extensions/diskconfig/results.go b/openstack/compute/v2/extensions/diskconfig/results.go
new file mode 100644
index 0000000..05a29a8
--- /dev/null
+++ b/openstack/compute/v2/extensions/diskconfig/results.go
@@ -0,0 +1,60 @@
+package diskconfig
+
+import (
+	"github.com/mitchellh/mapstructure"
+	"github.com/rackspace/gophercloud"
+	"github.com/rackspace/gophercloud/openstack/compute/v2/servers"
+	"github.com/rackspace/gophercloud/pagination"
+)
+
+func commonExtract(result gophercloud.Result) (*DiskConfig, error) {
+	var resp struct {
+		Server struct {
+			DiskConfig string `mapstructure:"OS-DCF:diskConfig"`
+		} `mapstructure:"server"`
+	}
+
+	err := mapstructure.Decode(result.Body, &resp)
+	if err != nil {
+		return nil, err
+	}
+
+	config := DiskConfig(resp.Server.DiskConfig)
+	return &config, nil
+}
+
+// ExtractGet returns the disk configuration from a servers.Get call.
+func ExtractGet(result servers.GetResult) (*DiskConfig, error) {
+	return commonExtract(result.Result)
+}
+
+// ExtractUpdate returns the disk configuration from a servers.Update call.
+func ExtractUpdate(result servers.UpdateResult) (*DiskConfig, error) {
+	return commonExtract(result.Result)
+}
+
+// ExtractRebuild returns the disk configuration from a servers.Rebuild call.
+func ExtractRebuild(result servers.RebuildResult) (*DiskConfig, error) {
+	return commonExtract(result.Result)
+}
+
+// ExtractDiskConfig returns the DiskConfig setting for a specific server acquired from an
+// servers.ExtractServers call, while iterating through a Pager.
+func ExtractDiskConfig(page pagination.Page, index int) (*DiskConfig, error) {
+	casted := page.(servers.ServerPage).Body
+
+	type server struct {
+		DiskConfig string `mapstructure:"OS-CDF:diskConfig"`
+	}
+	var response struct {
+		Servers []server `mapstructure:"servers"`
+	}
+
+	err := mapstructure.Decode(casted, &response)
+	if err != nil {
+		return nil, err
+	}
+
+	config := DiskConfig(response.Servers[index].DiskConfig)
+	return &config, nil
+}
diff --git a/openstack/compute/v2/extensions/diskconfig/results_test.go b/openstack/compute/v2/extensions/diskconfig/results_test.go
new file mode 100644
index 0000000..adbd031
--- /dev/null
+++ b/openstack/compute/v2/extensions/diskconfig/results_test.go
@@ -0,0 +1,48 @@
+package diskconfig
+
+import (
+	"testing"
+
+	"github.com/rackspace/gophercloud/openstack/compute/v2/servers"
+	th "github.com/rackspace/gophercloud/testhelper"
+	"github.com/rackspace/gophercloud/testhelper/client"
+)
+
+func TestExtractGet(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+	servers.HandleServerGetSuccessfully(t)
+
+	config, err := ExtractGet(servers.Get(client.ServiceClient(), "1234asdf"))
+	th.AssertNoErr(t, err)
+	th.CheckEquals(t, Manual, *config)
+}
+
+func TestExtractUpdate(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+	servers.HandleServerUpdateSuccessfully(t)
+
+	r := servers.Update(client.ServiceClient(), "1234asdf", servers.UpdateOpts{
+		Name: "new-name",
+	})
+	config, err := ExtractUpdate(r)
+	th.AssertNoErr(t, err)
+	th.CheckEquals(t, Manual, *config)
+}
+
+func TestExtractRebuild(t *testing.T) {
+	th.SetupHTTP()
+	defer th.TeardownHTTP()
+	servers.HandleRebuildSuccessfully(t, servers.SingleServerBody)
+
+	r := servers.Rebuild(client.ServiceClient(), "1234asdf", servers.RebuildOpts{
+		Name:       "new-name",
+		AdminPass:  "swordfish",
+		ImageID:    "http://104.130.131.164:8774/fcad67a6189847c4aecfa3c81a05783b/images/f90f6034-2570-4974-8351-6b49732ef2eb",
+		AccessIPv4: "1.2.3.4",
+	})
+	config, err := ExtractRebuild(r)
+	th.AssertNoErr(t, err)
+	th.CheckEquals(t, Manual, *config)
+}
