# RancherOS persistence when set-up via docker-machine

**URL:** <https://forums.suse.com/t/rancheros-persistence-when-set-up-via-docker-machine/8460>\
**Category:** RancherOS\
**Created:** [January 31, 2018, 7:52am UTC](https://forums.suse.com/t/rancheros-persistence-when-set-up-via-docker-machine/8460 "2018-01-31T07:52:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![julienbaladier](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/julienbaladier/32/3284_2.png) [@julienbaladier](https://forums.suse.com/u/julienbaladier)\
**Post date:** [January 31, 2018, 7:52am UTC](https://forums.suse.com/t/rancheros-persistence-when-set-up-via-docker-machine/8460/1 "2018-01-31T07:52:13Z")

</div>

I am trying to create RancherOS hosts on vSphere using docker-machine.

- Rancher OS v1.2.0-rc2
- Docker machine v0.13.0 on Ubuntu 17.10
- ESXi 6.5U1
- vCenter 6.5U1d

```auto
docker-machine create myrancherhost--driver vmwarevsphere \
				--vmwarevsphere-boot2docker-url ./rancheros-1.2.0-rc2.iso \
				--vmwarevsphere-vcenter $VCENTER \
				--vmwarevsphere-username $USERNAME \
				--vmwarevsphere-password $PASSWORD \
				--vmwarevsphere-network "$NETWORK" \
				--vmwarevsphere-cpu-count=2 \
				--vmwarevsphere-memory-size=2048 \
				--vmwarevsphere-disk-size=5120 \
				--vmwarevsphere-datastore=$DATASTORE \
				--vmwarevsphere-datacenter=$DATACENTER \
                --vmwarevsphere-cloudinit ./cloud-config.yml \
				--vmwarevsphere-cfgparam "guestinfo.hostname=myrancherhost" \
				--vmwarevsphere-cfgparam "guestinfo.interface.0.name=eth0" \
				--vmwarevsphere-cfgparam "guestinfo.interface.0.ip.0.address=10.0.0.111/24" \
				--vmwarevsphere-cfgparam "guestinfo.interface.0.route.0.gateway=10.0.0.1"

```

Is-it possible to set-up persistence on /dev/sda using the cloud-config.yml file I provide ?  
I tried to follow the documentation doing the following but it doesn’t seem to work properly. The drive isn’t formatted at all.

```auto
#cloud-config
rancher:
  console: alpine
  state:
    fstype: auto
    dev: LABEL=RANCHER_STATE
    formatzero: true
    autoformat:
      - /dev/sda
  services_include:
    open-vm-tools: true

```

I would like to persist the configurations performed by docker-machine automatically.
