How to boot VM in single user mode in OVM x86 ?

Today I was supposed to boot one VM OEL server into single user mode hosted in OVM x86. It was not showing the splash screen while booting to go into single user mode.

I logged into physical server (in my case PhysicalNode1)  on which VM (Node1) is hosted to make some configuration changes to  boot the VM into single user mode.

Step 1 : Currently I am not physical server I went to path which is having vm.cfg file. To identify the path you need to know repository ID.

[root@PhysicalNode1 0004fb0000060000b10344af56696312]# pwd

Step 2 : I opened the vm.cfg file which is located at above path. I added the “extra = ‘single'” at end of configuration file. I have removed the MAC addressed from below output intentionally.

[root@PhysicalNode1 0004fb0000060000b10344af56696312]# cat vm.cfg
vif = [‘mac=,bridge=10d703e89d’, ‘mac=,bridge=10d43a4e32’, ‘mac=,bridge=10ea983b34’]
OVM_simple_name = ‘Node1’
disk = [‘file:/OVS/Repositories/0004fb0000030000df9bc68b24598137/VirtualDisks/0004fb0000120000f09f9a1f1fb9be33.img,xvda,w’]
bootargs = ”
uuid = ‘0004fb00-0006-0000-b103-44af56696312’
on_reboot = ‘restart’
cpu_weight = 27500
memory = 24576
cpu_cap = 0
maxvcpus = 4
OVM_high_availability = False
OVM_description = ”
on_poweroff = ‘destroy’
on_crash = ‘restart’
bootloader = ‘/usr/bin/pygrub’
name = ‘0004fb0000060000b10344af56696312’
guest_os_type = ‘linux’
vfb = [‘type=vnc,vncunused=1,vnclisten=,keymap=en-us’]
vcpus = 4
OVM_os_type = ‘Oracle Linux 5’
OVM_cpu_compat_group = ”
OVM_domain_type = ‘xen_pvm’
extra = ‘single’

Step 3 : After that I issued below command to start the VM from modified configuration file. You can add -c option at last to get the console as well.

[root@PhysicalNode1 0004fb0000060000b10344af56696312]# xm create /OVS/Repositories/0004fb0000030000df9bc68b24598137/VirtualMachines/0004fb0000060000b10344af56696312/vm.cfg
Using config file “/OVS/Repositories/0004fb0000030000df9bc68b24598137/VirtualMachines/0004fb0000060000b10344af56696312/vm.cfg”.
Started domain 0004fb0000060000b10344af56696312 (id=51)

Step 4 : You can see the newly booted VM in below output.

[root@PhysicalNode1 0004fb0000060000b10344af56696312]# xm list
Name ID Mem VCPUs State Time(s)
0004fb0000060000a69d4f3ac95be988 3 2048 2 -b—- 25981.2
0004fb0000060000ab4b84f7de14b5c0 10 1048 1 -b—- 21624.3
0004fb0000060000b10344af56696312 51 24576 4 r—– 4.9
0004fb0000060000cd2cb94a8c0a6d70 11 4096 2 -b—- 86857.7
Domain-0 0 3152 20 r—– 1550678.7
Step 5 : After completing my work on VM in single user mode. In my case I was supposed to stop the service to run at level 3 which was creating problem during booting.

Step 6 : Powered off the VM

Step 7 : Come back to physical server and removed the added “extra = ‘single'” line in Step 2.

Step 8 : Power on the VM from OVM GUI. VM will get boot in multi user mode.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s