Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cd1994b007 | ||
|
1fd780befc | ||
|
8847a471c5 | ||
|
c0c144bd56 |
@@ -9,8 +9,13 @@ Location | Description
|
|||||||
|Kernel command line: `cloud-config-url=http://example.com/user_data`.| You can find this string using this command `cat /proc/cmdline`. Usually used in [PXE](/os/docs/latest/booting-with-pxe.html) or [iPXE](/os/docs/latest/booting-with-ipxe.html) boots.|
|
|Kernel command line: `cloud-config-url=http://example.com/user_data`.| You can find this string using this command `cat /proc/cmdline`. Usually used in [PXE](/os/docs/latest/booting-with-pxe.html) or [iPXE](/os/docs/latest/booting-with-ipxe.html) boots.|
|
||||||
|`/var/lib/coreos-install/user_data`| When you install CoreOS manually using the [coreos-install](/os/docs/latest/installing-to-disk.html) tool. Usually used in bare metal installations.|
|
|`/var/lib/coreos-install/user_data`| When you install CoreOS manually using the [coreos-install](/os/docs/latest/installing-to-disk.html) tool. Usually used in bare metal installations.|
|
||||||
|`/usr/share/oem/cloud-config.yml`| Path for OEM images.|
|
|`/usr/share/oem/cloud-config.yml`| Path for OEM images.|
|
||||||
|
|`/var/lib/coreos-vagrant/vagrantfile-user-data`| Vagrant OEM scripts automatically store Cloud-Config into this path. |
|
||||||
|`/var/lib/waagent/CustomData`| Azure platform uses OEM path for first Cloud-Config initialization and then `/var/lib/waagent/CustomData` to apply your settings.|
|
|`/var/lib/waagent/CustomData`| Azure platform uses OEM path for first Cloud-Config initialization and then `/var/lib/waagent/CustomData` to apply your settings.|
|
||||||
|`http://169.254.169.254/metadata/v1/user-data` `http://169.254.169.254/2009-04-04/user-data` `https://metadata.packet.net/userdata`|DigitalOcean, EC2 and Packet cloud providers correspondingly use these URLs to download Cloud-Config.|
|
|`http://169.254.169.254/metadata/v1/user-data` `http://169.254.169.254/2009-04-04/user-data` `https://metadata.packet.net/userdata`|DigitalOcean, EC2 and Packet cloud providers correspondingly use these URLs to download Cloud-Config.|
|
||||||
|
|`/usr/share/oem/bin/vmtoolsd --cmd "info-get guestinfo.coreos.config.data"`|Cloud-Config provided by [VMware Backdoor][VMware Backdoor]|
|
||||||
|
|`/usr/share/oem/bin/vmtoolsd --cmd "info-get guestinfo.coreos.config.url"`|Cloud-Config URL provided by [VMware Backdoor][VMware Backdoor]|
|
||||||
|
|
||||||
|
[VMware Backdoor]: vmware-backdoor.md
|
||||||
|
|
||||||
You can also run the `coreos-cloudinit` tool manually and provide a path to your custom Cloud-Config file:
|
You can also run the `coreos-cloudinit` tool manually and provide a path to your custom Cloud-Config file:
|
||||||
|
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
# VMware Backdoor #
|
# VMware Backdoor
|
||||||
|
|
||||||
|
## Cloud-Config Options List
|
||||||
|
|
||||||
coreos-cloudinit is capable of reading userdata and metadata from the VMware
|
coreos-cloudinit is capable of reading userdata and metadata from the VMware
|
||||||
backdoor. This datasource can be enable with the `--from-vmware-backdoor` flag.
|
backdoor. This datasource can be enabled with the `--from-vmware-backdoor` flag.
|
||||||
Userdata and metadata are passed from the hypervisor to the virtual machine
|
Userdata and metadata are passed from the hypervisor to the virtual machine
|
||||||
through guest variables. The following guest variables and their expected types
|
through guest variables. The following guest variables and their expected types
|
||||||
are supported by coreos-cloudinit:
|
are supported by coreos-cloudinit:
|
||||||
@@ -24,3 +26,7 @@ are supported by coreos-cloudinit:
|
|||||||
Note: "n", "m", "l", and "x" are 0-indexed, incrementing integers. The
|
Note: "n", "m", "l", and "x" are 0-indexed, incrementing integers. The
|
||||||
identifier for the interfaces does not correspond to anything outside of this
|
identifier for the interfaces does not correspond to anything outside of this
|
||||||
configuration; it is merely for mapping configuration values to each interface.
|
configuration; it is merely for mapping configuration values to each interface.
|
||||||
|
|
||||||
|
Please refer to [link][vmware] to know more how to run CoreOS on VMware.
|
||||||
|
|
||||||
|
[vmware]: https://github.com/coreos/docs/blob/master/os/booting-on-vmware.md
|
||||||
|
@@ -169,7 +169,7 @@ func main() {
|
|||||||
|
|
||||||
dss := getDatasources()
|
dss := getDatasources()
|
||||||
if len(dss) == 0 {
|
if len(dss) == 0 {
|
||||||
fmt.Println("Provide at least one of --from-file, --from-configdrive, --from-ec2-metadata, --from-cloudsigma-metadata, --from-packet-metadata, --from-url or --from-proc-cmdline")
|
fmt.Println("Provide at least one of --from-file, --from-configdrive, --from-ec2-metadata, --from-cloudsigma-metadata, --from-packet-metadata, --from-vmware-backdoor, --from-digitalocean-metadata, --from-vmware-backdoor, --from-waagent, --from-url or --from-proc-cmdline")
|
||||||
os.Exit(2)
|
os.Exit(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -127,7 +127,7 @@ func parseInterface(iface digitalocean.Interface, nameservers []net.IP, useRoute
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if iface.AnchorIPv4 != nil {
|
if iface.AnchorIPv4 != nil {
|
||||||
var ip, mask, gateway net.IP
|
var ip, mask net.IP
|
||||||
if ip = net.ParseIP(iface.AnchorIPv4.IPAddress); ip == nil {
|
if ip = net.ParseIP(iface.AnchorIPv4.IPAddress); ip == nil {
|
||||||
return nil, fmt.Errorf("could not parse %q as anchor IPv4 address", iface.AnchorIPv4.IPAddress)
|
return nil, fmt.Errorf("could not parse %q as anchor IPv4 address", iface.AnchorIPv4.IPAddress)
|
||||||
}
|
}
|
||||||
@@ -140,15 +140,11 @@ func parseInterface(iface digitalocean.Interface, nameservers []net.IP, useRoute
|
|||||||
})
|
})
|
||||||
|
|
||||||
if useRoute {
|
if useRoute {
|
||||||
if gateway = net.ParseIP(iface.AnchorIPv4.Gateway); gateway == nil {
|
|
||||||
return nil, fmt.Errorf("could not parse %q as anchor IPv4 gateway", iface.AnchorIPv4.Gateway)
|
|
||||||
}
|
|
||||||
routes = append(routes, route{
|
routes = append(routes, route{
|
||||||
destination: net.IPNet{
|
destination: net.IPNet{
|
||||||
IP: net.IPv4zero,
|
IP: net.IPv4zero,
|
||||||
Mask: net.IPMask(net.IPv4zero),
|
Mask: net.IPMask(net.IPv4zero),
|
||||||
},
|
},
|
||||||
gateway: gateway,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -281,19 +281,6 @@ func TestParseInterface(t *testing.T) {
|
|||||||
nss: []net.IP{},
|
nss: []net.IP{},
|
||||||
err: errors.New("could not parse \"bad\" as anchor IPv4 mask"),
|
err: errors.New("could not parse \"bad\" as anchor IPv4 mask"),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
cfg: digitalocean.Interface{
|
|
||||||
MAC: "01:23:45:67:89:AB",
|
|
||||||
AnchorIPv4: &digitalocean.Address{
|
|
||||||
IPAddress: "1.2.3.4",
|
|
||||||
Netmask: "255.255.0.0",
|
|
||||||
Gateway: "bad",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
useRoute: true,
|
|
||||||
nss: []net.IP{},
|
|
||||||
err: errors.New("could not parse \"bad\" as anchor IPv4 gateway"),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
cfg: digitalocean.Interface{
|
cfg: digitalocean.Interface{
|
||||||
MAC: "01:23:45:67:89:AB",
|
MAC: "01:23:45:67:89:AB",
|
||||||
@@ -305,7 +292,6 @@ func TestParseInterface(t *testing.T) {
|
|||||||
AnchorIPv4: &digitalocean.Address{
|
AnchorIPv4: &digitalocean.Address{
|
||||||
IPAddress: "7.8.9.10",
|
IPAddress: "7.8.9.10",
|
||||||
Netmask: "255.255.0.0",
|
Netmask: "255.255.0.0",
|
||||||
Gateway: "11.12.13.14",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
useRoute: true,
|
useRoute: true,
|
||||||
@@ -326,12 +312,11 @@ func TestParseInterface(t *testing.T) {
|
|||||||
nameservers: []net.IP{},
|
nameservers: []net.IP{},
|
||||||
routes: []route{
|
routes: []route{
|
||||||
{
|
{
|
||||||
net.IPNet{IP: net.IPv4zero, Mask: net.IPMask(net.IPv4zero)},
|
destination: net.IPNet{IP: net.IPv4zero, Mask: net.IPMask(net.IPv4zero)},
|
||||||
net.ParseIP("5.6.7.8"),
|
gateway: net.ParseIP("5.6.7.8"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
net.IPNet{IP: net.IPv4zero, Mask: net.IPMask(net.IPv4zero)},
|
destination: net.IPNet{IP: net.IPv4zero, Mask: net.IPMask(net.IPv4zero)},
|
||||||
net.ParseIP("11.12.13.14"),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user